/* CAGE Alcohol Screening Calculator Styles */
/* Color theme: Professional blue (#0066cc to #004080) */

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

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

/* Help Banner */
.help-banner {
    background: linear-gradient(135deg, #e8f4fd 0%, #cce5ff 100%);
    border-left: 5px solid #0066cc;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.help-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

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

.help-header h3 {
    margin: 0;
    color: #0066cc;
    font-size: 1.3em;
}

.help-banner p {
    margin: 0 0 15px 0;
}

.help-small {
    font-size: 0.9em;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

.help-small a {
    color: #dc3545;
    font-weight: bold;
}

.help-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-link {
    display: inline-block;
    padding: 8px 15px;
    background: white;
    border: 2px solid #0066cc;
    border-radius: 25px;
    color: #0066cc;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.help-link:hover {
    background: #0066cc;
    color: white;
}

.help-link.primary {
    background: #0066cc;
    color: white;
}

.help-link.primary:hover {
    background: #004080;
}

/* Hero Section */
.calc-hero {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #0066cc 0%, #004080 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.calc-hero h2 {
    margin: 0 0 15px 0;
    font-size: 2em;
}

.calc-subtitle {
    font-size: 1.1em;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 10px auto;
}

.last-updated {
    font-size: 0.85em;
    opacity: 0.8;
    margin: 0;
}

/* Info and Warning Boxes */
.info-box, .warning-box {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.info-box {
    background: #e8f4fd;
    border-left: 4px solid #0066cc;
}

.info-box h4, .info-box h5 {
    color: #0066cc;
    margin-top: 0;
}

.info-box h6 {
    color: #004080;
    margin: 15px 0 10px 0;
}

.warning-box {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
}

.warning-box h4, .warning-box h5 {
    color: #f57f17;
    margin-top: 0;
}

/* Introduction Section */
.intro-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.intro-section h3 {
    color: #004080;
    margin-top: 0;
}

.intro-section ul {
    padding-left: 20px;
}

.intro-section li {
    margin-bottom: 8px;
}

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

.calc-section h3 {
    color: #004080;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0066cc;
}

.instruction {
    font-size: 1.05em;
    color: #555;
    margin-bottom: 25px;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 6px;
}

/* CAGE Questions - Special Layout */
.question-container {
    margin-bottom: 20px;
}

.question {
    display: flex;
    gap: 20px;
    padding: 25px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.question:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.question-letter {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0066cc 0%, #004080 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    flex-shrink: 0;
}

.question-content {
    flex: 1;
}

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

.question-hint {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 15px 0;
    font-style: italic;
}

/* Yes/No Options */
.options {
    display: flex;
    gap: 15px;
}

.option-btn {
    display: flex;
    align-items: center;
    padding: 12px 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    justify-content: center;
}

.option-btn:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

.option-btn input[type="radio"] {
    margin-right: 8px;
    accent-color: #0066cc;
}

.option-btn:has(input:checked) {
    border-color: #0066cc;
    background: #e8f4fd;
}

.option-btn:has(input:checked) span {
    color: #0066cc;
    font-weight: 600;
}

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

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

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

/* Results Section */
.results-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #0066cc;
}

.results-section h3 {
    text-align: center;
    color: #004080;
    margin-top: 0;
}

.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, #0066cc 0%, #004080 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

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

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

.severity-badge {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1em;
}

.severity-badge.low {
    background: #d4edda;
    color: #155724;
}

.severity-badge.elevated {
    background: #fff3cd;
    color: #856404;
}

.severity-badge.high {
    background: #f8d7da;
    color: #721c24;
}

.interpretation {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.interpretation p {
    margin: 10px 0;
}

.recommendation {
    padding: 15px;
    background: #e8f4fd;
    border-radius: 6px;
    border-left: 4px solid #0066cc;
}

.next-steps {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.next-steps h4 {
    color: #004080;
    margin-top: 0;
}

.next-steps ul {
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 10px;
}

.important-notice {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

.important-notice h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.concern-notice {
    background: #f8d7da;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-bottom: 20px;
}

.concern-notice h4 {
    color: #721c24;
    margin: 0 0 10px 0;
}

.resources-box {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.resources-box p {
    margin: 8px 0;
}

.results-help {
    margin-top: 25px;
    background: #e8f4fd;
}

.results-help h4 {
    color: #0066cc;
    margin: 0 0 10px 0;
}

/* Score Chart */
.education-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.education-section h3 {
    color: #004080;
    margin-top: 0;
}

.score-chart {
    margin-top: 20px;
}

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

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

.chart-row.low {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.chart-row.elevated {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
}

.chart-row.high {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.chart-score {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
}

.chart-severity {
    font-weight: 600;
}

.chart-description {
    font-size: 0.9em;
    color: #555;
}

.chart-action {
    font-size: 0.85em;
    font-style: italic;
    color: #666;
}

/* 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 #e0e0e0;
}

.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: #e8f4fd;
    color: #0066cc;
}

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

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

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

.tab-content h4 {
    color: #004080;
    margin-top: 0;
}

.tab-content h5 {
    color: #0066cc;
    margin-top: 25px;
}

/* Stat Box */
.stat-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #cce5ff 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.stat-box h5 {
    margin-top: 0;
    text-align: center;
    color: #004080;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 15px;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #0066cc;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
}

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

.sign-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #0066cc;
}

.sign-card h5 {
    margin-top: 0;
    color: #004080;
}

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

.sign-card li {
    margin-bottom: 6px;
    font-size: 0.95em;
}

/* Health Grid */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.health-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.health-card h5 {
    margin-top: 0;
    color: #004080;
}

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

.health-card li {
    margin-bottom: 6px;
    font-size: 0.95em;
}

/* Treatment Section */
.treatment-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.treatment-section h5 {
    margin-top: 0;
    color: #004080;
}

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

.treatment-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #0066cc;
}

.treatment-card h6 {
    margin: 0 0 10px 0;
    color: #0066cc;
}

.treatment-card p {
    font-size: 0.9em;
    margin: 0;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95em;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #0066cc;
    color: white;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

.comparison-table tr:first-child td {
    background: #e8f4fd;
}

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

.faq-section h3 {
    color: #004080;
    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: #f0f7ff;
}

.faq-icon {
    font-size: 1.3em;
    color: #0066cc;
    font-weight: bold;
}

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

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

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

.faq-item.active .faq-question {
    background: #e8f4fd;
    color: #0066cc;
}

/* Related Section */
.related-section {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.related-section h3 {
    color: #004080;
    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: #0066cc;
    margin-bottom: 8px;
}

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

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

.calc-sources h3 {
    color: #004080;
    margin-top: 0;
}

.calc-sources h4 {
    color: #0066cc;
    margin-top: 25px;
    margin-bottom: 15px;
}

.calc-sources ol {
    padding-left: 25px;
}

.calc-sources li {
    margin-bottom: 12px;
    font-size: 0.95em;
}

.calc-sources a {
    color: #0066cc;
}

/* Disclaimer */
.calc-disclaimer {
    background: #fff8e1;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #ffc107;
    margin-bottom: 30px;
}

.calc-disclaimer h3 {
    color: #f57f17;
    margin-top: 0;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .calc-hero {
        padding: 20px;
    }

    .calc-hero h2 {
        font-size: 1.5em;
    }

    .question {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .question-content {
        width: 100%;
    }

    .options {
        justify-content: center;
    }

    .chart-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .chart-score {
        font-size: 1.5em;
        padding: 10px;
        background: rgba(255,255,255,0.5);
        border-radius: 4px;
    }

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

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

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

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

    .help-contacts {
        flex-direction: column;
    }

    .help-link {
        text-align: center;
    }
}

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

    .calc-section,
    .intro-section,
    .education-section,
    .faq-section,
    .related-section,
    .calc-sources,
    .calc-disclaimer {
        padding: 20px;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
    }

    .question {
        padding: 20px;
    }

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

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

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