/* Financial Stress Calculator Styles */
/* Theme: Calm Green - professional but reassuring */

.financial-stress-calculator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
    line-height: 1.6;
}

.financial-stress-calculator-container * {
    box-sizing: border-box;
}

/* Hero Section */
.calculator-hero {
    background: linear-gradient(135deg, #065f46 0%, #059669 50%, #10b981 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(6, 95, 70, 0.3);
}

.calculator-hero h1 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.15em;
    opacity: 0.95;
    margin-bottom: 20px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-badges .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-icon {
    font-weight: bold;
}

/* Introduction Section */
.intro-section {
    background: #ecfdf5;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #10b981;
}

.intro-section h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Stress Factors Grid */
.stress-factors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.factor-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.factor-icon {
    font-size: 1.8em;
}

.factor-item strong {
    display: block;
    color: #065f46;
    margin-bottom: 2px;
}

.factor-item span {
    font-size: 0.85em;
    color: #666;
}

/* Privacy Notice */
.privacy-notice {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}

.privacy-icon {
    font-size: 1.5em;
}

.privacy-notice strong {
    color: #047857;
    display: block;
}

.privacy-notice p {
    margin: 4px 0 0 0;
    font-size: 0.9em;
    color: #555;
}

/* Form Section */
.calculator-form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.calculator-form-section h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 10px;
}

.form-instructions {
    color: #666;
    margin-bottom: 25px;
}

/* Dimension Sections */
.dimension-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.dimension-section:last-of-type {
    border-bottom: none;
}

.dimension-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 8px;
}

.dimension-header .dim-icon {
    font-size: 1.5em;
}

.dimension-header h3 {
    margin: 0;
    color: #065f46;
    font-size: 1.1em;
}

/* Question Groups */
.question-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.question-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.question-number {
    background: linear-gradient(135deg, #065f46, #059669);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85em;
    flex-shrink: 0;
}

.question-text {
    margin: 0;
    font-size: 0.95em;
    color: #333;
    padding-top: 3px;
}

/* Options Row */
.options-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.option-label {
    flex: 1;
    cursor: pointer;
    text-align: center;
}

.option-label input {
    position: absolute;
    opacity: 0;
}

.option-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 6px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}

.option-value {
    font-weight: 600;
    color: #059669;
}

.option-text {
    font-size: 0.7em;
    color: #666;
    display: block;
    line-height: 1.2;
}

.option-label input:checked + .option-circle {
    border-color: #059669;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.option-label:hover .option-circle {
    border-color: #10b981;
}

/* Submit Button */
.form-submit {
    margin-top: 30px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, #065f46, #059669);
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 95, 70, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 95, 70, 0.4);
}

/* Results Section */
.results-section {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border-top: 4px solid #10b981;
}

