/* ===== CALORIE CALCULATOR PAGE STYLES ===== */

/* ===== WIZARD HERO (inline above step indicator) ===== */
.wizard-hero {
    text-align: center;
    padding: var(--spacing-md) 0;
}
.wizard-hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #264653;
    margin-bottom: 8px;
    line-height: 1.3;
}
.wizard-hero-tagline {
    font-size: 16px;
    color: #6B7A86;
    max-width: 600px;
    margin: 0 auto;
}
.wizard-hero-citation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 16px;
    line-height: 1;
    color: #7FB069;
    text-decoration: none;
    vertical-align: middle;
    margin-left: 2px;
}
.wizard-hero-citation:hover {
    color: #5A8A4C;
}

/* ===== WIZARD CONTAINER ===== */
.wizard-container {
    min-height: 80vh;
    padding: var(--spacing-lg) 0 0;
    background-color: var(--background);
}

.wizard-content {
    max-width: 680px;
}

/* ===== STEP PROGRESS INDICATOR ===== */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px;
    margin-bottom: var(--spacing-md);
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    background: #E9ECEF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #A5B3BE;
    flex-shrink: 0;
}

.step-dot.active {
    background: #7FB069;
    color: #FFFFFF;
}

.step-line {
    width: 20px;
    height: 2px;
    background: #E9ECEF;
    margin: 0 3px;
    flex-shrink: 0;
}

.step-line.active {
    background: #7FB069;
}

/* ===== STEP CARDS ===== */
.step-card {
    background: white;
    border-radius: var(--radius-card);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.step-title {
    font-size: 28px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 8px;
    text-align: center;
}

.step-subtitle {
    font-size: 16px;
    color: #6B7A86;
    margin-bottom: 32px;
    text-align: center;
}

.sources-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #7FB069;
    text-decoration: underline;
    margin-bottom: 16px;
    cursor: pointer;
}

.sources-link:hover {
    color: #5A8A4C;
}

/* ===== FORM INPUTS ===== */
.input-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #264653;
    margin-bottom: 8px;
}

.calc-input {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    color: #264653;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    font-family: var(--font-family);
}

.calc-input:focus {
    border-color: #7FB069;
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.1);
}

.calc-input::placeholder {
    color: #A5B3BE;
}

/* ===== SEGMENTED CONTROL ===== */
.segmented-control {
    display: flex;
    background: #F8F9FA;
    border-radius: 12px;
    padding: 4px;
}

.segment-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #6B7A86;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.segment-btn.selected {
    background: #7FB069;
    color: #FFFFFF;
}

.segment-btn:hover:not(.selected) {
    background: rgba(127, 176, 105, 0.1);
}

/* ===== OPTION CARDS ===== */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    background: #FFFFFF;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: #7FB069;
    background: rgba(127, 176, 105, 0.05);
}

.option-card.selected {
    border-color: #7FB069;
    background: #F0F8F0;
}

.option-label {
    font-size: 18px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 4px;
}

.option-card.selected .option-label {
    color: #7FB069;
}

.option-description {
    font-size: 14px;
    color: #6B7A86;
}

.option-examples {
    font-size: 12px;
    color: #A5B3BE;
    font-style: italic;
    margin-top: 4px;
}

/* ===== WIZARD NAVIGATION FOOTER ===== */
.wizard-nav {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #FFFFFF;
    border-top: 1px solid #E9ECEF;
    margin: 0 calc(-1 * var(--spacing-md));
}

.btn-back {
    flex: 1;
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    padding: 16px 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #6B7A86;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #E9ECEF;
}

.btn-next {
    flex: 2;
    background: #7FB069;
    border: none;
    border-radius: 12px;
    padding: 16px 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.btn-next:hover {
    background: #5A8A4C;
}

.btn-next.full-width {
    flex: 1;
}

/* ===== VALIDATION ERROR ===== */
.validation-error {
    background: #FFF5F5;
    border: 1px solid #FC8181;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #C53030;
    text-align: center;
    display: none;
}

.validation-error.visible {
    display: block;
}

/* ===== EDUCATION SECTION ===== */
.education-container {
    min-height: 80vh;
    padding: var(--spacing-lg) 0;
    background-color: var(--background);
}

.education-header {
    text-align: center;
    padding: 20px;
    background: #FFFFFF;
    border-bottom: 1px solid #E9ECEF;
    margin-bottom: 0;
}

.education-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #264653;
}

