.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px var(--light-silver);
    margin-top: 0.75rem;
    position: relative;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Month Selector Compact - Dropdown with Navigation */
.month-selector-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F7F7F8;
    border: 2px solid #E3E4E9;
    border-radius: 8px;
    padding: 2px;
    transition: all 0.2s ease;
}

.month-selector-compact:focus-within {
    border-color: #0F9FC4;
    background: white;
    box-shadow: 0 0 0 3px rgba(15, 159, 196, 0.1);
}

.month-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #808FAD;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.month-nav-btn:hover {
    background: #0F9FC4;
    color: white;
}

.month-nav-btn:active {
    transform: scale(0.95);
}

.month-dropdown,
.year-dropdown {
    border: none;
    background: transparent;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1F3D7C;
    cursor: pointer;
    padding: 4px 4px 4px 8px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23808FAD' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 18px;
}

.month-dropdown {
    width: 70px;
}

.year-dropdown {
    width: 65px;
}

.month-dropdown:hover,
.year-dropdown:hover {
    color: #0F9FC4;
}

.chart-controls select {
    border-radius: 6px;
    border: 1px solid var(--light-silver);
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    color: var(--slate);
    background: var(--off-white);
}

.chart-controls select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(15, 159, 196, 0.15);
    outline: none;
}

/* Production Comparison Table */
.production-comparison-table {
    width: 100%;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.comparison-table thead {
    background: var(--off-white);
    border-bottom: 2px solid var(--primary-blue);
}

.comparison-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-navy);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--light-silver);
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover {
    background-color: rgba(15, 159, 196, 0.05);
}

.comparison-table td {
    padding: 0.75rem 1rem;
    color: var(--slate);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--secondary-blue);
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3) {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.chart-wrapper {
    position: relative;
    height: 260px;
    cursor: pointer;
}

/* Extra breathing room between header/filters and the RM Price Trend chart */
.chart-wrapper:has(#rmPriceTrendChart) {
    margin-top: 1.5rem;
}

.chart-wrapper--circular {
    height: 300px;
    overflow: visible;
}

.chart-wrapper canvas {
    max-height: 100%;
}

.chart-wrapper:hover::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(15, 159, 196, 0.9);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--light-silver);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--slate);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.chart-empty {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    font-size: 0.875rem;
}

.chart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

@media (max-width: 767px) {
    .chart-container {
        padding: 0.75rem;
    }
    
    .chart-wrapper {
        height: 220px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
    }
    
    .chart-controls select {
        flex: 1;
    }
}
