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

/* ─── Wrapper ────────────────────────────────────────────────────────── */
#nmmp-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    position: relative;
}

/* ─── Map area ───────────────────────────────────────────────────────── */
#nmmp-map-area {
    position: relative;
    width: 100%;
    background: linear-gradient(to top, #fddb92 0%, #d1fdff 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#nmmp-map-image {
    width: 100%;
    display: block;
    height: auto;
    mix-blend-mode: multiply;
    opacity: 0.92;
}

/* ─── City layer ─────────────────────────────────────────────────────── */
#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.30);
    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.25);
    box-shadow: 0 3px 10px rgba(0,0,0,0.40);
}

.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: 9px;
    font-family: Arial, sans-serif;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 1px 1px 0 rgba(0,0,0,0.5), -1px -1px 0 rgba(0,0,0,0.5);
    line-height: 1;
    pointer-events: none;
    font-weight: 700;
}

/* ─── Скелетон ───────────────────────────────────────────────────────── */
.nmmp-bubble.loading {
    width: 10px; height: 10px;
    padding: 0; border-radius: 50%;
    background: #c0c0c0 !important;
    border: 2px solid #ffffff;
    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; }

/* ─── Легенда ─────────────────────────────────────────────────────────── */
#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;
    font-family: Arial, sans-serif;
}

.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;
}

/* ═══════════════════════════════════════════════════════════════════════
   МОДАЛЕН ПРОЗОРЕЦ
═══════════════════════════════════════════════════════════════════════ */

/* ─── Overlay ────────────────────────────────────────────────────────── */
#nmmp-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99990;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    box-sizing: border-box;
}

#nmmp-modal-overlay.nmmp-active {
    display: flex;
}

/* ─── Модал контејнер ────────────────────────────────────────────────── */
#nmmp-modal {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 88vh;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
    font-family: Arial, sans-serif;
}

#nmmp-modal.nmmp-modal-in {
    transform: translateY(0);
    opacity: 1;
}

/* ─── Позадинска слика (горен дел) ───────────────────────────────────── */
#nmmp-modal-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 190px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    flex-shrink: 0;
}

#nmmp-modal-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.58) 55%, rgba(255,255,255,1) 100%);
}

/* ─── Затвори копче ──────────────────────────────────────────────────── */
#nmmp-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    z-index: 100;
    background: rgba(0,0,0,0.50);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

#nmmp-modal-close:hover { background: rgba(0,0,0,0.75); }

/* ─── Модал body ─────────────────────────────────────────────────────── */
#nmmp-modal-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* ─── Лоадер во модал ────────────────────────────────────────────────── */
#nmmp-modal-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 14px;
    color: #888;
    font-size: 13px;
    min-height: 200px;
}

.nmmp-spinner {
    width: 32px; height: 32px;
    border: 3px solid #eee;
    border-top-color: #42A5F5;
    border-radius: 50%;
    animation: nmmp-spin 0.8s linear infinite;
}

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

/* ─── Модал content ──────────────────────────────────────────────────── */
#nmmp-modal-content {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ─── Modal Header ───────────────────────────────────────────────────── */
.nmmp-modal-header {
    height: 190px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 50px 14px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.nmmp-modal-city {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    margin-bottom: 2px;
}

.nmmp-modal-source {
    font-size: 10px;
    color: rgba(255,255,255,0.70);
    margin-bottom: 4px;
}

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

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

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

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

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

.nmmp-modal-minmax {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.90);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin-top: 3px;
    letter-spacing: 0.04em;
}

.nmmp-sun-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 3px;
}

