/* ═══════════════════════════════════════════════════════════════════════
   NetMkd MeteoMap Pro — meteomap.css
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Wrapper ────────────────────────────────────────────────────────── */
#nmmp-wrapper {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

/* ─── Map area ───────────────────────────────────────────────────────── */
#nmmp-map-area {
    flex: 1;
    position: relative;
    background: #f0f7ee;
    min-width: 0;
}

#nmmp-map-image {
    width: 100%;
    display: block;
    height: auto;
}

/* ─── City layer (overlay над SVG) ──────────────────────────────────── */
#nmmp-city-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ─── Секој град — пилула ────────────────────────────────────────────── */
.nmmp-city {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

.nmmp-bubble {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 20px;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    padding: 2px 6px 2px 3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.nmmp-city:hover .nmmp-bubble,
.nmmp-city.active .nmmp-bubble {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.nmmp-city.active .nmmp-bubble {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px #ffd700, 0 3px 10px rgba(0,0,0,0.3);
}

.nmmp-bubble-icon {
    font-size: 13px;
    line-height: 1;
}

.nmmp-bubble-temp {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.nmmp-city-label {
    margin-top: 2px;
    font-size: 8.5px;
    font-family: Arial, sans-serif;
    color: #1a1a1a;
    white-space: nowrap;
    text-shadow:
        1px  1px 0 #d4ead4,
       -1px  1px 0 #d4ead4,
        1px -1px 0 #d4ead4,
       -1px -1px 0 #d4ead4;
    line-height: 1;
    pointer-events: none;
    font-weight: 600;
}

/* ─── Скелетон — пред да се вчита температурата (мала точка) ────────── */
.nmmp-bubble.loading {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    background: #c0c0c0 !important;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: nmmp-skeleton 1.4s ease-in-out infinite;
    overflow: hidden;
}

@keyframes nmmp-skeleton {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ─── Pop-in при вчитување на пилулата ──────────────────────────────── */
@keyframes nmmp-popin {
    0%   { transform: scale(0.3); opacity: 0; }
    70%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.nmmp-bubble.pop-in {
    animation: nmmp-popin 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* ─── Анимации по температура ────────────────────────────────────────── */
@keyframes nmmp-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.1); }
}
@keyframes nmmp-wobble {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-2px); }
}
@keyframes nmmp-shake {
    0%, 100% { transform: rotate(0deg); }
    25%       { transform: rotate(-6deg); }
    75%       { transform: rotate(6deg); }
}

.nmmp-city .nmmp-bubble.anim-pulse  { animation: nmmp-pulse  2.2s ease-in-out infinite; }
.nmmp-city .nmmp-bubble.anim-wobble { animation: nmmp-wobble 2s   ease-in-out infinite; }
.nmmp-city .nmmp-bubble.anim-shake  { animation: nmmp-shake  1.4s ease-in-out infinite; }

/* ─── Side Panel ─────────────────────────────────────────────────────── */
#nmmp-panel {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid #e0e0e0;
    background: #1a3a5c;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    transition: background-image 0.4s ease;
}

#nmmp-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.50);
    z-index: 0;
    pointer-events: none;
}

#nmmp-panel > * {
    position: relative;
    z-index: 1;
}

/* ─── Placeholder (пред клик) ────────────────────────────────────────── */
#nmmp-panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px 16px;
    text-align: center;
    color: #ffffff;
}

.nmmp-placeholder-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.8;
}

#nmmp-panel-placeholder p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    color: rgba(255,255,255,0.8);
}

/* ─── Panel content ──────────────────────────────────────────────────── */
#nmmp-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.nmmp-panel-header {
    padding: 24px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.20);
    text-align: center;
}

.nmmp-panel-city-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.nmmp-panel-source {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
}

/* ─── Тековна состојба ───────────────────────────────────────────────── */
.nmmp-current {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.20);
    text-align: center;
}

.nmmp-current-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.nmmp-current-icon {
    font-size: 32px;
    line-height: 1;
}

.nmmp-current-temp {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.nmmp-current-unit {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    align-self: flex-start;
    margin-top: 4px;
}

.nmmp-current-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.90);
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nmmp-temp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.nmmp-current-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    margin-top: 8px;
    text-align: left;
}

.nmmp-detail-item {
    font-size: 11px;
    color: rgba(255,255,255,0.90);
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nmmp-detail-item span.icon {
    font-size: 13px;
}

/* ─── 3-дневна прогноза ──────────────────────────────────────────────── */
.nmmp-forecast {
    padding: 10px 14px 14px;
}

.nmmp-forecast-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.70);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.nmmp-forecast-days {
    display: flex;
    gap: 6px;
}

.nmmp-forecast-day {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
}

.nmmp-fday-name {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
}

.nmmp-fday-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 4px;
}

.nmmp-fday-max {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nmmp-fday-min {
    font-size: 10px;
    color: rgba(255,255,255,0.70);
}

.nmmp-fday-prec {
    font-size: 9px;
    color: rgba(180,220,255,0.90);
    margin-top: 2px;
}

/* ─── Лоадер ─────────────────────────────────────────────────────────── */
.nmmp-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    gap: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nmmp-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nmmp-spin 0.8s linear infinite;
}

@keyframes nmmp-spin {
    to { transform: rotate(360deg); }
}

/* ─── Грешка ─────────────────────────────────────────────────────────── */
.nmmp-error {
    padding: 20px 14px;
    text-align: center;
    color: #ff8a80;
    font-size: 12px;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nmmp-error-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

/* ─── Легенда ─────────────────────────────────────────────────────────── */
#nmmp-legend {
    max-width: 1100px;
    margin: 10px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 0 4px;
}

.nmmp-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #555;
}

.nmmp-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}


/* ─── Дневен мин/макс ────────────────────────────────────────────────── */
.nmmp-daily-minmax {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.90);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    #nmmp-wrapper {
        flex-direction: column;
        border-radius: 8px;
    }

    #nmmp-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.20);
        min-height: 280px;
    }

    #nmmp-panel-placeholder {
        min-height: 140px;
        padding: 16px;
    }

    .nmmp-forecast-days {
        gap: 4px;
    }

    .nmmp-bubble-icon {
        font-size: 11px;
    }

    .nmmp-bubble-temp {
        font-size: 9px;
    }

    .nmmp-city-label {
        font-size: 7.5px;
    }
}