/* ============================================================
   AktívBalaton – Időjárás Widget CSS  v2.0.0
   ============================================================ */

/* ── Alap widget keret ──────────────────────────────────────── */
.ab-weather-widget {
    font-family: inherit;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* ── Stílus variánsok ───────────────────────────────────────── */
.ab-weather--glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
}
.ab-weather--card {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    border: 1px solid #e8ecf0;
    color: #1a2332;
}
.ab-weather--dark {
    background: #0d2137;
    border: 1px solid rgba(255,255,255,0.08);
    color: #e8f0f8;
}
.ab-weather--minimal {
    background: transparent;
    color: inherit;
}

/* ── Betöltő állapot ────────────────────────────────────────── */
.ab-weather-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    opacity: 0.7;
}
.ab-weather-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(26, 110, 163, 0.25);
    border-top-color: #1A6EA3;
    border-radius: 50%;
    animation: ab-spin 0.8s linear infinite;
}
@keyframes ab-spin {
    to { transform: rotate(360deg); }
}

/* ── Tab váltó ──────────────────────────────────────────────── */
.ab-weather-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
}
.ab-weather-tab {
    flex: 1;
    padding: 8px 4px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}
.ab-weather-tab:hover {
    background: rgba(26, 110, 163, 0.15);
}
.ab-weather-tab.active {
    background: #1A6EA3;
    border-color: #1A6EA3;
    color: #fff;
}
.ab-weather--card .ab-weather-tab {
    background: #f0f4f8;
    color: #555;
}
.ab-weather--card .ab-weather-tab.active {
    color: #fff;
}
.ab-weather--dark .ab-weather-tab {
    background: rgba(255,255,255,0.07);
}

/* ── Napi részletes nézet ───────────────────────────────────── */
.ab-weather-day-header {
    padding: 20px 20px 12px;
}
.ab-weather-day-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}
.ab-weather-day-name {
    font-size: 18px;
    font-weight: 700;
    text-transform: capitalize;
}
.ab-weather-day-date {
    font-size: 13px;
    opacity: 0.65;
}

.ab-weather-main-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ab-weather-icon-lg {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}
.ab-weather-temps {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.ab-weather-temp-main {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #1A6EA3;
}
.ab-weather--glass .ab-weather-temp-main,
.ab-weather--dark  .ab-weather-temp-main { color: #7dd3fc; }

.ab-weather-temp-min {
    font-size: 22px;
    font-weight: 500;
    opacity: 0.55;
    margin-top: 6px;
}
.ab-weather-condition {
    font-size: 15px;
    opacity: 0.75;
    flex: 1;
}

/* ── Meta adat rács ─────────────────────────────────────────── */
.ab-weather-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 0 12px 16px;
}
.ab-weather-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.07);
    font-size: 13px;
}
.ab-weather--card .ab-weather-meta-item {
    background: #f7f9fc;
}
.ab-weather--dark .ab-weather-meta-item {
    background: rgba(255,255,255,0.04);
}
.ab-meta-icon { font-size: 16px; flex-shrink: 0; }
.ab-meta-label { opacity: 0.6; font-size: 11px; flex: 1; }
.ab-meta-value { font-weight: 600; font-size: 13px; white-space: nowrap; }

