/**
 * 파일경로: /assets/css/ll-magic.css
 * 파일역할: Magic Action Bottom Sheet & Templates (Ver 2.1 - VAS & BP Fix)
 * * [수정됨] 통증 강도(VAS) 슬라이더 스타일 추가
 */

/* Bottom Sheet Container */
.ll-bottom-sheet {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ll-bottom-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ll-sheet-content {
    background: #fff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ll-bottom-sheet.is-open .ll-sheet-content {
    transform: translateY(0);
}

/* Header */
.ll-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.ll-sheet-title { font-size: 18px; font-weight: 700; color: #2d3436; margin: 0; }
.ll-sheet-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 5px; }

/* ---------------------------------------------------- */
/* Template Type A: Numeric Keypad */
/* ---------------------------------------------------- */
.ll-magic-input-display {
    font-size: 40px;
    font-weight: 800;
    color: #4b7bec;
    text-align: center;
    margin-bottom: 5px;
    border-bottom: 2px solid #e5edff;
    padding-bottom: 10px;
    min-height: 60px;
}
.ll-magic-unit { font-size: 16px; color: #999; font-weight: 500; }

.ll-magic-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}
.ll-key-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 600;
    color: #2d3436;
    cursor: pointer;
    transition: background 0.1s;
}
.ll-key-btn:active { background: #e0e0e0; }
.ll-key-submit {
    grid-column: span 3;
    background: #4b7bec;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
}

/* ---------------------------------------------------- */
/* Template Type B: Timer / Counter / Panic */
/* ---------------------------------------------------- */
.ll-magic-circle-wrap {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.ll-magic-circle-btn {
    width: 180px; height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b7bec, #3867d6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(75, 123, 236, 0.3);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ll-magic-circle-btn:active { transform: scale(0.95); }

.ll-circle-val { font-size: 42px; font-weight: 800; line-height: 1; }
.ll-circle-label { font-size: 14px; margin-top: 5px; opacity: 0.9; }

/* Panic Mode */
.ll-panic-mode .ll-sheet-content {
    background: #1e272e;
    color: #fff;
}
.ll-panic-mode .ll-sheet-title { color: #fff; }
.ll-panic-mode .ll-sheet-close { color: #fff; }

.ll-breath-circle {
    width: 200px; height: 200px;
    border-radius: 50%;
    background: #a29bfe;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    transition: transform 4s ease-in-out, background-color 4s ease;
    box-shadow: 0 0 40px rgba(162, 155, 254, 0.4);
}
.ll-breath-text { font-size: 24px; font-weight: 700; color: #fff; }

.ll-breath-circle.inhale { background: #74b9ff; transform: scale(1.3); }
.ll-breath-circle.hold { background: #a29bfe; transform: scale(1.3); }
.ll-breath-circle.exhale { background: #81ecec; transform: scale(1.0); }

/* ---------------------------------------------------- */
/* Template Type C: Visual (Photo & Pain Map) */
/* ---------------------------------------------------- */
.ll-visual-uploader {
    border: 2px dashed #dcdde1;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.ll-visual-uploader:active { background: #f1f2f6; border-color: #4b7bec; }

.ll-upload-preview {
    width: 100%; height: 200px;
    object-fit: cover;
    border-radius: 12px;
    display: none;
    margin-bottom: 15px;
}
.ll-upload-preview.show { display: block; }

.ll-upload-placeholder { color: #636e72; }
.ll-upload-icon { font-size: 40px; color: #4b7bec; margin-bottom: 10px; display: block; }

/* Pain Map Grid */
.ll-pain-map-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
}
.ll-body-part {
    padding: 12px 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #636e72;
    cursor: pointer;
    transition: all 0.2s;
}
.ll-body-part.selected {
    background: #ff7675;
    color: #fff;
    border-color: #ff7675;
    box-shadow: 0 4px 10px rgba(255, 118, 117, 0.3);
}

/* VAS Slider (New) */
.ll-vas-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
}
.ll-vas-label {
    font-size: 14px; font-weight: 700; color: #2d3436; margin-bottom: 10px; display: block;
}
.ll-vas-value {
    font-size: 24px; font-weight: 800; color: #e74c3c; margin-left: 5px;
}
.ll-slider-range {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: linear-gradient(to right, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 5px;
    outline: none;
}
.ll-slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px; height: 24px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}