/* ========================================
   css/metacognition-modal.css
   메타인지 측정 모달 스타일
======================================== */

/* 모달 오버레이 */
.metacognition-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* 모달 콘텐츠 */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 모달 헤더 */
.modal-header {
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.modal-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0 0 15px 0;
}

.modal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.2rem;
}

.info-text {
    flex: 1;
}

/* 모달 바디 */
.modal-body {
    padding: 30px;
}

.question-item {
    margin-bottom: 30px;
}

.question-item:last-child {
    margin-bottom: 0;
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.question-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.question-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
}

/* 입력 그룹 */
.input-group {
    margin-top: 15px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.input-prefix {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.modal-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    text-align: center;
    outline: none;
    padding: 5px;
}

.modal-input::placeholder {
    color: #ccc;
    font-weight: 500;
}

.input-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
    padding-left: 5px;
}

.input-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #e74c3c;
    margin-top: 8px;
    padding-left: 5px;
    font-weight: 600;
}

/* 참고 가이드 */
.reference-guide {
    margin-top: 20px;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 12px;
    padding: 15px;
}

.guide-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.guide-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 8px 10px;
    background: white;
    border-radius: 8px;
}

.guide-label {
    font-weight: 700;
    color: #667eea;
}

.guide-desc {
    color: #666;
}

/* 모달 푸터 */
.modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.modal-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.modal-submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-text {
    font-size: 1.05rem;
}

.modal-notice {
    font-size: 0.8rem;
    color: #999;
    margin: 15px 0 0 0;
    line-height: 1.5;
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 25px 20px 15px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-subtitle {
        font-size: 0.9rem;
    }

    .modal-info {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .modal-body {
        padding: 20px;
    }

    .question-header h3 {
        font-size: 1rem;
    }

    .input-wrapper {
        padding: 12px 15px;
    }

    .modal-input {
        font-size: 1.1rem;
    }

    .reference-guide {
        padding: 12px;
    }

    .guide-item {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .modal-footer {
        padding: 15px 20px 25px;
    }

    .modal-submit-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-subtitle {
        font-size: 0.85rem;
    }

    .question-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .question-header h3 {
        font-size: 0.95rem;
    }

    .modal-input {
        font-size: 1rem;
    }

    .guide-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
