/* ═══════════════════════════════════════════════════════════
   OWM Weather Widget — Premium Styles v3.1
   ═══════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
.owm-weather {
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Hover ────────────────────────────────────────────────── */
.owm-weather:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.owm-weather--no-hover:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Glow ring */
.owm-weather::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, rgba(102,126,234,0.4), rgba(118,75,162,0.2), rgba(102,126,234,0.0), rgba(118,75,162,0.4));
    background-size: 400% 400%;
    z-index: 0;
    animation: owm-glow 6s ease infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.owm-weather:hover::before { opacity: 1; }
.owm-weather--no-hover:hover::before { opacity: 0; }

@keyframes owm-glow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ── Video background ─────────────────────────────────────── */
.owm-weather__video-bg {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    z-index: 0 !important;
    pointer-events: none;
    border-radius: inherit;
    display: block;
}

/* ── Background image blur layer ──────────────────────────── */
.owm-weather__img-blur {
    position: absolute !important;
    top: -20px !important; left: -20px !important; right: -20px !important; bottom: -20px !important;
    z-index: 0 !important;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* ── Overlay (darken) ─────────────────────────────────────── */
.owm-weather__overlay {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: #000;
    opacity: 0.4;
    z-index: 1 !important;
    pointer-events: none;
    border-radius: inherit;
}

/* Content sits above overlay */
.owm-weather__content,
.owm-weather__forecast,
.owm-weather__error {
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   CONTENT ALIGNMENT (all layouts) — via Elementor prefix_class
   ═══════════════════════════════════════════════════════════ */
.owm-align-center .owm-weather__content,
.owm-align-center .owm-weather__body,
.owm-align-center .owm-weather__footer { text-align: center; }
.owm-align-center .owm-weather__header,
.owm-align-center .owm-weather__temp,
.owm-align-center .owm-weather__meta,
.owm-align-center .owm-weather__sun,
.owm-align-center .owm-weather__minimal-wrap,
.owm-align-center .owm-weather__inline-wrap,
.owm-align-center .owm-weather__header-wrap,
.owm-align-center .owm-weather__forecast-grid { justify-content: center; }

.owm-align-right .owm-weather__content,
.owm-align-right .owm-weather__body,
.owm-align-right .owm-weather__footer { text-align: right; }
.owm-align-right .owm-weather__header,
.owm-align-right .owm-weather__temp,
.owm-align-right .owm-weather__meta,
.owm-align-right .owm-weather__sun,
.owm-align-right .owm-weather__minimal-wrap,
.owm-align-right .owm-weather__inline-wrap,
.owm-align-right .owm-weather__header-wrap,
.owm-align-right .owm-weather__forecast-grid { justify-content: flex-end; }


/* ── Header ───────────────────────────────────────────────── */
.owm-weather__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.owm-weather__location {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.owm-weather__city {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.owm-weather__country {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.6;
    font-weight: 500;
}

/* ── Icon ─────────────────────────────────────────────────── */
.owm-weather__icon img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.25));
    animation: owm-float 4s ease-in-out infinite;
}
@keyframes owm-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ── Body ─────────────────────────────────────────────────── */
.owm-weather__body { margin-bottom: 20px; }
.owm-weather__temp { display: flex; align-items: flex-start; gap: 4px; line-height: 1; margin-bottom: 6px; }
.owm-weather__temp-value {
    font-size: 52px;
    font-weight: 800;
    color: #FFD700;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 20px rgba(255, 215, 0, 0.3);
}
.owm-weather__temp-unit { font-size: 1.2rem; font-weight: 600; opacity: 0.7; margin-top: 8px; }
.owm-weather__desc { font-size: 1.05rem; opacity: 0.85; text-transform: capitalize; margin-bottom: 4px; }
.owm-weather__feels { font-size: 0.85rem; opacity: 0.6; }

/* ── Meta pills ───────────────────────────────────────────── */
.owm-weather__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 12px;
}
.owm-weather__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}
.owm-weather__meta-item:hover { background: rgba(255, 255, 255, 0.14); }

