/* =============================================
   weather.css — moduł pogody /pogoda
   Pogodynka.eu — jasny motyw
   ============================================= */

/* ---- Page header ---- */
.wx-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 36px;
    padding-bottom: 20px;
}

.wx-header-text { min-width: 0; }

.wx-header-text h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--navy);
    line-height: 1.15;
}

.wx-subtitle {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: .9rem;
}

/* ---- Search ---- */
.wx-search-wrap {
    position: relative;
    width: min(100%, 360px);
    flex-shrink: 0;
}

.wx-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 50px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.wx-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(28, 109, 208, .12);
}

.wx-search-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
}

#wx-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: .97rem;
    outline: none;
    min-width: 0;
}
#wx-search-input::placeholder { color: var(--text-muted); }
#wx-search-input::-webkit-search-cancel-button { display: none; }

.wx-search-clear {
    background: none; border: none; padding: 4px; cursor: pointer;
    color: var(--text-muted); line-height: 1; font-size: 1rem;
}
.wx-search-clear:hover { color: var(--text); }

.wx-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 200;
    margin: 0; padding: 6px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
}

.wx-search-results li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background .14s ease;
}

.wx-search-results li:hover,
.wx-search-results li[aria-selected="true"] {
    background: rgba(28, 109, 208, .08);
}

.wx-search-results .wx-result-name {
    font-weight: 700;
    color: var(--navy);
    font-size: .95rem;
}

.wx-search-results .wx-result-sub {
    font-size: .83rem;
    color: var(--text-muted);
}

.wx-search-results .wx-result-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wx-no-results {
    padding: 14px 12px;
    color: var(--text-muted);
    font-size: .9rem;
    text-align: center;
}

/* ---- Banners ---- */
.wx-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 18px;
    border-radius: var(--r-md);
    margin-bottom: 16px;
    font-size: .95rem;
}

.wx-banner-info {
    border: 1px solid var(--line-accent);
    background: rgba(28, 109, 208, .07);
    color: var(--accent);
}

.wx-banner-warn {
    border: 1px solid rgba(217, 135, 11, .3);
    background: rgba(217, 135, 11, .09);
    color: #7a5200;
}

.wx-banner-icon { font-size: 1.1rem; }

.wx-banner-btn {
    margin-left: auto;
    padding: 7px 16px;
    border: 1px solid var(--primary);
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.wx-banner-btn:hover { background: var(--primary); color: #fff; }

/* ---- Loading skeleton ---- */
.wx-loading { padding: 20px 0 40px; }

@keyframes shimmer {
    0% { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.wx-skeleton {
    border-radius: var(--r-md);
    background: linear-gradient(90deg, #e8eef6 25%, #d6e0ed 50%, #e8eef6 75%);
    background-size: 600px 100%;
    animation: shimmer 1.6s infinite;
}

.wx-skeleton-hero { height: 200px; margin-bottom: 16px; }

.wx-skeleton-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.wx-skeleton-card { height: 110px; }

/* ---- Sections ---- */
.wx-section { padding: 20px 0 28px; }

.wx-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.wx-section-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    color: var(--navy);
}

/* ---- Current conditions: hero + details ---- */
.wx-now-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
}

.wx-hero-card {
    padding: 28px 32px;
    min-width: 260px;
    background:
        linear-gradient(135deg, #fff 0%, var(--surface-alt) 100%);
}

.wx-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wx-hero-icon { font-size: 4.5rem; line-height: 1; }

.wx-hero-temp {
    font-size: 3.6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -.02em;
}

.wx-hero-desc {
    font-size: 1.1rem;
    color: var(--text-soft);
    margin-top: 6px;
}

.wx-hero-feels {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.wx-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.wx-meta-item {
    font-size: .87rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Detail cards grid */
.wx-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wx-detail-card {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wx-detail-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.wx-detail-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.wx-detail-sub {
    font-size: .82rem;
    color: var(--text-muted);
}

/* Progress bars (humidity / cloud) */
.wx-progress-bar {
    height: 5px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
    margin-top: 6px;
}

.wx-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--green));
    transition: width .4s ease;
}

.wx-progress-cloud {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

/* ---- Hourly strip ---- */
.wx-hourly-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding-bottom: 4px;
}

.wx-hourly-strip {
    display: flex;
    gap: 10px;
    padding: 2px 2px 4px;
    width: max-content;
}

.wx-hour-card {
    width: 76px;
    flex-shrink: 0;
    padding: 13px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    cursor: default;
}

.wx-hour-card.is-now {
    border-color: var(--primary);
    background: rgba(28, 109, 208, .07);
    box-shadow: 0 3px 10px rgba(28, 109, 208, .12);
}

.wx-hour-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.wx-hour-time {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .02em;
}

.wx-hour-card.is-now .wx-hour-time { color: var(--primary); font-weight: 800; }

.wx-hour-icon { font-size: 1.7rem; margin: 6px 0 5px; line-height: 1; }

.wx-hour-temp {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.wx-hour-precip {
    font-size: .78rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 4px;
}

.wx-hour-wind {
    font-size: .76rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ---- Chart ---- */
.wx-chart-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wx-tab {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text-soft);
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.wx-tab:hover,
.wx-tab.is-active {
    border-color: var(--primary);
    background: rgba(28, 109, 208, .09);
    color: var(--accent);
    font-weight: 700;
}

.wx-chart-card {
    padding: 20px 16px 14px;
    overflow: hidden;
}

.wx-canvas {
    width: 100% !important;
    max-height: 260px;
}

/* ---- Daily grid ---- */
.wx-daily-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.wx-day-card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    padding: 14px 10px;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.wx-day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-accent);
}

.wx-day-card.is-today { border-color: var(--primary); background: rgba(28, 109, 208, .06); }

.wx-day-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.wx-day-card.is-today .wx-day-label { color: var(--primary); }

.wx-day-icon { font-size: 1.8rem; margin: 5px 0 7px; line-height: 1; }

.wx-day-temps {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
}

.wx-day-max {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy);
}

.wx-day-min {
    font-size: .95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.wx-day-precip {
    font-size: .78rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 5px;
}

.wx-day-wind {
    font-size: .76rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.wx-day-sr-ss {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: grid;
    gap: 1px;
}

/* ---- Empty state ---- */
.wx-empty-state {
    padding: 40px 0 64px;
}

.wx-empty-inner {
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    text-align: center;
}

.wx-empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    line-height: 1;
}

.wx-empty-inner h2 {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    line-height: 1.2;
}

.wx-empty-inner p {
    color: var(--text-soft);
    margin: 0 0 24px;
    font-size: 1rem;
}

.wx-empty-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ─── Responsive ─── */

@media (max-width: 1080px) {
    .wx-daily-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .wx-now-grid {
        grid-template-columns: 1fr;
    }
    .wx-details-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .wx-header { align-items: flex-start; flex-direction: column; gap: 16px; }
    .wx-search-wrap { width: 100%; }

    .wx-hero-card { padding: 22px 20px; }
    .wx-hero-icon { font-size: 3.6rem; }
    .wx-hero-temp { font-size: 3rem; }

    .wx-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wx-skeleton-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .wx-daily-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .wx-chart-tabs { gap: 4px; }
    .wx-tab { padding: 6px 11px; font-size: .82rem; }
}

@media (max-width: 480px) {
    .wx-hero-main { flex-direction: column; align-items: flex-start; gap: 10px; }

    .wx-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wx-daily-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .wx-banner { flex-direction: column; align-items: flex-start; }
    .wx-banner-btn { margin-left: 0; }
}
