/* Map container */
#vespa-map-container {
  position: relative;
}
#vespa-map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
}

/*Controls (play/pause button + year label) */
#vespa-controls {
    position: absolute;
    top: 10px; 
    left: 8rem; 
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

/* play / pause button */
#vespa-play-pause {
    background:none;
    border:none;
    color:var(--base);
    border-radius:var(--radius-s);
    cursor:pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:.2s;
    margin-right: 2rem;
}
#vespa-play-pause:hover { opacity:.8; }

/* year label (the “slider”) */
#vespa-year {
    background: var(--neutral);
    padding: 4px 8px;
    border-radius: var(--radius-s);
    font-weight: 600;
    font-size: var(--text-m);
    color: var(--base);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.vespa-legend {
    position: absolute;
    top: 1rem;
    z-index: 1000;
    right: 1rem;
    background: var(--neutral);
    padding: 8px;
    border: 1px solid var(--base);
    line-height: 1.4;
    font-size: var(--text-s);
    border-radius: var(--radius-s);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);    
}
.vespa-legend .title { font-weight: 600; margin-bottom:4px; }
.vespa-legend .gradient {
    width: 140px;
    height: 12px;
    background: linear-gradient(to right,
              rgba(75,0,0,1),
              rgba(139,0,0,0.8),
              rgba(255,69,0,0.6),
              rgba(255,160,122,0.4),
              rgba(153,153,153,0.2));
    border:1px solid #888;
    margin:4px 0;
}
.vespa-legend .labels {
    display: flex;
    justify-content: space-between;
    color:#555;
}

#vespa-play-pause img.paused {
    opacity: 0.5;  /* dim the icon when paused */
    transition: opacity 0.3s;
}

#vespa-play-pause img {
    transition: opacity 0.3s;
}

@media only screen and (max-width: 767px) {
    #vespa-controls {
        top: 100px; 
        left: 1rem; 
    }
    .vespa-legend {
        left: 1rem;
    }
}