/* ── Sun row ──────────────────────────────────────────────── */
.owm-weather__sun {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.88rem;
    opacity: 0.7;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Footer ───────────────────────────────────────────────── */
.owm-weather__footer {
    font-size: 0.78rem;
    opacity: 0.45;
    text-align: right;
    margin-top: 8px;
    letter-spacing: 0.04em;
}

/* ── Error ────────────────────────────────────────────────── */
.owm-weather__error { text-align: center; padding: 20px 10px; }
.owm-weather__error-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.owm-weather__error p { font-size: 0.9rem; opacity: 0.8; margin: 0; }

/* ── Fade animations ──────────────────────────────────────── */
.owm-weather.owm-fade-out { opacity: 0; transition: opacity 0.3s ease; }
.owm-weather.owm-fade-in  { opacity: 1; transition: opacity 0.4s ease; }

/* ── Shadow toggles ───────────────────────────────────────── */
.owm-weather--no-icon-shadow .owm-weather__icon img { filter: none !important; }
.owm-weather--no-temp-shadow .owm-weather__temp-value { text-shadow: none !important; }


/* ═══════════════════════════════════════════════════════════
   FORECAST SECTION
   ═══════════════════════════════════════════════════════════ */
.owm-weather .owm-weather__forecast {
    position: relative;
    z-index: 2;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.owm-weather .owm-weather__forecast-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 14px;
    font-weight: 600;
}
.owm-weather .owm-weather__forecast-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
}
.owm-weather .owm-weather__forecast-day {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 1 55px !important;
    min-width: 55px !important;
    max-width: none !important;
    width: auto !important;
    padding: 12px 6px !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}
.owm-weather .owm-weather__forecast-day:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
.owm-weather .owm-weather__forecast-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.9;
    display: block !important;
    width: auto !important;
}
.owm-weather .owm-weather__forecast-day img {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.15));
    margin: 0 auto;
}
.owm-weather .owm-weather__forecast-temps {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    line-height: 1.2;
    width: auto !important;
}
.owm-weather .owm-weather__forecast-max { font-size: 0.85rem; font-weight: 700; color: inherit; }
.owm-weather .owm-weather__forecast-min { font-size: 0.75rem; opacity: 0.45; }
.owm-weather .owm-weather__forecast-sep { font-size: 0.65rem; opacity: 0.3; }


/* ═══════════════════════════════════════════════════════════
   INLINE LAYOUT
   ═══════════════════════════════════════════════════════════ */
.owm-weather--inline { max-width: 100%; padding: 16px 24px; border-radius: 16px; }
.owm-weather--inline .owm-weather__inline-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.owm-weather--inline .owm-weather__icon img { width: 56px; height: 56px; }
.owm-weather--inline .owm-weather__inline-temp { display: flex; align-items: flex-start; gap: 2px; }
.owm-weather--inline .owm-weather__temp-value { font-size: 2rem; }
.owm-weather--inline .owm-weather__temp-unit { font-size: 0.9rem; margin-top: 4px; }
.owm-weather--inline .owm-weather__inline-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 120px; }
.owm-weather--inline .owm-weather__city { font-size: 1rem; }
.owm-weather--inline .owm-weather__desc { font-size: 0.85rem; }
.owm-weather--inline .owm-weather__meta { border-top: none; padding-top: 0; margin-bottom: 0; margin-left: auto; gap: 8px; }
.owm-weather--inline .owm-weather__meta-item { font-size: 0.8rem; padding: 4px 10px; }
.owm-weather--inline .owm-weather__forecast { margin-top: 12px; padding-top: 12px; }
.owm-weather--inline .owm-weather__forecast-day { padding: 6px 3px !important; }
.owm-weather--inline .owm-weather__forecast-day img { width: 30px !important; height: 30px !important; }


/* ═══════════════════════════════════════════════════════════
   MINIMAL LAYOUT
   ═══════════════════════════════════════════════════════════ */
.owm-weather--minimal { max-width: 240px; padding: 16px 20px; border-radius: 16px; text-align: center; }
.owm-weather--minimal .owm-weather__minimal-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.owm-weather--minimal .owm-weather__icon img { width: 44px; height: 44px; }
.owm-weather--minimal .owm-weather__temp-value { font-size: 1.6rem; }
.owm-weather--minimal .owm-weather__temp-unit { font-size: 0.85rem; margin-top: 2px; }
.owm-weather--minimal .owm-weather__city { font-size: 0.82rem; opacity: 0.7; width: 100%; }

