/* C-Na: Question Flow (Input Engine) Styles */

/* 1. Overlay & Slider Container (Layout Fix) */
#ll-input-overlay .ll-overlay-content {
    padding: 0; /* 화면 꽉 차게 */
    background: #f5f6fa;
    height: 90vh; /* 충분한 높이 확보 */
    display: flex;
    flex-direction: column;
}

.ll-card-header {
    padding: 15px 20px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.ll-card-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.ll-close-input { background: none; border: none; font-size: 24px; color: #999; padding: 5px; cursor: pointer; }

/* Slider Wrap */
.ll-card-slider-wrap {
    flex: 1;
    overflow: hidden; /* 넘치는 카드 숨김 */
    position: relative;
    width: 100%;
}

.ll-card-slider {
    display: flex; /* 가로 배치 핵심 */
    height: 100%;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* 부드러운 슬라이딩 */
}

/* 2. Individual Card Style */
.ll-card {
    flex: 0 0 100%; /* 한 화면에 카드 하나만 */
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 내용 중앙 정렬 */
    overflow-y: auto; /* 내용 많으면 스크롤 */
    box-sizing: border-box;
}

/* 3. Question UI */
.ll-q-category {
    font-size: 13px;
    color: #4b7bec;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: #e5edff;
    padding: 4px 12px;
    border-radius: 20px;
}

.ll-q-text {
    font-size: 22px;
    font-weight: 700;
    color: #2d3436;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.4;
}

.ll-q-sub { font-size: 14px; color: #888; margin-bottom: 20px; }

/* 4. Score Buttons */
.ll-score-row {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.ll-score-btn {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-size: 20px;
    font-weight: 600;
    color: #b2bec3;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ll-score-btn:active, .ll-score-btn.selected {
    background: #4b7bec;
    color: #fff;
    border-color: #4b7bec;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(75, 123, 236, 0.3);
}

/* Ghost Marking Style */
.ll-score-btn.ll-ghost-mark {
    border-color: #a55eea;
    background-color: #f8f9fa;
}
.ll-ghost-icon {
    position: absolute;
    top: -10px; right: -6px;
    font-size: 14px;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: floatGhost 2s infinite ease-in-out;
}
@keyframes floatGhost {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 5. Schedule & OCR Styles */
.ll-sched-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
}
.ll-sched-actions .ll-btn { flex: 1; padding: 14px; border-radius: 12px; }

#ll-sched-note-area { width: 100%; max-width: 340px; }
.slide-in { animation: slideUp 0.4s ease-out; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* OCR Button */
.ll-ocr-area { margin-bottom: 12px; width: 100%; }
#ll-btn-ocr {
    width: 100%;
    background: #fff;
    color: #2d3436;
    border: 2px dashed #b2bec3;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
#ll-btn-ocr:hover, #ll-btn-ocr:active {
    border-color: #4b7bec;
    color: #4b7bec;
    background: #f0f7ff;
}

/* 6. Voice Memo */
.ll-memo-wrap { width: 100%; position: relative; margin-bottom: 20px; }
.ll-memo-area {
    width: 100%; height: 120px; padding: 15px;
    border: 1px solid #dcdde1; border-radius: 16px;
    resize: none; font-size: 16px; background: #fff;
    transition: border 0.3s;
}
.ll-memo-area:focus { border-color: #4b7bec; outline: none; }

.ll-voice-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ll-btn-mic {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: #ff4757;
    color: #fff;
    border: none;
    font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: transform 0.1s;
}
.ll-btn-mic:active, .ll-btn-mic.recording {
    transform: scale(0.95); background: #e84118;
}
.ll-btn-mic.recording { animation: ripple 1.5s infinite; }

@keyframes ripple {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.ll-voice-guide { font-size: 12px; color: #999; margin: 0; }

/* 7. Challenge Grid */
.ll-challenge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 30px;
}
.ll-challenge-item {
    background: #fff;
    border: 2px solid #f1f2f6;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.ll-challenge-item.is-checked {
    border-color: #20bf6b;
    background: #e8fcf1;
    color: #20bf6b;
}
.ll-ch-icon { font-size: 28px; margin-bottom: 6px; display: block; }
.ll-ch-title { font-size: 13px; font-weight: 600; }

/* ======================= */
/* 8. Vital Dial UI        */
/* ======================= */

/* 다이얼 탭 */
.ll-dial-tabs {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ll-dial-tabs::-webkit-scrollbar { display:none; }

.ll-dial-tab {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #636e72;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}
.ll-dial-tab.active {
    border-color: #4b7bec;
    background: #e8f0fe;
    color: #4b7bec;
}

/* 다이얼 패널 */
.ll-dial-panels { width: 100%; }
.ll-dial-panel { display: none; }
.ll-dial-panel.active { display: block; }

/* 다이얼 컨테이너 */
.ll-dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ll-dial-label {
    font-size: 13px;
    font-weight: 700;
    color: #636e72;
    margin-bottom: 6px;
}

/* 다이얼 링 래퍼 */
.ll-dial-ring-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.ll-dial-svg {
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* 다이얼 중앙 값 표시 */
.ll-dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.ll-dial-value {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    transition: color 0.3s ease;
    font-variant-numeric: tabular-nums;
}
.ll-dial-unit {
    font-size: 12px;
    color: #b2bec3;
    margin-top: 2px;
    font-weight: 600;
}
.ll-dial-status {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
    transition: color 0.3s ease;
    padding: 2px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
}

/* 핸들 효과 */
.ll-dial-handle {
    transition: stroke 0.3s ease, filter 0.2s;
}
.ll-dial-handle:hover {
    filter: url(#dial-shadow) brightness(1.05);
}

/* 다이얼 - 입력값 체크마크/표시 */
.ll-dial-tabs .ll-dial-tab[data-set="true"]::after {
    content: ' ✓';
    color: #20bf6b;
}

/* 모바일에서 바이탈 탭 2열 그리드로 노출 */
@media (max-width: 480px) {
    .ll-dial-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .ll-dial-tab {
        flex: 0 0 calc(50% - 4px);
        white-space: normal;
    }
    .ll-dial-ring-wrap {
        width: 210px;
        height: 210px;
    }
}