/* Fagerstrom Nicotine Dependence Test Styles */
/* Color theme: Amber (#d97706, gradient to #b45309) */

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.fagerstrom-hero {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

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

.fagerstrom-hero .hero-subtitle {
    font-size: 1.1em;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

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

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 25px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #d97706;
}

.stat-card .stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
}

/* ============================================
   PRIVACY NOTICE
   ============================================ */
.privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #d97706;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

.privacy-icon {
    font-size: 1.8em;
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-notice strong {
    display: block;
    color: #92400e;
    margin-bottom: 5px;
    font-size: 1.05em;
}

.privacy-notice p {
    margin: 0;
    color: #78350f;
    font-size: 0.95em;
}

/* ============================================
   CALCULATOR FORM
   ============================================ */
.calculator-form-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.calculator-form-section h2 {
    color: #b45309;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #d97706;
    font-size: 1.5em;
}

.form-instruction {
    font-size: 1.05em;
    color: #555;
    margin-bottom: 25px;
    padding: 15px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid #d97706;
}

/* Progress Bar (injected by shared.js) */
.mdcv2-progress-wrapper {
    margin-bottom: 25px;
    padding: 15px;
    background: #fffbeb;
    border-radius: 8px;
}

.mdcv2-progress-text {
    font-size: 0.9em;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 8px;
}

.mdcv2-progress-bar {
    width: 100%;
    height: 10px;
    background: #fde68a;
    border-radius: 5px;
    overflow: hidden;
}

.mdcv2-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d97706, #b45309);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Questions */
.question {
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.question:hover {
    border-color: #d97706;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
}

.question.answered {
    border-color: #d97706;
    background: #fffbeb;
}

.question-text {
    font-weight: 600;
    font-size: 1.05em;
    margin: 0 0 12px 0;
    color: #333;
}

.q-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #d97706;
    color: white;
    border-radius: 50%;
    font-size: 0.85em;
    margin-right: 10px;
    font-weight: 700;
}

/* Radio Options */
.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 38px;
}

.options label {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.options label:hover {
    border-color: #d97706;
    background: #fffbeb;
}

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

.options input[type="radio"]:checked + span {
    color: #b45309;
    font-weight: 600;
}

.options label:has(input:checked) {
    border-color: #d97706;
    background: #fef3c7;
}

/* Submit Button */
.submit-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0 auto;
    padding: 16px 30px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

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

.submit-btn:active {
    transform: translateY(0);
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #d97706;
}

.results-section h2 {
    text-align: center;
    color: #b45309;
    margin-top: 0;
    font-size: 1.6em;
}

/* Score Display */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
}

.score-circle {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.35);
}

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