.education-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    gap: 8px;
}

.education-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #E9ECEF;
    transition: all 0.3s ease;
}

.education-dot.active {
    width: 24px;
    background: #7FB069;
}

.education-card-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.education-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.education-card-title {
    font-size: 24px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 24px;
    text-align: center;
}

.education-card-text {
    font-size: 18px;
    color: #495057;
    line-height: 28px;
    margin-bottom: 8px;
}

.education-card-text strong {
    font-weight: 600;
}

.education-card ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.education-card ul li {
    font-size: 18px;
    color: #495057;
    line-height: 28px;
    padding: 4px 0 4px 16px;
    position: relative;
}

.education-card ul li::before {
    content: "\2022";
    color: #7FB069;
    font-weight: 700;
    position: absolute;
    left: 0;
}

.education-nav {
    max-width: 600px;
    margin: var(--spacing-md) auto 0;
    padding: 0 20px;
    display: flex;
    gap: 12px;
}

.education-sources-link {
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #7FB069;
    cursor: pointer;
    max-width: 600px;
    margin: 0 auto;
}

.education-sources-link:hover {
    color: #5A8A4C;
    text-decoration: underline;
}

/* ===== RESULTS SECTION ===== */
.results-container {
    padding: var(--spacing-lg) 0 var(--spacing-xl);
    background-color: var(--background);
}

.results-content {
    max-width: 680px;
}

/* Plan header */
.plan-header {
    margin-bottom: 24px;
    text-align: center;
}

.plan-title {
    font-size: 28px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 8px;
}

.plan-subtitle {
    font-size: 16px;
    color: #6B7A86;
}

/* Result cards (shared) */
.result-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 16px;
}

/* Metabolism tiles */
.metabolism-tiles {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.metabolism-tile {
    flex: 1;
    background: #F8F9FA;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.metabolism-tile-label {
    font-size: 12px;
    color: #6B7A86;
    margin-bottom: 4px;
}

.metabolism-tile-value {
    font-size: 24px;
    font-weight: 600;
    color: #7FB069;
    margin-bottom: 4px;
}

.metabolism-tile-desc {
    font-size: 11px;
    color: #6B7A86;
}

.results-sources-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #7FB069;
    text-decoration: underline;
    cursor: pointer;
}

.results-sources-link:hover {
    color: #5A8A4C;
}

/* Goal summary rows */
.goal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.goal-label {
    font-size: 14px;
    color: #6B7A86;
}

.goal-value {
    font-size: 14px;
    font-weight: 500;
    color: #264653;
}

/* Goal weight section */
.goal-weight-input {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    color: #264653;
    border: 1px solid #E9ECEF;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    font-family: var(--font-family);
    transition: border-color 0.2s ease;
}

.goal-weight-input:focus {
    border-color: #7FB069;
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.1);
}

.weight-diff-card {
    background: #F0F8F0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}

.weight-diff-text {
    font-size: 16px;
    font-weight: 500;
    color: #7FB069;
}

/* Daily targets title */
.targets-title {
    font-size: 22px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 8px;
}

.targets-subtitle {
    font-size: 16px;
    color: #6B7A86;
    line-height: 24px;
    margin-bottom: 24px;
}

/* Calorie adjustment box */
.calorie-adjustment {
    background: #FFF5E6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.calorie-adjustment-text {
    font-size: 14px;
    font-weight: 500;
    color: #F5A623;
}

.breakdown-toggle {
    display: block;
    margin: 8px auto 0;
    font-size: 13px;
    font-weight: 500;
    color: #7FB069;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-family);
}

.breakdown-toggle:hover {
    color: #5A8A4C;
}

/* Breakdown panel */
.breakdown-panel {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #E9ECEF;
    display: none;
}

.breakdown-panel.visible {
    display: block;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.breakdown-label {
    font-size: 14px;
    color: #6B7A86;
}

.breakdown-value {
    font-size: 14px;
    font-weight: 500;
    color: #264653;
}

.breakdown-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #E9ECEF;
}

.breakdown-total .breakdown-label {
    font-weight: 600;
    color: #264653;
}

.breakdown-total .breakdown-value {
    font-size: 16px;
    font-weight: 600;
    color: #7FB069;
}

/* Results macro tiles */
.results-macro-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.results-macro-tile {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    min-width: calc(33.33% - 8px);
    flex: 1;
}

.results-macro-label {
    font-size: 14px;
    color: #6B7A86;
    margin-bottom: 4px;
}

.results-macro-value {
    font-size: 20px;
    font-weight: 600;
    color: #264653;
}

.results-macro-value.calories {
    color: #7FB069;
}

.results-macro-desc {
    font-size: 12px;
    color: #6B7A86;
    margin-top: 2px;
}

.results-note {
    font-size: 14px;
    color: #6B7A86;
    font-style: italic;
    text-align: center;
}

/* ===== RESULTS CTA ===== */
.results-cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-card);
    padding: var(--spacing-xl);
    text-align: center;
    color: white;
    margin-top: var(--spacing-lg);
}

