/* ============================================================================
   ESCALAS.CSS — Estilos para questionários de triagem
   ============================================================================ */

:root {
    --accent-primary: #2f6f5e;
    --accent-light: #e8f3f0;
    --alert-warning: #d4a574;
    --alert-danger: #c44536;
    --text-muted: #666;
    --border-light: #e0e0e0;
}

/* ============ CONTAINERS ============ */

.quiz {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

@media(max-width: 768px) {
    .quiz {
        padding: 24px;
    }
}

.quiz-container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ INTRO ============ */

.intro {
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.intro b {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ============ ITEMS ============ */

.items-section {
    margin-bottom: 30px;
}

.item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
}

.item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.item-question {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 14px;
    line-height: 1.5;
}

.item-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============ OPTIONS (BUTTONS) ============ */

.option-btn {
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: #333;
    font-family: inherit;
}

.option-btn:hover {
    background: #efefef;
    border-color: var(--accent-light);
}

.option-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    font-weight: 500;
}

.opt-label {
    display: block;
}

/* ============ Links sem sublinhado  ============ */

.card--link a {
    text-decoration: none;
}

/* ============ Links com efeito visual ao passar o mouse por cima (hover) ============ */

.card--link a:hover {
    /* text-decoration: underline; -> se quiser sublinhar só no hover */
    opacity: 0.65; /* ou mudar levemente a cor de fundo do card */
}

/* ============ FUNCTIONAL ============ */

.functional-section {
    background: var(--accent-light);
    border-left: 4px solid var(--accent-primary);
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.functional-section .item-question {
    margin-top: 0;
    margin-bottom: 12px;
}

.functional-btn {
    background: white;
}

.functional-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* ============ PROGRESS ============ */

.score-section {
    background: var(--accent-light);
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
    width: 0;
}

.progress-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* ============ SUBMIT BUTTON ============ */

#submitBtn {
    margin-top: 30px;
}

#submitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ RESULTS ============ */

.results.hidden {
    display: none;
}

.result-card {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1a4a3f 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.result-score {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
}

.result-score span:last-child {
    font-size: 32px;
    opacity: 0.8;
}

.result-band {
    margin: 20px 0;
}

.band-label {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
}

.band-label.b-min {
    background: rgba(76, 175, 80, 0.3);
}

.band-label.b-leve {
    background: rgba(255, 193, 7, 0.3);
}

.band-label.b-mod {
    background: rgba(255, 152, 0, 0.3);
}

.band-label.b-grave {
    background: rgba(244, 67, 54, 0.3);
}

.result-text {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 20px;
    font-weight: 300;
}

/* ============ SUBSCALES ============ */

.result-subscales {
    margin: 30px 0;
}

.subscale {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.subscale h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 600;
}

.subscale-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.subscale-fill {
    height: 100%;
    background: var(--accent-primary);
}

.subscale p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.subscale-desc {
    margin-top: 8px !important;
    font-size: 12px !important;
    font-style: italic;
}

/* ============ ABOUT ============ */

.about-scale {
    background: var(--accent-light);
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.about-scale h4 {
    margin-top: 0;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 600;
}

.about-scale p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ============ ACTIONS ============ */

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.result-actions a,
.result-actions button {
    flex: 1;
}

@media(max-width: 600px) {
    .result-actions {
        flex-direction: column;
    }
}

/* ============ ALERTS ============ */

.alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.alert.danger {
    background: #f8d7da;
    border-color: var(--alert-danger);
    color: #721c24;
}

/* ============ MUTED TEXT ============ */

.muted {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ REVEAL ANIMATION ============ */

.reveal {
    animation: revealUp 0.6s ease-out backwards;
}

.reveal[data-delay="1"] {
    animation-delay: 0.15s;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