.nmmp-sun-item {
    font-size: 11px;
    color: rgba(255,220,100,0.95);
    font-weight: 600;
    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: 3px 12px;
    border-radius: 20px;
    margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   ТАБОВИ
═══════════════════════════════════════════════════════════════════════ */

.nmmp-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #ffffff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nmmp-tab-btn {
    flex: 1;
    padding: 10px 4px;
    border: none;
    background: none;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.nmmp-tab-btn:hover { color: #1a3a5c; }

.nmmp-tab-btn.nmmp-tab-active {
    color: #1a3a5c;
    border-bottom-color: #1a3a5c;
}

/* ─── Таб содржина ───────────────────────────────────────────────────── */
.nmmp-tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.nmmp-tab-content::-webkit-scrollbar { width: 5px; }
.nmmp-tab-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.nmmp-tab-pane {
    display: none;
    padding: 14px 16px;
}

.nmmp-tab-pane.nmmp-tab-pane-active {
    display: block;
}

.nmmp-tab-empty {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    padding: 30px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════
   ДЕТАЛИ ТАБ
═══════════════════════════════════════════════════════════════════════ */

.nmmp-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px 8px;
    margin-bottom: 12px;
}

.nmmp-detail-item {
    font-size: 11px;
    color: #444;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    cursor: pointer;
    position: relative;
    padding: 5px 7px;
    border-radius: 8px;
    transition: background 0.15s ease;
    line-height: 1.35;
    background: #f5f5f5;
    border: 1px solid #ebebeb;
}

.nmmp-detail-item:hover { background: #ebebeb; }

.nmmp-detail-item[data-tooltip] {
    text-decoration: underline dotted #bbb;
    text-underline-offset: 2px;
}

.nmmp-detail-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* Текстуална прогноза во детали табот */
.nmmp-forecast-text-wrap {
    background: #f0f6ff;
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #dce8f8;
}

.nmmp-forecast-text-label {
    font-size: 11px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nmmp-forecast-text-body {
    font-size: 12px;
    color: #444;
    line-height: 1.65;
}

/* ─── Tooltip ────────────────────────────────────────────────────────── */
.nmmp-tooltip {
    position: fixed;
    background: rgba(10,20,40,0.97);
    color: #ffffff;
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 12px;
    border-radius: 8px;
    width: 240px;
    z-index: 999999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
    white-space: normal;
    font-family: Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════
   24 ЧАСА ТАБ
═══════════════════════════════════════════════════════════════════════ */

.nmmp-hourly-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    padding-bottom: 8px;
}

.nmmp-hourly-scroll::-webkit-scrollbar { height: 4px; }
.nmmp-hourly-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.nmmp-hourly-inner {
    display: flex;
    gap: 6px;
    width: max-content;
    padding: 2px 2px 4px;
}

.nmmp-hour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 10px;
    background: #f5f5f5;
    border-radius: 12px;
    min-width: 60px;
    border: 1px solid #e8e8e8;
    text-align: center;
    transition: background 0.15s;
}

.nmmp-hour-item:hover { background: #ebebeb; }

.nmmp-hour-item.nmmp-hour-current {
    background: #1a3a5c;
    border-color: #1a3a5c;
    box-shadow: 0 2px 8px rgba(26,58,92,0.4);
}

.nmmp-hour-item.nmmp-hour-current .nmmp-hour-time,
.nmmp-hour-item.nmmp-hour-current .nmmp-hour-temp,
.nmmp-hour-item.nmmp-hour-current .nmmp-hour-prec { color: #ffffff; }

.nmmp-hour-time { font-size: 10px; font-weight: 700; color: #888; }
.nmmp-hour-icon { font-size: 22px; line-height: 1; }
.nmmp-hour-temp { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.nmmp-hour-prec { font-size: 10px; color: #7db3e8; }

/* ═══════════════════════════════════════════════════════════════════════
   7 ДЕНА ТАБ
═══════════════════════════════════════════════════════════════════════ */

.nmmp-forecast-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nmmp-forecast-row {
    display: grid;
    grid-template-columns: 68px 32px 82px 58px 82px;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    font-size: 12px;
    transition: background 0.15s;
}

.nmmp-forecast-row:hover { background: #ebebeb; }

.nmmp-frow-day { display: flex; flex-direction: column; }
.nmmp-frow-dayname { font-weight: 700; color: #1a1a1a; font-size: 12px; }
.nmmp-frow-date { font-size: 10px; color: #aaa; }
.nmmp-frow-icon { font-size: 22px; text-align: center; }
.nmmp-frow-temps { display: flex; gap: 6px; align-items: center; }
.nmmp-frow-max { font-size: 14px; font-weight: 700; }
.nmmp-frow-min { font-size: 12px; color: #888; }
.nmmp-frow-prec { font-size: 11px; color: #7db3e8; text-align: center; }
.nmmp-frow-wind { font-size: 11px; color: #888; text-align: right; }

/* ═══════════════════════════════════════════════════════════════════════
   ВОЗДУХ ТАБ — AQI
═══════════════════════════════════════════════════════════════════════ */

/* Општ AQI индекс */
.nmmp-aqi-overall {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #f8f8f8;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid #ebebeb;
}

.nmmp-aqi-overall-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 70px;
}

.nmmp-aqi-overall-index {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.nmmp-aqi-overall-label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.nmmp-aqi-overall-scale {
    font-size: 9px;
    color: #aaa;
    margin-top: 4px;
    text-align: center;
}

.nmmp-aqi-overall-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.55;
    padding-top: 4px;
}

/* Детални параметри */
.nmmp-aqi-params {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nmmp-aqi-param {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #ebebeb;
}

.nmmp-aqi-param-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.nmmp-aqi-param-short {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    flex-shrink: 0;
}

.nmmp-aqi-param-full {
    font-size: 11px;
    color: #888;
    flex: 1;
}

.nmmp-aqi-param-val {
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.nmmp-aqi-param-val em {
    font-size: 10px;
    font-weight: normal;
    font-style: normal;
    color: #888;
}

/* Скала со зони */
.nmmp-aqi-scale {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
}

.nmmp-aqi-zone {
    height: 100%;
    transition: opacity 0.2s;
}

/* Покажувач */
.nmmp-aqi-indicator-wrap {
    position: relative;
    height: 12px;
    margin-bottom: 2px;
}

.nmmp-aqi-indicator {
    position: absolute;
    top: 0;
    width: 2px;
    height: 12px;
    background: #1a1a1a;
    border-radius: 1px;
    transform: translateX(-50%);
}

/* Зони лабели */
.nmmp-aqi-zone-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.nmmp-aqi-zone-labels span {
    font-size: 9px;
    font-weight: 700;
}

/* Статус, извор, ефект */
.nmmp-aqi-param-status {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.nmmp-aqi-param-source {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
    line-height: 1.4;
}

.nmmp-aqi-param-effect {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* ─── Грешка во модал ────────────────────────────────────────────────── */
.nmmp-modal-error {
    padding: 40px 20px;
    text-align: center;
    color: #e57373;
    font-size: 13px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    #nmmp-wrapper { border-radius: 0; }

    .nmmp-bubble-icon { font-size: 11px; }
    .nmmp-bubble-temp { font-size: 9px; }
    .nmmp-city-label  { font-size: 7.5px; }

    #nmmp-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    #nmmp-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        width: 100%;
    }

    .nmmp-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nmmp-forecast-row {
        grid-template-columns: 58px 28px 72px 50px 1fr;
        gap: 4px;
        padding: 7px 8px;
    }

    .nmmp-modal-temp   { font-size: 38px; }
    .nmmp-modal-wmo-icon { font-size: 28px; }

    .nmmp-tab-btn { font-size: 10px; padding: 9px 2px; }

    .nmmp-tooltip {
        width: 200px;
        font-size: 11px;
    }

    .nmmp-aqi-overall {
        flex-direction: column;
        gap: 8px;
    }

    .nmmp-aqi-overall-left {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        min-width: unset;
    }
}

@media (max-width: 400px) {
    .nmmp-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nmmp-forecast-row {
        grid-template-columns: 52px 26px 65px 44px 1fr;
        font-size: 11px;
    }

    .nmmp-tab-btn { font-size: 9.5px; }
}