/* Stress Level Calculator Styles */
/* Theme: Calming Blue - soothing, professional */

.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;
}

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

/* Hero Section */
.calculator-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 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;
}

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

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

/* PSS Highlights */
.pss-highlights {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

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

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

.highlight-item strong {
    display: block;
    color: #1e40af;
    margin-bottom: 4px;
}

.highlight-item p {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

/* Privacy Notice */
.privacy-notice {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    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: #1d4ed8;
    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: #1e40af;
    margin-top: 0;
    margin-bottom: 10px;
}

.form-instructions {
    color: #666;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* Question Groups */
.question-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.question-group:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

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

.question-number {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9em;
    flex-shrink: 0;
}

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

/* Options Row */
.options-row {
    display: flex;
    gap: 10px;
}

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

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

.option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.2s ease;
    text-align: center;
}

.option-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 4px;
}

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

.option-label input:checked + .option-box {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.option-label:hover .option-box {
    border-color: #60a5fa;
    background: #eff6ff;
}

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

.submit-btn {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    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(30, 64, 175, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 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 #3b82f6;
}

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

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

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 4px solid #3b82f6;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

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

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

.score-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* Severity Badge */
.severity-badge {
    text-align: center;
    margin: 20px 0;
}

.severity-badge #severity-text {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1em;
}

.severity-badge.low #severity-text {
    background: #dcfce7;
    color: #166534;
}

.severity-badge.moderate #severity-text {
    background: #fef3c7;
    color: #92400e;
}

.severity-badge.high #severity-text {
    background: #fee2e2;
    color: #991b1b;
}

/* 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: #fffbeb;
    border-left: 4px solid #f59e0b;
}

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

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

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

/* Stress Components */
.stress-components {
    margin: 25px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
}

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

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

.component-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.component-label {
    font-weight: 500;
    color: #333;
}

.component-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.component-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    transition: width 0.5s ease;
}

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

.component-score {
    font-weight: 600;
    color: #666;
    min-width: 50px;
    text-align: right;
}

.components-note {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* Recommendations */
.recommendations {
    margin: 25px 0;
    padding: 20px;
    background: #eff6ff;
    border-radius: 10px;
}

.recommendations h4 {
    color: #1e40af;
    margin-top: 0;
}

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

.recommendations li {
    margin-bottom: 8px;
}

/* 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: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.chart-row.high {
    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: #1e40af;
    border: 2px solid #1e40af;
    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: #1e40af;
    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: #1e40af;
    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, #1e40af, #3b82f6);
    color: white;
}

.tab-content {
    display: none;
}

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

.tab-content h3 {
    color: #1e40af;
    margin-top: 0;
}

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

.tab-content h5 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 8px;
}

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

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

/* Strategy Cards */
.strategy-card {
    background: #f9fafb;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #3b82f6;
}

.strategy-card h5 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1e40af;
}

.strategy-card p {
    margin: 0;
    font-size: 0.95em;
}

/* Warning Box */
.warning-box {
    background: #fef3c7;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #f59e0b;
}

.warning-box p {
    margin: 0;
    font-size: 0.95em;
}

/* Citation Box */
.citation-box {
    background: #f3f4f6;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.citation-box h5 {
    margin-top: 0;
    margin-bottom: 8px;
}

.citation-box p {
    margin: 0;
    font-size: 0.95em;
    font-style: italic;
}

/* 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: #1e40af;
    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: #3b82f6;
}

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

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

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

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

.related-calculators h2 {
    color: #1e40af;
    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: #1e40af;
    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: #1e40af;
    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: #3b82f6;
    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) {
    .stress-calculator-container {
        padding: 15px;
    }

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

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

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

    .highlight-item {
        flex-direction: column;
        text-align: center;
    }

    .options-row {
        flex-wrap: wrap;
    }

    .option-label {
        flex: 0 0 calc(33.33% - 7px);
    }

    .option-box {
        padding: 10px 5px;
    }

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

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

    .component-score {
        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(50% - 5px);
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

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

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