.score-max {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Level Badge */
.level-badge {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.15em;
    text-align: center;
}

.level-badge.level-very-low {
    background: #d1fae5;
    color: #065f46;
}

.level-badge.level-low {
    background: #ecfccb;
    color: #3f6212;
}

.level-badge.level-medium {
    background: #fef9c3;
    color: #854d0e;
}

.level-badge.level-high {
    background: #ffedd5;
    color: #c2410c;
}

.level-badge.level-very-high {
    background: #fee2e2;
    color: #991b1b;
}

/* Interpretation Card */
.interpretation-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.interpretation-card h3 {
    color: #b45309;
    margin-top: 0;
}

.interpretation-card p {
    margin: 10px 0;
    line-height: 1.7;
}

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

.interpretation-card li {
    margin-bottom: 6px;
}

/* Dependence Level Cards */
.level-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.level-item {
    text-align: center;
    padding: 12px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.level-item.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.level-item.lv-very-low {
    background: #d1fae5;
    color: #065f46;
}

.level-item.lv-low {
    background: #ecfccb;
    color: #3f6212;
}

.level-item.lv-medium {
    background: #fef9c3;
    color: #854d0e;
}

.level-item.lv-high {
    background: #ffedd5;
    color: #c2410c;
}

.level-item.lv-very-high {
    background: #fee2e2;
    color: #991b1b;
}

.level-item .level-range {
    display: block;
    font-size: 1.2em;
    margin-bottom: 3px;
}

.level-item .level-name {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
}

/* ============================================
   QUIT RESOURCES
   ============================================ */
.quit-resources {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.quit-resources h3 {
    color: #b45309;
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
}

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

.resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.resource-card:hover {
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.resource-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.resource-card strong {
    color: #b45309;
    font-size: 1.05em;
    margin-bottom: 4px;
}

.resource-card span:last-child {
    font-size: 0.85em;
    color: #666;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    border: 2px solid #d97706;
    background: white;
    color: #b45309;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #d97706;
    color: white;
}

/* ============================================
   HISTORY SECTION
   ============================================ */
.mdcv2-history-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.mdcv2-history-section h3 {
    color: #b45309;
    margin-top: 0;
    font-size: 1.2em;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid #d97706;
}

.history-date {
    font-size: 0.9em;
    color: #92400e;
    font-weight: 500;
}

.history-result {
    font-weight: 600;
    color: #b45309;
}

.mdcv2-clear-history {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid #d97706;
    color: #b45309;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.mdcv2-clear-history:hover {
    background: #fef3c7;
}

/* Retake Button */
.retake-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0 auto;
    padding: 14px 25px;
    background: transparent;
    border: 2px solid #d97706;
    color: #b45309;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* ============================================
   EDUCATION TABS
   ============================================ */
.calc-education {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.education-tabs {
    display: flex;
    flex-wrap: wrap;
    background: #f5f5f5;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95em;
    color: #666;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    background: #fffbeb;
    color: #b45309;
}

.tab-btn.active {
    background: white;
    color: #b45309;
    font-weight: 600;
    border-bottom-color: #d97706;
}

.tab-content {
    display: none;
    padding: 30px;
}

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

.tab-content h4 {
    color: #b45309;
    margin-top: 0;
    font-size: 1.3em;
}

.tab-content h5 {
    color: #92400e;
    margin-top: 25px;
    font-size: 1.1em;
}

.tab-content h6 {
    color: #b45309;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
}

/* Info Grid (used in tabs) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-card {
    background: #fffbeb;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #d97706;
}

.info-card h6 {
    color: #b45309;
    margin-top: 0;
}

.info-card ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.info-card li {
    margin-bottom: 6px;
}

/* Timeline */
.timeline {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 3px solid #d97706;
}

.timeline-item {
    padding: 12px 0 12px 20px;
    position: relative;
    margin-bottom: 5px;
}

.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #d97706;
    border-radius: 50%;
    position: absolute;
    left: -27px;
    top: 16px;
}

.timeline-time {
    display: block;
    font-weight: 700;
    color: #b45309;
    font-size: 0.95em;
    margin-bottom: 3px;
}

.timeline-desc {
    display: block;
    color: #555;
    font-size: 0.95em;
}

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

.warning-box h6 {
    color: #d97706;
    margin-top: 0;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    background: #f9fafb;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.faq-section h3 {
    color: #b45309;
    margin-top: 0;
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: #fffbeb;
}

.faq-icon {
    font-size: 1.3em;
    color: #d97706;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-answer {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px solid #e5e7eb;
}

.faq-answer p {
    margin: 15px 0 0 0;
}

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

.faq-answer li {
    margin-bottom: 6px;
}

.faq-item.active .faq-question {
    background: #fffbeb;
    color: #b45309;
}

/* ============================================
   MEDICAL DISCLAIMER
   ============================================ */
.medical-disclaimer {
    background: #fff8e1;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #fbbf24;
    margin-bottom: 30px;
}

.medical-disclaimer h3 {
    color: #d97706;
    margin-top: 0;
}

.medical-disclaimer ul {
    padding-left: 20px;
}

.medical-disclaimer li {
    margin-bottom: 8px;
}

/* ============================================
   RELATED CALCULATORS
   ============================================ */
.related-calculators {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.related-calculators h3 {
    color: #b45309;
    margin-top: 0;
}

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

.related-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

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

.related-title {
    font-weight: 600;
    color: #b45309;
    margin-bottom: 8px;
}

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

/* ============================================
   REFERENCES
   ============================================ */
.references-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.references-section h3 {
    color: #b45309;
    margin-top: 0;
}

.references-section ol {
    padding-left: 25px;
}

.references-section li {
    margin-bottom: 12px;
    font-size: 0.95em;
}

.references-section a {
    color: #d97706;
}

.references-section a:hover {
    color: #b45309;
    text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .fagerstrom-hero {
        padding: 25px 20px;
    }

    .fagerstrom-hero h1 {
        font-size: 1.6em;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card .stat-number {
        font-size: 1.4em;
    }

    .options {
        flex-direction: column;
        margin-left: 0;
    }

    .options label {
        min-width: unset;
    }

    .level-scale {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .level-item {
        padding: 8px 4px;
        font-size: 0.7em;
    }

    .resource-cards {
        grid-template-columns: 1fr;
    }

    .education-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: center;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-left-color: #d97706;
        border-bottom-color: transparent;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .fagerstrom-calculator-container {
        padding: 0 10px;
    }

    .calculator-form-section,
    .results-section,
    .faq-section,
    .related-calculators,
    .references-section,
    .medical-disclaimer,
    .calc-education .tab-content {
        padding: 20px;
    }

    .question {
        padding: 15px;
    }

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

    #fagerstrom-score-value {
        font-size: 2.5em;
    }

    .level-scale {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .level-item {
        font-size: 0.85em;
        padding: 10px;
    }

    .privacy-notice {
        flex-direction: column;
        text-align: center;
    }

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