.cwm-map-stage {
    position: relative;
    width: 100%;
    height: min(520px, 65vh);
    min-width: 280px;
    min-height: 280px;
    max-width: 100%;
    max-height: 85vh;
    margin-bottom: var(--w2-g4);
    border-radius: var(--w2-rlg);
    overflow: hidden;
    background: #9ecae0;
    border: 1px solid var(--w2-bdr);
}

@media (max-width: 767px) {
    .cwm-map-stage {
        height: min(55vh, 120vw);
        max-height: 120vw;
        min-height: 180px;
    }
}

.cwm-map-inner {
    position: absolute;
    inset: 0;
}

.cwm-map-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: linear-gradient(135deg, transparent 50%, #0ea5e9 50%);
    cursor: nwse-resize;
    border-radius: 0 0 var(--w2-rlg) 0;
    opacity: 0.9;
    touch-action: none;
}

.cwm-map-resize-handle:hover,
.cwm-map-resize-handle:focus-visible {
    opacity: 1;
    outline: none;
    box-shadow: inset 0 0 0 2px #fff;
}

.cwm-map-resize-handle:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: -2px;
}

.cwm-map-stage--resizing {
    user-select: none;
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.cwm-map-stage--resizing .cwm-map-resize-handle {
    opacity: 1;
}

#country-weather-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#country-weather-map.leaflet-container {
    background: #9ecae0;
    font-family: inherit;
}

#country-weather-map .leaflet-top.leaflet-right {
    top: 8px;
    right: 8px;
}

#country-weather-map .leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cwm-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    overflow: visible;
}

.cwm-marker-wrap {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    pointer-events: auto;
}

.cwm-marker-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.cwm-marker-link:hover .cwm-marker {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(15, 23, 42, 0.85);
}

.cwm-marker-link:focus-visible .cwm-marker {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.cwm-marker {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.cwm-marker-title {
    display: flex;
    align-items: center;
    gap: 3px;
    max-width: 110px;
    line-height: 1;
}

.cwm-marker-weather {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 0;
    line-height: 1;
}

.cwm-marker-pin {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    background-color: var(--w2-a);
    -webkit-mask: url('/assets/icons/fa-map-marker.svg') no-repeat center / contain;
    mask: url('/assets/icons/fa-map-marker.svg') no-repeat center / contain;
}

.cwm-marker-pin--capital {
    width: 13px;
    height: 13px;
}

.cwm-marker-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #f1f5f9;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cwm-marker-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
}

.cwm-marker-icon--empty {
    display: inline-block;
    width: 24px;
    height: 24px;
}

.cwm-marker-temp-max,
.cwm-marker-temp-min {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 16px;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
    line-height: 1;
}

.cwm-marker-temp-max {
    background: #dc2626;
}

.cwm-marker-temp-min {
    background: #2563eb;
}

/* "Now" tab — single current-temperature badge */
.cwm-marker-temp-now {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
    line-height: 1;
}

.cwm-marker-temp-now--day   { background: #dc2626; }
.cwm-marker-temp-now--night { background: #2563eb; }

.cwm-day-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--w2-g2);
    margin-bottom: var(--w2-g4);
}

.cwm-day-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: var(--w2-rmd);
    border: 1px solid var(--w2-bdr);
    background: var(--w2-surf);
    color: var(--w2-t);
    font-size: var(--w2-fsm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--w2-tr);
}

.cwm-day-tab:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.65);
    outline-offset: 2px;
}

.cwm-day-tab:hover {
    border-color: rgba(56, 189, 248, 0.5);
    color: var(--w2-sy1);
}

.cwm-day-tab--active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(56, 189, 248, 0.65);
    color: var(--w2-sy1);
}

/* "Now" tab — pulse dot to signal live data */
.cwm-day-tab--now::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 5px;
    flex-shrink: 0;
    animation: cwm-pulse 1.8s ease-in-out infinite;
}

@keyframes cwm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.cwm-weather-summary {
    margin: 0 0 var(--w2-g4);
    padding: var(--w2-g4) var(--w2-g5);
    border-radius: var(--w2-rlg);
    border: 1px solid var(--w2-bdr);
    background: var(--w2-surf);
    color: var(--w2-t);
    font-size: 14px;
    line-height: 1.6;
}

.cwm-weather-summary p {
    margin: 0;
}

.cwm-weather-seo {
    margin: 0 0 var(--w2-g6);
    padding: var(--w2-g4) var(--w2-g5);
    border-radius: var(--w2-rlg);
    border: 1px solid var(--w2-bdr);
    background: var(--w2-surf2);
    color: var(--w2-m);
    font-size: 14px;
    line-height: 1.65;
}

.cwm-weather-seo p {
    margin: 0;
}

.cwm-weather-seo p + p {
    margin-top: var(--w2-g4);
}
