/* Calculator Layout */
.calculator h1 {
    font-size: 1.75rem;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    max-width: 800px;
    text-align: center;
    position: relative;
}

.calculator h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.calculator-widget {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Status Summary Card */
.status-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--primary-color);
}

.status-summary p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

.status-summary .status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* Timeline Section */
.timeline-section {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.timeline-section:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.timeline-controls {
    display: flex;
    gap: 0.5rem;
}

.timeline-control-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--bg-light);
}

.timeline-control-btn:hover {
    background-color: var(--bg-hover);
    color: var(--primary-color);
}

.substance-timeline {
    height: 500px; /* Increased height from 400px to 500px */
    margin-bottom: 1.5rem;
    position: relative;
    background-color: var(--white);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: visible; /* Changed from hidden to visible to prevent content from being cut off */
    border: 1px solid rgba(0,0,0,0.03);
}

.substance-timeline::before {
    content: 'Past';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.substance-timeline::after {
    content: 'Future';
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Timeline Info */
.timeline-info {
    background-color: var(--white);
    padding: 1.25rem;
    border-radius: 12px;
    margin: 1.25rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.timeline-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-info-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.timeline-substance-info {
    background-color: var(--bg-light);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-color);
}

.timeline-substance-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.timeline-substance-info:last-child {
    margin-bottom: 0;
}

.timeline-substance-info h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-substance-info h4::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-phases {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.phase {
    background-color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.phase:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.phase i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.metabolism-note {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background-color: var(--white);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detection-window {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--white);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detection-window i {
    color: var(--primary-color);
}

/* Controls Section */
.controls-section {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 2;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.controls-section:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.controls-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.controls-help {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.controls-help:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Calculator Action Buttons */
.calculator-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.btn-add-substance, .btn-clear-all {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-add-substance {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-clear-all {
    background: linear-gradient(135deg, var(--warning-color) 0%, #c82333 100%);
    color: var(--white);
}

.btn-add-substance:hover, .btn-clear-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-add-substance:active, .btn-clear-all:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Export Options */
.export-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-export {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    background-color: var(--white);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.btn-export:hover {
    background-color: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.12);
}

.btn-export i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Selection Menu */
.selection-menu {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    transform: translateY(0);
    visibility: visible;
    position: relative;
    z-index: 2;
}

.selection-menu.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
}

.selection-menu > div {
    margin-bottom: 2rem;
}

.selection-menu > div:last-child {
    margin-bottom: 0;
}

.selection-menu h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Step Transitions */
.step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    max-height: 2000px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Dosage Selection */
.dosage-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 500px;
    overflow: hidden;
}

.category.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.category h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1rem;
}

.dosage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.dosage-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dosage-btn i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.dosage-btn span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.dosage-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.dosage-btn:hover i {
    color: var(--primary-color);
}

.dosage-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.dosage-btn.active i {
    color: var(--white);
}

/* Substance Grid */
.substance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.no-substances-message {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px dashed var(--border-color);
    margin: 1rem 0;
}

.no-substances-message p {
    margin: 0.5rem 0;
    color: var(--text-muted);
}

.no-substances-message p:first-child {
    font-weight: 600;
    color: var(--text-color);
}

.substance-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.substance-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.substance-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Time Selection */
.time-slider-container {
    padding: 0 1rem;
    margin: 1.5rem 0;
}

input[type="range"] {
    width: 100%;
    margin: 1rem 0;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Add to Timeline Button */
.btn-add {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-add:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* Results */
.calculator-result {
    padding: 1.75rem;
    border-radius: 16px;
    background-color: var(--white);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    margin-top: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.calculator-result.show {
    opacity: 1;
    transform: translateY(0);
}

.result-safe {
    border-left: 6px solid #28a745;
}

.result-warning {
    border-left: 6px solid #ffc107;
}

.result-danger {
    border-left: 6px solid #dc3545;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-safe .result-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.result-warning .result-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.result-danger .result-icon {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.result-message {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.2rem;
    line-height: 1.4;
}

/* Risk Indicator */
.risk-indicator {
    margin: 1.5rem 0 2rem;
}

.risk-gauge {
    position: relative;
    height: 120px;
    margin: 0 auto 1.5rem;
    max-width: 300px;
}

.risk-gauge-bg {
    position: absolute;
    width: 100%;
    height: 12px;
    background-color: var(--bg-light);
    border-radius: 6px;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.risk-gauge-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

.result-safe .risk-gauge-fill {
    background-color: #28a745;
}

.result-warning .risk-gauge-fill {
    background-color: #ffc107;
}

.result-danger .risk-gauge-fill {
    background-color: #dc3545;
}

.risk-gauge-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--white);
    border: 3px solid var(--primary-color);
    top: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1;
}

.result-safe .risk-gauge-marker {
    border-color: #28a745;
}

.result-warning .risk-gauge-marker {
    border-color: #ffc107;
}

.result-danger .risk-gauge-marker {
    border-color: #dc3545;
}

.risk-gauge-labels {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    bottom: 0;
}

.risk-gauge-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    position: relative;
    width: 33.33%;
}

.risk-gauge-label::before {
    content: '';
    display: block;
    width: 2px;
    height: 8px;
    background-color: var(--text-muted);
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
}

.risk-gauge-label.active {
    color: var(--text-color);
    font-weight: 600;
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

/* Result Advice */
.result-advice {
    margin-top: 1.5rem;
    padding: 1.75rem;
    background-color: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.result-advice h4 {
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-advice h4 i {
    color: var(--primary-color);
}

.result-advice ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.result-advice li {
    padding: 0.75rem 1rem 0.75rem 2rem;
    position: relative;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.result-advice li:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.result-advice li::before {
    content: '✓';
    position: absolute;
    left: 0.75rem;
    color: var(--accent-color);
    font-weight: bold;
}

/* Emergency Warning */
.emergency-warning {
    margin-top: 2rem;
    padding: 1.75rem;
    background-color: var(--warning-bg);
    border-radius: 12px;
    border-left: 4px solid var(--warning-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.emergency-warning strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--warning-color);
}

.emergency-warning strong i {
    color: var(--warning-color);
}

.emergency-warning ul {
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.emergency-warning li {
    padding: 0.75rem 1rem 0.75rem 2rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.emergency-warning li:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.emergency-warning li::before {
    content: '⚠️';
    position: absolute;
    left: 0.75rem;
}

.emergency-warning p {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-style: italic;
}

/* Interaction Warning */
.interaction-warning {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #f8d7da;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.interaction-warning.show {
    opacity: 1;
    transform: translateY(0);
}

.interaction-warning h4 {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .controls-section {
        position: static;
    }

    .timeline-phases {
        flex-wrap: wrap;
    }

    .dosage-categories {
        gap: 1rem;
    }

    .dosage-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

@media (max-width: 768px) {
    .calculator h1 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .calculator-widget {
        padding: 1rem;
    }

    .substance-timeline {
        height: 400px; /* Increased height from 300px to 400px for mobile */
    }

    .dosage-btn,
    .substance-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .dosage-btn i {
        font-size: 1.2rem;
    }

    .timeline-phases {
        flex-direction: column;
        gap: 0.5rem;
    }

    .phase {
        width: 100%;
    }
}

/* Accessibility Improvements */
.calculator-widget button:focus,
.calculator-widget input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.calculator-widget input[type="range"]:focus {
    outline: none;
}

.calculator-widget *[role="alert"] {
    border-left: 4px solid currentColor;
}

/* Info Button */
.info-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.info-btn:hover {
    color: var(--primary-color);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-color);
    color: var(--white);
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Enhanced Features */

/* Confidence Interval Styling */
.confidence-area {
    opacity: 0.15;
    pointer-events: none;
}

/* Phase Indicators */
.phase-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.phase-label {
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Enhanced Risk Zone */
.risk-zone {
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 0, 0, 0.1),
        rgba(255, 0, 0, 0.1) 10px,
        rgba(255, 0, 0, 0.15) 10px,
        rgba(255, 0, 0, 0.15) 20px
    );
    border-radius: 4px;
    pointer-events: none;
}

/* Chart Tooltip Enhancements */
.chart-tooltip {
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
}

.chart-tooltip-header {
    font-weight: bold;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-tooltip-body {
    font-size: 0.85rem;
    line-height: 1.4;
}

.chart-tooltip-warning {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffc107;
}
