/* ============================================
   Radar Tile Map — Reusable Component
   Shared by live_radar page & weather page embed
   ============================================ */

/* Container */
.radar-tile-map-container {
    height: 800px;
    font-size: 16px;
    position: relative;
}

/* When embedded inside the weather page (smaller) */
.radar-tile-map-container--embedded {
    font-size: 16px;
    height: 800px;
    position: relative;
}

/* Map */
.rtm-map {
    position: relative;
    top: 0px;
    left: 0px;
    height: calc(100% - 120px);
    width: 100%;
}

#rtm_timeline {
    position: relative;
    height: 70px;
    bottom: 0px;
    background: #FFF;
    margin-bottom: 0px !important;
}

/* Header bar (standalone page only) */
.rtm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rtm-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.rtm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.rtm-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.rtm-header-right {
    display: flex;
    align-items: center;
}

.rtm-updated {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Layer switcher */
.rtm-layers-container {
    background-color: white;width: max-content;
    border-radius: 5px;
    position: absolute;
    z-index: 1000;
    margin: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
}

.rtm-layer-tab {

    cursor: pointer;

}

.rtm-layer-tab:hover {
    /* color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05); */
}

.rtm-layer-tab.active {
    
    font-weight: 700;
}

.radar-tile-map-container .layers-container .active {
    font-weight: 700;
}


/* Legend */
.rtm-legend {
    background-color: white;width: max-content;
    border-radius: 5px;
    position: absolute;
    z-index: 1000;
    margin: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    right: 5px;
    top: 0;

    padding: 10px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
}

.rtm-legend-container{
    height: 50px;
}
.rtm-legend-new{
    height: 25px;
}
.rtm-legend-text{
    height: 25px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    text-align: center;
}

.rtm-legend-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.rtm-legend-bar {
    height: 14px;
    border-radius: 4px;
    /* border: 1px solid #7777776e; */
    background: linear-gradient(to right, transparent, #ff0, #f80, #f00, #b0f);
}

.rtm-top-right-legend{
    background-color: white;
    width: max-content;
    border-radius: 5px;
    position: absolute;
    z-index: 1000;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    right: 10px;
    top: 10px;
}

.switch-map {
    background-color: white;
    width: max-content;
    border-radius: 5px;
    position: absolute;
    z-index: 1000;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    left: 10px;
    bottom: 130px;
    cursor: pointer;
}

/*Bounce*/
@keyframes bounce {
    20%{
        -webkit-transform: translateY(0rem);
        transform: translateY(0rem);
    }
    40% { 
        -webkit-transform: translateY(-0.7rem);
        transform: translateY(-0.7rem);

    }
    42% {
        -webkit-transform: translateY(-0.7rem)  rotate(8deg);
        transform: translateY(-0.7rem) rotate(8deg);
    }
    44% {
        -webkit-transform: translateY(-0.7rem) rotate(-8deg);
        transform: translateY(-0.7rem) rotate(-8deg);
    }
    46% {
        -webkit-transform: translateY(-0.7rem) rotate(8deg);
        transform:translateY(-0.7rem) rotate(8deg);
        }
    48% {
        -webkit-transform: translateY(-0.7rem) rotate(-8deg);
        transform: translateY(-0.7rem) rotate(-8deg);
        }
    50% {
        -webkit-transform:translateY(-0.7rem) rotate(8deg);
        transform:translateY(-0.7rem) rotate(8deg);
        }
    60%{
        -webkit-transform: translateY(-0.7rem);
        transform: translateY(-0.7rem);
    }
    80%{
        -webkit-transform: translateY(0rem);
        transform: translateY(0rem);
    }
  
}

.switch-map-icon {
  /*name-duration-function(ease,eas-in,linear)-delay-count-direction */
    animation: bounce 3s infinite;
    /* background-color: white; */
    border-radius: 50%;
    line-height: 26px;
    width: 26px;
    height: 26px;
    text-align: center;
}

.switch-map-icon:hover {
  animation: none;
}

/* @media (max-width: 768px) {

    .switch-map-title {
        display:  none;
    }
} */

.rtm-info {
    position: absolute;
    right: 13px;
    top: 60px;
    font-size: 1rem;
    /* font-size: 22px;
    height: 22px;
    width: 22px;
    background: #FFF;
    border-radius: 50%;
    line-height: 22px; */
    cursor: pointer;
}

.rtm-popup {
    background-color: #FFF;
    width: 50%;
    height: 400px;
    position: absolute;
    z-index: 1001;
    top: calc(50% - 250px);
    right: 25%;
    border-radius: 10px;
    font-size: 1rem !important;
    overflow: scroll;
}
.rtm-popup-close{
    position: absolute;
    right: 5px;
    top: 5px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}
.rtm-backdrop {
    background-color: #0000008c;
    width: 100%;
    height: calc(100% - 120px);
    position: absolute;
    z-index: 1000;
    top: 0;
    right: 0;
}

/* Leaflet overrides for dark theme */
/* .radar-tile-map-container .leaflet-control-zoom a {
    background: rgba(26, 26, 46, 0.9);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.radar-tile-map-container .leaflet-control-zoom a:hover {
    background: rgba(26, 26, 46, 1);
    color: #fff;
}

.radar-tile-map-container .leaflet-control-attribution {
    background: rgba(26, 26, 46, 0.7);
    color: rgba(255, 255, 255, 0.4);
}

.radar-tile-map-container .leaflet-control-attribution a {
    color: rgba(79, 195, 247, 0.6);
} */

/* Responsive */
@media (max-width: 768px) {
    .radar-tile-map-container {
        height: 500px;
        min-height: 500px;
    }

    .rtm-header {
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    .rtm-title {
        font-size: 1rem;
    }

    .rtm-subtitle {
        display: none;
    }

    .rtm-layers-container {
        top: 50px;
        flex-direction: row;
    }

    .rtm-layer-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .rtm-layer-tab.active {
        border-bottom-color: #4fc3f7;
        border-left-color: transparent;
    }

    .rtm-legend {
        
    }

    .rtm-timeline {
        padding: 8px 12px;
    }

    .rtm-track-wrapper {
        margin: 8px 4px 4px;
    }

    .rtm-thumb-label {
        font-size: 0.65rem;
    }

    .rtm-tick-label {
        font-size: 0.6rem;
    }
}


.s4w-radar-rain{
    filter: none
}
.s4w-radar-lightning{
    filter: none
}