/**
 * Forest Declaration Custom Charts - Map Chart Styling
 */

/* Map container */

.fdcc-chart-map {
    position: relative; /* Required for tooltip positioning */
}

/* Combined controls container */

.fdcc-chart-map .fdcc-chart-controls{
    align-items: stretch;
}

.fdcc-chart-map .fdcc-map-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.6rem;
    margin-bottom: 15px;
}

/* Legend container */
.fdcc-chart-map .fdcc-map-legend-container {
    flex: 1 1 auto;
    margin-right: 20px;
}

/* Year control section */

.fdcc-year-range-container{
    cursor: pointer !important;
}

.fdcc-year-control-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-right: 20px;
}

.fdcc-year-label {
    font-size: 13px;
    color: var(--neutral-grey);
}

/* Year control container */
.fdcc-year-control-container {
    display: flex;
    align-items: center;
}

/* Year range container */
.fdcc-year-range-container {
    display: flex;
    align-items: center;
}

/* Simple slider styling */
.fdcc-year-slider {
    width: 180px;
    height: 20px;
    position: relative;
}

.fdcc-year-slider > svg{
    overflow: visible;
}

.fdcc-year-slider .track {
    stroke: var(--neutral-grey);
}

.fdcc-year-slider .track-active {
    stroke: var(--neutral-grey);
    stroke-width: 2px;
}

.fdcc-year-slider .track-overlay {
    stroke: transparent;
    cursor: pointer;
}

.fdcc-year-slider .year-circle {
    fill: var(--neutral-grey);
    stroke: #fff;
    stroke-width: 1px;
    r: 5px;
}

.fdcc-year-slider .year-text{
    stroke: none;
}

/* Year value in slider handle */
.fdcc-year-slider .parameter-value text {
    font-size: 11px;
    font-weight: bold;
    fill: #333;
    text-anchor: middle;
    dominant-baseline: central;
}

/* Play/pause button */
.fdcc-play-button {
    cursor: pointer;
    width: 18px;
    height: 18px;
    background-color: var(--neutral-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    transition: background-color 0.2s;
}

.fdcc-play-button:hover {
    background-color: #555;
}

.fdcc-play-icon, .fdcc-pause-icon {
    width: 14px;
    height: 14px;
}

/* Map legend */
.fdcc-map-legend {
    font-size: 12px;
    width: 100%;
}

.fdcc-legend-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.fdcc-legend-scale {
    display: flex;
    height: 15px;
    width: 100%;
    margin-bottom: 5px;
}

.fdcc-legend-item {
    flex: 1;
}

.fdcc-legend-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 5px;
}

.fdcc-legend-value {
    font-size: 10px;
    color: #333;
    text-align: center;
}

/* No data label style */
.fdcc-legend-no-data-label {
    flex: 0 0 45px;
    text-align: left;
}

/* Country styles */
.country {
    vector-effect: non-scaling-stroke;
    transition: opacity 0.2s ease-in-out, stroke-width 0.2s ease-in-out;
}

.country:hover {
    opacity: 0.9;
    stroke-width: 1px;
    cursor: pointer;
}

/* Chart info text */
.chart-info {
    font-size: 12px;
    fill: #555;
}

/* Tooltip */

.fdcc-map-tooltip{
    font-weight: 700;
    color: var(--neutral-grey);
}

.fdcc-map-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

.fdcc-map-tooltip strong{
    font-size: 12px;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.1em;
}

.fdcc-map-tooltip .tooltip-divider {
    border-bottom: 1px solid var(--neutral-grey);
    margin: 5px auto 10px auto;
    opacity: 0.5;
}

.fdcc-map-tooltip .value{
    font-size: 19px;
    margin-right: 5px;
}

.fdcc-map-tooltip .unit,
.fdcc-map-tooltip .no-data{
    font-size: 13px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .fdcc-map-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fdcc-map-legend-container,
    .fdcc-year-control-section {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .fdcc-year-control-section {
        align-items: flex-start;
    }
}