/* QAC - Questionário de Acompanhamento Clínico v2.0.0 */
/* Estética em tons terrosos e elegantes */

.qac-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background-color: #FAF8F5;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.qac-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #D2B48C;
}

.qac-header h2 {
    color: #5D4037;
    margin-bottom: 10px;
}

.qac-header p {
    color: #6D4C41;
    font-size: 14px;
}

/* Barra de Progresso */
.qac-progress {
    background-color: #E8E0D5;
    border-radius: 20px;
    height: 25px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.qac-progress-bar {
    background: linear-gradient(90deg, #8B4513, #D2691E);
    height: 100%;
    width: 0%;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.qac-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5D4037;
    font-weight: bold;
    font-size: 12px;
}

/* Seções */
.qac-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.qac-section-active {
    display: block;
}

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

.qac-section h3 {
    color: #5D4037;
    border-bottom: 2px solid #D2B48C;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.qac-instrucoes {
    background-color: #F5F0E8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
    margin-bottom: 25px;
    color: #5D4037;
    font-style: italic;
}

/* Campos de Texto */
.qac-field {
    margin-bottom: 20px;
}

.qac-field label {
    display: block;
    color: #5D4037;
    font-weight: 600;
    margin-bottom: 8px;
}

.qac-field input[type="text"],
.qac-field input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D2B48C;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.qac-field input[type="text"]:focus,
.qac-field input[type="email"]:focus {
    border-color: #8B4513;
    outline: none;
}

/* Questões */
.qac-question {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #E8E0D5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.qac-question-text {
    color: #5D4037;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

.qac-exemplo {
    font-size: 13px;
    color: #6B4423;
    margin: 5px 0 10px 0;
    padding: 8px 12px;
    background-color: #F5F0E8;
    border-left: 3px solid #D2B48C;
    border-radius: 0 4px 4px 0;
}

.qac-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qac-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #F5F0E8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1 1 auto;
    min-width: 120px;
}

.qac-option:hover {
    background-color: #E8DED0;
}

.qac-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #8B4513;
}

.qac-option input[type="radio"]:checked + span,
.qac-option:has(input[type="radio"]:checked) {
    background-color: #D2B48C;
    color: #3E2723;
}

/* Navegação */
.qac-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #E8E0D5;
}

.qac-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qac-btn-prev {
    background-color: #E8E0D5;
    color: #5D4037;
}

.qac-btn-prev:hover {
    background-color: #D2B48C;
}

.qac-btn-next,
.qac-btn-submit {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

.qac-btn-next:hover,
.qac-btn-submit:hover {
    background: linear-gradient(135deg, #6D3610, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.3);
}

/* Resultados */
.qac-results {
    padding: 20px;
}

.qac-results-content h2 {
    color: #5D4037;
    text-align: center;
    margin-bottom: 20px;
}

.qac-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.qac-result-card {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #E8E0D5;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qac-result-card h4 {
    color: #8B4513;
    margin-bottom: 10px;
}

.qac-score {
    font-size: 28px;
    font-weight: bold;
    color: #5D4037;
    margin: 10px 0;
}

.qac-gravidade {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #D2B48C;
    color: #3E2723;
    font-weight: 600;
    margin-bottom: 10px;
}

.qac-results-note {
    text-align: center;
    color: #6D4C41;
    margin: 20px 0;
    padding: 15px;
    background-color: #F5F0E8;
    border-radius: 8px;
}

/* Responsivo */
@media (max-width: 600px) {
    .qac-container {
        margin: 10px;
        padding: 15px;
    }
    
    .qac-options {
        flex-direction: column;
    }
    
    .qac-option {
        width: 100%;
    }
    
    .qac-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .qac-btn {
        width: 100%;
    }
    
    .qac-results-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------
   Módulo "Seu Tratamento Desde a Última Consulta"
   ------------------------------------------------------------------ */
.qac-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px 16px;
    margin: 10px 0 14px 0;
}

.qac-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #FDFBF7;
    border: 1px solid #E8E0D5;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.qac-checkbox:hover {
    background-color: #F5F1EB;
    border-color: #D2B48C;
}

.qac-checkbox input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    accent-color: #8B4513;
}

.qac-question textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #D2B48C;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background-color: #FDFBF7;
    resize: vertical;
    margin-top: 6px;
}

.qac-question textarea:focus {
    outline: none;
    border-color: #8B4513;
    background-color: #fff;
}

.qac-question textarea::placeholder {
    color: #B0A088;
    font-style: italic;
}

@media (max-width: 600px) {
    .qac-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------
   Pergunta pendente: destaque e aviso local
   ------------------------------------------------------------------ */
.qac-question.qac-question-erro {
    border-color: #A52A2A;
    border-width: 2px;
    background-color: #FFF8F7;
    box-shadow: 0 2px 8px rgba(165, 42, 42, 0.12);
}

.qac-erro-msg {
    margin: 0 0 10px 0;
    padding: 6px 10px;
    background-color: #FADBD8;
    border-left: 3px solid #A52A2A;
    border-radius: 0 4px 4px 0;
    color: #A52A2A;
    font-size: 13px;
    font-weight: 600;
}

.qac-field .qac-erro-msg {
    margin-bottom: 6px;
}
