/* ================================================
   ANAMNESE TRATAMENTO - MVI Saúde
   Baseado no layout OCEA Supplements
   ================================================ */

:root {
    --primary-color: #007c8c;
    --secondary-color: #005a66;
    --accent-color: #00a5b5;
    --neutral-bg: #F7F4EF;
    --text-dark: #2c2c2c;
    --light-bg: #e0f7fa;
    --error-color: #D9534F;
    --success-color: #5CB85C;
    --warning-color: #F0AD4E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--neutral-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ================================================
   HEADER
   ================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo styles moved to /css/header-home.css */

.user-greeting {
    color: white;
    font-size: 0.95rem;
    margin-right: 1rem;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* ================================================
   IMAGEM DE CAPA
   ================================================ */
.cover-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    margin-top: 60px;
}

@media (min-width: 1024px) {
    .cover-image {
        height: 220px;
    }
}

/* ================================================
   BARRA DE PROGRESSO
   ================================================ */
.progress-container {
    background: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.progress-wrapper {
    position: relative;
    height: 12px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: visible;
}

.progress-bar-custom {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-thumb {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ================================================
   SEÇÃO DO QUESTIONÁRIO
   ================================================ */
.questionnaire-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.section-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

/* ================================================
   BLOCOS DE PERGUNTAS
   ================================================ */
.question-block {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.question-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
}

/* Sub-perguntas condicionais */
.sub-question {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    margin-left: 1rem;
    border-left: 3px solid var(--primary-color);
    display: none;
}

.sub-question.visible {
    display: block;
}

.sub-question .question-text {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* ================================================
   FORM TABLE LAYOUT (Estilo Purissima)
   ================================================ */
.form-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.form-row:last-child {
    border-bottom: none;
}

.form-row:hover {
    background: #f8f9fa;
}

.form-row.error {
    background: #fff5f5;
    border-left: 4px solid var(--error-color);
}

.form-label-col {
    flex: 0 0 35%;
    padding: 1.5rem;
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    border-right: 1px solid #e9ecef;
}

.form-input-col {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-input-col input[type="text"],
.form-input-col input[type="number"],
.form-input-col select,
.form-input-col textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input-col textarea {
    max-width: 100%;
    resize: vertical;
    min-height: 100px;
}

.form-input-col input.invalid,
.form-input-col textarea.invalid {
    border-color: var(--error-color);
}

.form-input-col input:focus,
.form-input-col select:focus,
.form-input-col textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 140, 0.1);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ================================================
   RADIO BUTTONS
   ================================================ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-inline {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-option {
    background: var(--neutral-bg);
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.radio-option:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.radio-option.selected {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.radio-option label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

.radio-inline label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.radio-inline input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

/* ================================================
   CHECKBOXES
   ================================================ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group.multi-column {
    flex-direction: row;
    flex-wrap: wrap;
}

.checkbox-option {
    background: var(--neutral-bg);
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.checkbox-option:hover {
    border-color: var(--accent-color);
}

.checkbox-option.selected {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.checkbox-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.checkbox-option.exclusive.selected {
    border-color: var(--success-color);
    background: #e8f5e9;
}

.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.checkbox-option label {
    cursor: pointer;
    font-size: 0.95rem;
    flex: 1;
}

/* Separador de categoria */
.category-separator {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-separator:first-child {
    margin-top: 0;
}

/* ================================================
   IMC DISPLAY
   ================================================ */
.imc-display {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, #b2ebf2 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.imc-display h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.imc-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.imc-category {
    font-size: 1rem;
    color: #666;
}

/* ================================================
   BOTÕES DE NAVEGAÇÃO
   ================================================ */
.navigation-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 3rem 0;
    gap: 0.66rem;
}

.btn-next {
    background: var(--primary-color);
    color: #FFFFFF;
    padding: 16px 48px;
    border-radius: 50px;
    border: none;
    font-family: 'Open Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    max-width: 600px;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 124, 140, 0.3);
    white-space: nowrap;
}

.btn-next:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 16px rgba(0, 124, 140, 0.4);
}

.btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-next .btn-text-bold {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-next .btn-text-normal {
    font-weight: 400;
    text-transform: uppercase;
}

.btn-prev {
    background: none;
    border: none;
    color: #2c2c2c;
    font-family: 'Open Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.btn-prev:hover {
    color: var(--primary-color);
}

.btn-prev::before {
    content: "‹";
    font-size: 1.2rem;
    font-weight: bold;
}

/* ================================================
   CATEGORIAS DE PERGUNTAS
   ================================================ */
.category-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-header:first-of-type {
    margin-top: 0;
}

/* ================================================
   TEXTAREA
   ================================================ */
.textarea-wrapper {
    width: 100%;
}

.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 140, 0.1);
}

/* ================================================
   BLOCOS CONDICIONAIS
   ================================================ */
.conditional-block {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   PÁGINA NÃO RECOMENDADO
   ================================================ */
.not-recommended-section {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.not-recommended-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.not-recommended-icon {
    font-size: 5rem;
    color: var(--warning-color);
    margin-bottom: 1.5rem;
}

.not-recommended-title {
    color: var(--error-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.not-recommended-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.reason-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.reason-box h3 {
    color: #856404;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.reason-box p {
    color: #856404;
    font-size: 1rem;
    margin: 0;
}

.not-recommended-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-voltar:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 30px;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-dashboard:hover {
    background: var(--primary-color);
    color: white;
}

.contact-info {
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.contact-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 24px;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background: #128c7e;
    color: white;
}

/* ================================================
   PÁGINA DE SUCESSO
   ================================================ */
.success-section {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.success-title {
    color: var(--success-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.success-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.next-steps {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.next-steps h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.next-steps li:last-child {
    border-bottom: none;
}

.next-steps li i {
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.success-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 16px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 124, 140, 0.3);
}

.btn-primary-action:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 30px;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary-action:hover {
    background: var(--primary-color);
    color: white;
}

/* ================================================
   RESPONSIVIDADE
   ================================================ */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.4rem;
    }

    .question-block {
        padding: 1.25rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-label-col {
        flex: 1;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .form-input-col input,
    .form-input-col textarea {
        max-width: 100%;
    }

    .radio-inline {
        flex-direction: column;
        gap: 0.75rem;
    }

    .navigation-buttons {
        margin: 2rem 0;
    }

    .btn-next {
        font-size: 14px;
        padding: 14px 32px;
        width: 100%;
        max-width: 100%;
    }

    .btn-prev {
        font-size: 14px;
    }

    .cover-image {
        height: 150px;
    }

    .sub-question {
        margin-left: 0;
    }

    .not-recommended-section,
    .success-section {
        padding-top: 70px;
    }

    .not-recommended-content,
    .success-content {
        padding: 1.5rem;
    }

    .not-recommended-title,
    .success-title {
        font-size: 1.5rem;
    }

    .not-recommended-icon,
    .success-icon {
        font-size: 4rem;
    }

    .next-steps {
        padding: 1.25rem;
    }
}
