
.heatmap-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-top: 20px;
    width: 100%;
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.heatmap-title {
    font-size: 16px;
    font-weight: 600;
}

.heatmap-year-selector {
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: default;
}

.heatmap-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    /* Custom scrollbar styling for better look */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.heatmap-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.heatmap-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.heatmap-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

#heatmap-container {
    /* Fixed width to ensure square cells */
    width: 950px; 
    /* Ensure no max-width constraints */
    max-width: none;
    /* Add slight padding to prevent clipping of borders */
    padding: 2px;
    height: 140px !important; /* Reduce height from default 180px */
}

/* Custom Legend Styles */
.heatmap-legend {
    margin-top: 10px;
    padding: 0 40px;
    font-size: 12px;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.legend-row-1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.legend-row-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Reduced gap to fit all items in one line */
    align-items: center;
}

.color-blocks {
    display: flex;
    gap: 3px;
}

.color-block {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
