/* ============================================
   CLOCK7 WEATHER PORTAL (INDEX PAGE)
   ============================================ */

#weather-page {
    padding-top: 90px;
    padding-bottom: 40px;
}

#weather-page .container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Hero */
.weather-hero {
    text-align: center;
    margin-bottom: 20px;
}

.weather-hero h1 {
    font-size: 2rem;
    margin-bottom: 6px;
}

.weather-hero p {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Controls: search + temp toggle */
.weather-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.weather-search-wrap {
    flex: 1;
    min-width: 220px;
}

#weatherSearch {
    width: 100%;
    max-width: 360px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

/* Temperature toggle */
.temp-toggle {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.temp-btn {
    border: none;
    background: transparent;
    padding: 7px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 46px;
}

.temp-btn.active {
    background: #111827;
    color: #f9fafb;
}

/* Continents */
.weather-continents {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.continent-chip {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #ffffff;
    cursor: pointer;
    color: #4b5563;
}

.continent-chip.active {
    background: #111827;
    color: #f9fafb;
    border-color: #111827;
}

/* Table header */
.weather-table-wrap {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.weather-table-header {
    display: grid;
    grid-template-columns: 2.2fr 2fr 1.3fr 2.1fr 1fr;
    padding: 10px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.weather-rows {
    display: block;
}

/* Each row */
.weather-row {
    display: grid;
    grid-template-columns: 2.2fr 2fr 1.3fr 2.1fr 1fr;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.95rem;
    text-decoration: none;
    color: #111827;
    border-bottom: 1px solid #e5e7eb; /* grey divider like time.now */
    transition: background-color 0.12s ease;
}

.weather-row:last-child {
    border-bottom: none;
}

.weather-row:hover {
    background-color: #f9fafb;
}

/* City cell */
.wr-city {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wr-flag {
    font-size: 1.1rem;
}

.wr-city-name {
    font-weight: 500;
}

/* Country cell */
.wr-country {
    font-size: 0.9rem;
    color: #4b5563;
}

/* Time */
.wr-local-time {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
}

/* Weather text */
.wr-weather {
    font-size: 0.9rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wr-weather-icon {
    font-size: 1.1rem;
}

/* Temp */
.wr-temp {
    font-weight: 600;
    text-align: right;
}

/* Skeleton / loading state */
.weather-row.skeleton .wr-local-time,
.weather-row.skeleton .wr-weather,
.weather-row.skeleton .wr-temp {
    color: transparent;
    position: relative;
}

.weather-row.skeleton .wr-local-time::before,
.weather-row.skeleton .wr-weather::before,
.weather-row.skeleton .wr-temp::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Count */
.weather-count {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* SEO text */
.weather-seo-text {
    margin-top: 24px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
}

.weather-seo-text h2 {
    font-size: 1.1rem;
    margin-top: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .weather-table-header {
        display: none; /* hide header on very small screens */
    }

    .weather-row {
        grid-template-columns: 1.4fr 1.4fr;
        grid-template-rows: auto auto;
        row-gap: 4px;
    }

    .wr-city {
        grid-column: 1 / 3;
    }

    .wr-country {
        grid-column: 1 / 2;
    }

    .wr-local-time {
        grid-column: 2 / 3;
        text-align: right;
    }

    .wr-weather {
        grid-column: 1 / 2;
    }

    .wr-temp {
        grid-column: 2 / 3;
    }
}


/* ============================================
   CITY WEATHER PAGE
   ============================================ */

.city-weather-page {
    padding-top: 90px;
    padding-bottom: 32px;
}

/* Header row: breadcrumb (left) + centered title */
.city-weather-header-row {
    position: relative;
    margin-bottom: 18px;
    text-align: center;
    padding-top: 4px;
}

.city-weather-title-inline {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.city-weather-flag-inline {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
    transform: translateY(2px);
}

.city-weather-breadcrumb {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.city-weather-breadcrumb a {
    text-decoration: none;
    color: inherit;
}

.city-weather-breadcrumb a:hover {
    text-decoration: underline;
    color: #374151;
}

/* Reuse crumb-separator / crumb-current from countries */
.city-weather-breadcrumb .crumb-separator {
    opacity: 0.7;
}
.city-weather-breadcrumb .crumb-current {
    font-weight: 500;
    color: #111827;
}

/* Hero */
.city-weather-hero {
    text-align: center;
    margin-bottom: 18px;
}

.city-weather-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.city-weather-main-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: center;
}


.cw-temp-block {
    text-align: center;
}

.cw-temp-main {
    font-size: 2.6rem;
    font-weight: 700;
    color: #111827;
}

/* Condition line under main temperature (icon + text) */
.cw-condition-main {
    font-size: 0.95rem;
    color: #4b5563;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cw-main-icon {
    font-size: 1.4rem;
    line-height: 1;
}

/* “Feel” line under condition */
.cw-feel-line {
    margin-top: 4px;
    font-size: 0.9rem;
    color: #6b7280;
}


.cw-meta-block {
    font-size: 0.95rem;
    color: #4b5563;
    min-width: 220px;
}

.cw-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cw-label {
    font-weight: 500;
    color: #6b7280;
}

.cw-value {
    font-weight: 500;
}

/* City temperature buttons (reuse styling) */
.city-temp-btn {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    margin-left: 4px;
    margin-right: 2px;
}

.city-temp-btn.active {
    background: #111827;
    color: #f9fafb;
    border-color: #111827;
}

/* Main grid */
.city-weather-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1.5fr);
    gap: 24px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .city-weather-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.cw-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.cw-card h2 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

/* Current grid inside card */
.cw-current-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.cw-current-item {
    font-size: 0.9rem;
}

/* Forecast */
.cw-forecast-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.cw-today-range {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.cw-forecast-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cw-forecast-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 4px 0;
    border-top: 1px dashed #e5e7eb;
}

.cw-forecast-list li:first-child {
    border-top: none;
}

.cw-forecast-day {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cw-forecast-icon {
    font-size: 1rem;
}

.cw-forecast-temp {
    font-weight: 500;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .city-weather-header-row {
        text-align: left;
    }

    .city-weather-breadcrumb {
        position: static;
        transform: none;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }

    .city-weather-title-inline {
        font-size: 1.8rem;
        justify-content: flex-start;
        text-align: left;
    }

    .city-weather-flag-inline {
        font-size: 1.6rem;
    }
}


/* ===========================
   City page – Today at a glance
   =========================== */

.cw-today-glance .cw-glance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.cw-glance-item {
    font-size: 0.9rem;
    padding: 8px 10px;
    border-radius: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.cw-glance-item .cw-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 2px;
}

.cw-glance-item .cw-value {
    font-weight: 600;
    color: #111827;
}


/* ===========================
   City page – 12-hour timeline
   =========================== */

.cw-hourly-card {
    margin-top: 4px;
}

.cw-hourly-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.cw-hourly-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.cw-hourly-item {
    flex: 0 0 auto;
    min-width: 90px;
    padding: 6px 8px;
    border-radius: 999px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
}

.cw-hourly-time {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.cw-hourly-icon {
    margin-right: 4px;
}

.cw-hourly-temp {
    font-weight: 500;
}


/* ======================
   City page – Nearby cities
   ====================== */

.city-nearby {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.city-nearby h2 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.city-nearby-intro {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 14px;
}

.city-nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.city-nearby-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #111827;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.city-nearby-card:hover {
    background-color: #ffffff;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.city-nearby-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.city-nearby-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.city-nearby-flag {
    font-size: 1.1rem;
}

.city-nearby-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.city-nearby-tz {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 640px) {
    .city-nearby-grid {
        grid-template-columns: 1fr;
    }
}





/* ============================================
   WEATHER BROWSE LINKS (CONTINENTS & COUNTRIES)
   ============================================ */

.weather-browse-links {
    margin-top: 28px;
    margin-bottom: 8px;
}

.weather-browse-links h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Continent cards */
.wb-continent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.wb-continent-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    font-size: 0.9rem;
}

.wb-continent-card > a {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.wb-continent-card > a:hover {
    text-decoration: underline;
}

/* Small list of example countries under each continent */
.wb-continent-countries {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wb-continent-countries a {
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    text-decoration: none;
    color: #4b5563;
    white-space: nowrap;
}

.wb-continent-countries a:hover {
    background-color: #ffffff;
    border-color: #d1d5db;
}

/* All countries grid */
.wb-country-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.wb-country-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    color: #111827;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.wb-country-link:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.wb-country-flag {
    font-size: 1.1rem;
}

.wb-country-name {
    font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .weather-browse-links {
        margin-top: 24px;
    }

    .wb-continent-grid {
        grid-template-columns: 1fr;
    }

    .wb-country-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .wb-country-grid {
        grid-template-columns: 1fr;
    }
}