.results-section h2 {
    text-align: center;
    color: #065f46;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Overall Score Display */
.overall-score-display {
    margin-bottom: 30px;
    text-align: center;
}

.score-meter {
    height: 30px;
    background: linear-gradient(to right, #22c55e 0%, #eab308 33%, #f97316 66%, #ef4444 100%);
    border-radius: 15px;
    position: relative;
    margin-bottom: 10px;
}

.meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.5s ease;
}

.meter-marker {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 40px;
    background: white;
    border: 3px solid #333;
    border-radius: 10px;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: left 0.5s ease;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 20px;
}

.score-result {
    margin-top: 15px;
}

.score-value {
    display: block;
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
}

.score-value.low {
    color: #22c55e;
}

.score-value.moderate {
    color: #eab308;
}

.score-value.high {
    color: #f97316;
}

.score-value.severe {
    color: #ef4444;
}

.score-label {
    display: block;
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 8px;
}

/* Dimension Breakdown */
.dimension-breakdown {
    margin: 25px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
}

.dimension-breakdown h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

.breakdown-grid {
    display: grid;
    gap: 15px;
}

.breakdown-item {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.breakdown-icon {
    font-size: 1.3em;
}

.breakdown-name {
    font-weight: 500;
    color: #333;
}

.breakdown-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.breakdown-fill.low {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.breakdown-fill.moderate {
    background: linear-gradient(135deg, #eab308, #facc15);
}

.breakdown-fill.high {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.breakdown-fill.severe {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.breakdown-level {
    font-size: 0.85em;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

.breakdown-level.low {
    color: #16a34a;
}

.breakdown-level.moderate {
    color: #ca8a04;
}

.breakdown-level.high {
    color: #ea580c;
}

.breakdown-level.severe {
    color: #dc2626;
}

/* Result Interpretation */
.result-interpretation {
    margin: 25px 0;
    padding: 20px;
    border-radius: 10px;
}

.result-interpretation.low {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.result-interpretation.moderate {
    background: #fefce8;
    border-left: 4px solid #eab308;
}

.result-interpretation.high {
    background: #fff7ed;
    border-left: 4px solid #f97316;
}

.result-interpretation.severe {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.result-interpretation h4 {
    margin-top: 0;
    color: #333;
}

.result-interpretation ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Action Steps */
.action-steps {
    margin: 25px 0;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 10px;
}

.action-steps h4 {
    color: #065f46;
    margin-top: 0;
}

.action-steps ul {
    margin: 10px 0;
    padding-left: 20px;
}

.action-steps li {
    margin-bottom: 8px;
}

/* Resources Section */
.resources-section {
    margin: 25px 0;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #86efac;
}

.resources-section h4 {
    color: #065f46;
    margin-top: 0;
}

.resources-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.resources-section a {
    color: #059669;
    text-decoration: none;
}

.resources-section a:hover {
    text-decoration: underline;
}

/* Score Chart */
.score-chart {
    margin: 25px 0;
}

.score-chart h4 {
    color: #333;
    margin-bottom: 15px;
}

.chart-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    align-items: center;
    transition: all 0.3s ease;
}

.chart-row.low {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.chart-row.moderate {
    background: #fefce8;
    border-left: 4px solid #eab308;
}

.chart-row.high {
    background: #fff7ed;
    border-left: 4px solid #f97316;
}

.chart-row.severe {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.chart-row.highlight {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-range {
    font-weight: 600;
    color: #333;
}

.chart-level {
    font-weight: 500;
}

.chart-desc {
    font-size: 0.9em;
    color: #666;
}

/* Retake Section */
.retake-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.retake-btn {
    background: white;
    color: #065f46;
    border: 2px solid #065f46;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.retake-btn:hover {
    background: #065f46;
    color: white;
}

.retake-section p {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0 0 0;
}

/* Education Section */
.education-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.education-section > h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Tabs */
.education-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 15px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f3f4f6;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e5e7eb;
}

.tab-btn.active {
    background: linear-gradient(135deg, #065f46, #059669);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #065f46;
    margin-top: 0;
}

.tab-content h4 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 10px;
}

.tab-content ul {
    margin: 10px 0 15px 0;
    padding-left: 25px;
}

.tab-content li {
    margin-bottom: 8px;
}

.tab-content a {
    color: #059669;
    text-decoration: none;
}

.tab-content a:hover {
    text-decoration: underline;
}

/* Stat Box */
.stat-box {
    background: #ecfdf5;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #10b981;
}

.stat-box p {
    margin: 0;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.faq-section h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 20px;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #059669;
}

.faq-icon {
    font-size: 1.5em;
    color: #10b981;
    font-weight: 300;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 0 20px 0;
    color: #555;
}

.faq-answer p {
    margin: 0;
}

/* Related Calculators */
.related-calculators {
    background: #ecfdf5;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.related-calculators h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.related-name {
    font-weight: 600;
    color: #065f46;
    margin-bottom: 5px;
}

.related-desc {
    font-size: 0.85em;
    color: #666;
}

/* Sources Section */
.sources-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.sources-section h2 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 20px;
}

.sources-list ul {
    margin: 0;
    padding-left: 20px;
}

.sources-list li {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.95em;
}

.sources-list a {
    color: #059669;
    text-decoration: none;
}

.sources-list a:hover {
    text-decoration: underline;
}

/* Disclaimer Section */
.disclaimer-section {
    background: #fef3c7;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.disclaimer-section h3 {
    color: #92400e;
    margin-top: 0;
    margin-bottom: 15px;
}

.disclaimer-section p {
    margin: 0 0 10px 0;
    color: #78350f;
    font-size: 0.95em;
}

.disclaimer-section p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .financial-stress-calculator-container {
        padding: 15px;
    }

    .calculator-hero {
        padding: 30px 20px;
    }

    .calculator-hero h1 {
        font-size: 1.7em;
    }

    .stress-factors {
        grid-template-columns: 1fr;
    }

    .intro-section,
    .calculator-form-section,
    .results-section,
    .education-section,
    .faq-section,
    .related-calculators,
    .sources-section,
    .disclaimer-section {
        padding: 20px;
    }

    .options-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .option-label {
        flex: 0 0 calc(20% - 5px);
    }

    .option-circle {
        width: 35px;
        height: 35px;
    }

    .option-text {
        font-size: 0.6em;
    }

    .breakdown-item {
        grid-template-columns: auto 1fr;
        gap: 8px;
    }

    .breakdown-bar {
        grid-column: 1 / -1;
    }

    .breakdown-level {
        text-align: left;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .education-tabs {
        justify-content: center;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .calculator-hero h1 {
        font-size: 1.4em;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .option-label {
        flex: 0 0 calc(33% - 5px);
    }

    .score-value {
        font-size: 2.5em;
    }

    .submit-btn {
        width: 100%;
        padding: 14px 20px;
    }
}