/* UV szín kódok */
.uv-low       { color: #22c55e; }
.uv-mid       { color: #eab308; }
.uv-high      { color: #f97316; }
.uv-very-high { color: #ef4444; }
.uv-extreme   { color: #a855f7; }

/* Vízhőmérséklet kiemelés */
.ab-weather-water-temp .ab-meta-value span {
    color: #1A6EA3;
    font-weight: 700;
}
.ab-weather--glass .ab-weather-water-temp .ab-meta-value span,
.ab-weather--dark  .ab-weather-water-temp .ab-meta-value span {
    color: #7dd3fc;
}

/* ── Óránkénti bontás ───────────────────────────────────────── */
.ab-weather-hourly {
    padding: 4px 16px 16px;
}
.ab-weather-hourly-title {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.ab-weather-hourly-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}
.ab-weather-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    font-size: 12px;
    text-align: center;
}
.ab-weather--card .ab-weather-hour { background: #f0f4f8; }
.ab-weather--dark .ab-weather-hour { background: rgba(255,255,255,0.04); }

.ab-hour-time   { font-weight: 600; opacity: 0.7; }
.ab-hour-icon   { width: 28px; height: 28px; }
.ab-hour-temp   { font-weight: 700; }
.ab-hour-precip { font-size: 10px; opacity: 0.75; }

/* ── Előrejelzés grid ───────────────────────────────────────── */
.ab-weather-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 6px;
    padding: 16px;
}
.ab-forecast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    text-align: center;
    font-size: 13px;
}
.ab-weather--card .ab-forecast-card  { background: #f7f9fc; }
.ab-weather--dark .ab-forecast-card  { background: rgba(255,255,255,0.04); }

.ab-forecast-date { display: flex; flex-direction: column; gap: 1px; }
.ab-forecast-weekday  { font-weight: 700; font-size: 13px; text-transform: capitalize; }
.ab-forecast-datenum  { font-size: 11px; opacity: 0.6; }
.ab-forecast-icon  { width: 40px; height: 40px; }
.ab-forecast-temps { display: flex; gap: 6px; align-items: baseline; }
.ab-forecast-max   { font-weight: 700; font-size: 15px; }
.ab-forecast-min   { font-size: 12px; opacity: 0.55; }
.ab-forecast-precip { font-size: 11px; opacity: 0.75; }
.ab-forecast-wind   { font-size: 11px; opacity: 0.65; }
.ab-forecast-water  { font-size: 11px; font-weight: 600; color: #1A6EA3; }
.ab-weather--glass .ab-forecast-water,
.ab-weather--dark  .ab-forecast-water { color: #7dd3fc; }

/* ── Animációk ──────────────────────────────────────────────── */
.ab-icon-anim {
    animation: ab-float 4s ease-in-out infinite;
}
@keyframes ab-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

/* ── Hiba ────────────────────────────────────────────────────── */
.ab-weather-error {
    padding: 24px;
    text-align: center;
    opacity: 0.7;
}

/* ── Reszponzív ─────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
    .ab-weather-tabs { padding: 10px 12px 0; }
    .ab-weather-tab  { font-size: 12px; padding: 7px 4px; }
    .ab-weather-icon-lg { width: 56px; height: 56px; }
    .ab-weather-temp-main { font-size: 42px; }
    .ab-weather-forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 4px;
        padding: 12px;
    }
    .ab-forecast-card { padding: 10px 6px; gap: 3px; }
    .ab-forecast-weekday { font-size: 12px; }
    .ab-forecast-icon { width: 32px; height: 32px; }
    .ab-forecast-max { font-size: 14px; }
}

/* Mobil */
@media (max-width: 600px) {
    .ab-weather-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    .ab-weather-hourly-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ab-weather-temp-main { font-size: 40px; }

    /* Mobilon rejtett meta elemek */
    .ab-weather-widget[data-hide-mobile~="wind"]     .ab-meta-item--wind,
    .ab-weather-widget[data-hide-mobile~="uv"]       .ab-meta-item--uv,
    .ab-weather-widget[data-hide-mobile~="sunrise"]  .ab-meta-item--sunrise,
    .ab-weather-widget[data-hide-mobile~="humidity"] .ab-meta-item--humidity,
    .ab-weather-widget[data-hide-mobile~="hourly"]   .ab-weather-hourly {
        display: none !important;
    }

    /* Mobilon rejtett előrejelzés napok */
    .ab-forecast-card.ab-hide-mobile {
        display: none !important;
    }

    .ab-weather-forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
        gap: 3px;
        padding: 10px;
    }
    .ab-forecast-card { padding: 8px 4px; font-size: 12px; }
    .ab-forecast-icon { width: 28px; height: 28px; }
    .ab-forecast-max { font-size: 13px; }
}