.results-cta-card h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.results-cta-card p {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
}

.results-cta-card .email-form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto var(--spacing-sm);
}

.results-cta-card .email-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-button);
    font-size: 16px;
    outline: none;
}

.results-cta-card .email-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.results-cta-card .btn-primary {
    background-color: white;
    color: var(--primary);
}

.results-cta-card .btn-primary:hover {
    background-color: var(--background);
    color: var(--primary-dark);
}

.results-cta-card .cta-subtext {
    font-size: 14px;
    opacity: 0.9;
}

.results-cross-link {
    text-align: center;
    margin-top: var(--spacing-md);
}

.results-cross-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.results-cross-link a:hover {
    text-decoration: underline;
}

/* ===== SOURCES MODAL ===== */
.sources-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.sources-modal-overlay.visible {
    display: flex;
}

.sources-modal {
    background: #FAFBFC;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.sources-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid #E9ECEF;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sources-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #264653;
}

.sources-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #264653;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.sources-modal-close:hover {
    color: #6B7A86;
}

.sources-modal-body {
    padding: 20px;
}

.sources-disclaimer {
    background: #F0F8F0;
    border-left: 3px solid #7FB069;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.sources-disclaimer-icon {
    color: #5A8C4C;
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.sources-disclaimer-text {
    font-size: 14px;
    color: #264653;
    line-height: 20px;
}

.source-card {
    background: #FFFFFF;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.source-category {
    font-size: 16px;
    font-weight: 600;
    color: #264653;
    margin-bottom: 6px;
}

.source-description {
    font-size: 14px;
    color: #6B7A86;
    line-height: 20px;
    margin-bottom: 8px;
}

.source-citation {
    font-size: 12px;
    color: #8E9BAA;
    line-height: 18px;
    font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wizard-container,
    .education-container,
    .results-container {
        padding: var(--spacing-lg) 0;
    }

    .step-title {
        font-size: 24px;
    }

    .plan-title {
        font-size: 24px;
    }

    .targets-title {
        font-size: 20px;
    }

    .metabolism-tiles {
        flex-direction: column;
    }

    .results-macro-grid {
        gap: 8px;
    }

    .results-macro-tile {
        min-width: calc(50% - 4px);
    }

    .wizard-nav {
        flex-direction: column;
    }

    .btn-next.full-width {
        flex: 1;
    }

    .results-cta-card {
        padding: var(--spacing-lg);
    }

    .results-cta-card h2 {
        font-size: 28px;
    }

    .results-cta-card .email-form {
        flex-direction: column;
    }

    .step-dot {
        width: 24px;
        height: 24px;
        border-radius: 12px;
        font-size: 11px;
    }

    .step-line {
        width: 14px;
    }
}

@media (max-width: 480px) {
    .wizard-hero-title {
        font-size: 26px;
    }

    .step-title {
        font-size: 20px;
    }

    .step-card {
        padding: var(--spacing-md);
    }

    .option-label {
        font-size: 16px;
    }

    .option-card {
        padding: 16px;
    }

    .plan-title {
        font-size: 22px;
    }

    .result-card {
        padding: 20px;
    }

    .metabolism-tile-value {
        font-size: 20px;
    }

    .results-macro-tile {
        min-width: calc(50% - 4px);
        padding: 12px;
    }

    .results-macro-value {
        font-size: 18px;
    }

    .education-card {
        padding: 24px;
    }

    .education-card-title {
        font-size: 20px;
    }

    .education-card-text {
        font-size: 16px;
        line-height: 24px;
    }

    .step-dot {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .step-line {
        width: 10px;
    }
}