/* Minimal meta */
.owm-weather--minimal .owm-weather__meta--minimal {
    justify-content: center;
    gap: 6px;
    padding-top: 10px;
    margin-bottom: 4px;
}
.owm-weather--minimal .owm-weather__meta--minimal .owm-weather__meta-item {
    font-size: 0.72rem;
    padding: 3px 10px;
}

/* Minimal forecast */
.owm-weather--minimal .owm-weather__forecast { margin-top: 10px; padding-top: 10px; }
.owm-weather--minimal .owm-weather__forecast-grid { gap: 4px !important; }
.owm-weather--minimal .owm-weather__forecast-day { padding: 6px 3px !important; }
.owm-weather--minimal .owm-weather__forecast-day img { width: 26px !important; height: 26px !important; }
.owm-weather--minimal .owm-weather__forecast-name { font-size: 0.6rem; }
.owm-weather--minimal .owm-weather__forecast-max { font-size: 0.7rem; }
.owm-weather--minimal .owm-weather__forecast-min { font-size: 0.6rem; }


/* ═══════════════════════════════════════════════════════════
   HEADER LAYOUT — ultra-slim strip for nav / header bar
   ═══════════════════════════════════════════════════════════ */
.owm-weather--header {
    max-width: none !important;
    width: auto !important;
    display: inline-flex !important;
    padding: 0 10px !important;
    border-radius: 14px !important;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1 !important;
    min-height: 0 !important;
}
.owm-weather--header:hover {
    transform: none !important;
    box-shadow: none !important;
}
.owm-weather--header::before { display: none !important; }

.owm-weather--header .owm-weather__content {
    display: flex;
    align-items: center;
}

.owm-weather--header .owm-weather__header-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 3px 0;
    line-height: 1;
}

.owm-weather--header .owm-weather__icon {
    display: flex;
    align-items: center;
    line-height: 0;
}

.owm-weather--header .owm-weather__icon img {
    width: 18px !important;
    height: 18px !important;
    animation: none !important;
    filter: none !important;
}

.owm-weather--header .owm-weather__temp-value {
    font-size: 0.8rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: none !important;
    line-height: 1;
}

.owm-weather--header .owm-weather__temp-unit {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 0;
    margin-left: -2px;
    line-height: 1;
}

.owm-weather--header .owm-weather__header-sep {
    opacity: 0.25;
    font-size: 0.6rem;
    font-weight: 300;
    line-height: 1;
}

.owm-weather--header .owm-weather__city {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
    line-height: 1;
}

.owm-weather--header .owm-weather__desc {
    font-size: 0.6rem;
    opacity: 0.55;
    text-transform: capitalize;
    line-height: 1;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .owm-weather { padding: 20px; border-radius: 18px; }
    .owm-weather .owm-weather__temp-value { font-size: 40px; }
    .owm-weather .owm-weather__icon img { width: 70px; height: 70px; }
    .owm-weather .owm-weather__meta { gap: 8px; }
    .owm-weather .owm-weather__meta-item { font-size: 0.8rem; padding: 5px 10px; }

    /* Forecast wraps nicely on mobile */
    .owm-weather .owm-weather__forecast-grid {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    .owm-weather .owm-weather__forecast-day {
        flex: 1 1 calc(33.333% - 6px) !important;
        min-width: 60px !important;
        max-width: calc(33.333% - 6px) !important;
        padding: 8px 4px !important;
        border-radius: 10px;
    }
    .owm-weather .owm-weather__forecast-day img { width: 28px !important; height: 28px !important; }
    .owm-weather .owm-weather__forecast-name { font-size: 0.65rem; }
    .owm-weather .owm-weather__forecast-max { font-size: 0.75rem; }
    .owm-weather .owm-weather__forecast-min { font-size: 0.65rem; }

    .owm-weather--inline .owm-weather__inline-wrap { gap: 10px; }
    .owm-weather--inline .owm-weather__meta {
        width: 100%;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Header responsive */
    .owm-weather--header .owm-weather__desc { display: none; }

    /* Minimal responsive */
    .owm-weather--minimal .owm-weather__meta--minimal .owm-weather__meta-item { font-size: 0.65rem; padding: 2px 8px; }
}
