/* ==========================================================
   CITYGO WEATHER CARD V3 + BOTTOM SHEET
   Load this file after home-v2.css.
========================================================== */

:root {
    --cg-weather-sun: #ffc83d;
    --cg-weather-cloud: #9fd7ff;
    --cg-weather-rain: #22d3ee;
    --cg-weather-snow: #f8fdff;
    --cg-weather-storm: #ffd54a;
    --cg-weather-fog: #9aa9b8;
    --cg-weather-sunset: #ff7a5c;
}

/* ==========================================================
   HERO WEATHER CARD – COMPACT FINAL
========================================================== */

.cg-home-hero-v2__inner {
    grid-template-columns: minmax(0, 1fr) 285px !important;
    align-items: center !important;
    gap: 32px !important;
}

.cg-home-hero-v2 .cg-weather-card-v2 {
    width: 285px !important;
    min-width: 285px !important;
    max-width: 285px !important;
    min-height: 0 !important;

    margin: 54px 0 0 !important;
    padding: 0 !important;

    align-self: center !important;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 25px !important;

    background:
        radial-gradient(
            circle at top left,
            rgba(8, 199, 212, .13),
            transparent 46%
        ),
        rgba(6, 20, 31, .88) !important;

    box-shadow:
        0 26px 70px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255, 255, 255, .06) !important;

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform: none !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__surface {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px 18px 17px !important;

    display: block !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    border: 0 !important;
    border-radius: inherit !important;
    outline: 0 !important;

    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    color: #fff !important;
    font: inherit !important;
    text-align: left !important;
    cursor: pointer;
}

.cg-home-hero-v2 .cg-weather-card-v2__surface:hover,
.cg-home-hero-v2 .cg-weather-card-v2__surface:focus,
.cg-home-hero-v2 .cg-weather-card-v2__surface:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #fff !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__surface:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(8, 199, 212, .62) !important;
}

/* Header */

.cg-home-hero-v2 .cg-weather-card-v2__header {
    margin: 0 0 13px !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__context {
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__city,
.cg-home-hero-v2 .cg-weather-card-v2__eyebrow {
    margin: 0 !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__city {
    color: #fff !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__eyebrow {
    color: rgba(255, 255, 255, .54) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__open-icon {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;
    background: rgba(255, 255, 255, .07) !important;
    color: rgba(255, 255, 255, .74) !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__open-icon svg {
    width: 14px !important;
    height: 14px !important;
}

/* Main state */

.cg-home-hero-v2 .cg-weather-main-row {
    margin: 0 0 14px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
}

.cg-home-hero-v2 .cg-weather-state {
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

.cg-home-hero-v2 .cg-weather-condition-text {
    margin: 0 !important;

    color: rgba(255, 255, 255, .68) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
}

.cg-home-hero-v2 .cg-weather-temp,
.cg-home-hero-v2 .cg-weather-card-v2 strong {
    margin: 0 !important;
}

.cg-home-hero-v2 .cg-weather-temp strong {
    display: block !important;

    color: #fff !important;
    font-size: 44px !important;
    line-height: .9 !important;
    font-weight: 950 !important;
    letter-spacing: -.055em !important;
}

/* SVG weather icons */

.cg-weather-svg,
.cg-weather-mini-icon,
.cg-weather-detail__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cg-home-hero-v2 .cg-weather-state .cg-weather-svg,
.cg-home-hero-v2 .cg-weather-svg--large {
    width: 32px !important;
    height: 32px !important;
}

.cg-weather-svg svg,
.cg-weather-mini-icon svg,
.cg-weather-detail__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cg-weather-svg--sun {
    color: var(--cg-weather-sun);
}

.cg-weather-svg--cloud {
    color: var(--cg-weather-cloud);
}

.cg-weather-svg--moon {
    color: #ddeBff;
}

.cg-weather-svg--fog,
.cg-weather-svg--wind {
    color: var(--cg-weather-fog);
}

.cg-weather-svg--partly svg path,
.cg-weather-svg--rain svg path,
.cg-weather-svg--storm svg path,
.cg-weather-svg--snow svg path {
    stroke: var(--cg-weather-cloud);
}

.cg-weather-svg--partly svg circle,
.cg-weather-svg--partly svg line {
    stroke: var(--cg-weather-sun);
}

.cg-weather-svg--rain svg line,
.cg-weather-svg--rain svg polyline {
    stroke: var(--cg-weather-rain);
}

.cg-weather-svg--storm svg line,
.cg-weather-svg--storm svg polyline {
    stroke: var(--cg-weather-storm);
}

.cg-weather-svg--snow svg line,
.cg-weather-svg--snow svg polyline,
.cg-weather-svg--snow svg circle {
    stroke: var(--cg-weather-snow);
}

/* Quick-list markup */

.cg-home-hero-v2 .cg-weather-card-v2__quick-list {
    margin: 0 0 13px !important;

    display: grid !important;
    gap: 0 !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__quick-row {
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    border-bottom: 1px solid rgba(255, 255, 255, .055) !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__quick-row:last-child {
    border-bottom: 0 !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__quick-label {
    min-width: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    color: rgba(255, 255, 255, .54) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__quick-label svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;

    fill: none !important;
    stroke: var(--cg-primary) !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.cg-home-hero-v2 .cg-weather-card-v2__quick-row strong {
    margin: 0 !important;

    color: #fff !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-align: right !important;
}

/* Older detail markup compatibility */

.cg-home-hero-v2 .cg-weather-details {
    margin: 0 0 13px !important;

    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
}

.cg-home-hero-v2 .cg-weather-detail {
    min-width: 0 !important;
    min-height: 34px !important;
    height: auto !important;

    margin: 0 !important;
    padding: 7px 0 !important;

    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;

    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .055) !important;
    border-radius: 0 !important;

    background: transparent !important;
    text-align: left !important;
}

.cg-home-hero-v2 .cg-weather-detail:last-child {
    border-bottom: 0 !important;
}

.cg-home-hero-v2 .cg-weather-detail__icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    margin: 0 !important;

    color: var(--cg-primary) !important;
}

.cg-home-hero-v2 .cg-weather-detail__icon svg {
    width: 16px !important;
    height: 16px !important;
}

.cg-home-hero-v2 .cg-weather-detail__content {
    min-width: 0 !important;
    margin: 0 !important;
    display: contents !important;
}

.cg-home-hero-v2 .cg-weather-detail__label {
    margin: 0 !important;

    color: rgba(255, 255, 255, .54) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.cg-home-hero-v2 .cg-weather-detail__value {
    margin: 0 !important;

    color: #fff !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-align: right !important;
}

.cg-home-hero-v2 .cg-weather-detail__value span {
    display: inline !important;
    margin: 0 !important;
    font-size: inherit !important;
}

/* Sunrise and sunset */

.cg-home-hero-v2 .cg-weather-sun {
    margin: 0 0 13px !important;
    padding: 11px 0 0 !important;

    display: grid !important;
    gap: 8px !important;

    border-top: 1px solid rgba(255, 255, 255, .075) !important;
}

.cg-home-hero-v2 .cg-weather-sun__item,
.cg-home-hero-v2 .cg-weather-sun > span {
    min-height: 22px !important;
    margin: 0 !important;

    display: grid !important;
    grid-template-columns: 16px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
}

.cg-home-hero-v2 .cg-weather-mini-icon,
.cg-home-hero-v2 .cg-weather-mini-icon svg {
    width: 15px !important;
    height: 15px !important;
}

.cg-weather-mini-icon--sunrise {
    color: var(--cg-weather-sun);
}

.cg-weather-mini-icon--sunset {
    color: var(--cg-weather-sunset);
}

.cg-home-hero-v2 .cg-weather-sun__content {
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.cg-home-hero-v2 .cg-weather-sun-label {
    margin: 0 !important;

    color: rgba(255, 255, 255, .56) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.cg-home-hero-v2 .cg-weather-sun-time {
    margin: 0 !important;

    color: #fff !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

/* Button */

.cg-home-hero-v2 .cg-weather-more {
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;

    margin: 0 !important;
    padding: 0 14px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1px solid rgba(8, 199, 212, .38) !important;
    border-radius: 999px !important;

    background: rgba(8, 199, 212, .13) !important;
    color: #fff !important;

    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    text-align: center !important;
    cursor: pointer;
}

/* Atmospheric glow */

.cg-home-hero-v2.cg-atmosphere-night .cg-weather-card-v2 {
    box-shadow:
        0 28px 90px rgba(0, 0, 0, .40),
        0 0 60px rgba(90, 145, 255, .08),
        inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.cg-home-hero-v2.cg-atmosphere-golden .cg-weather-card-v2 {
    box-shadow:
        0 28px 90px rgba(0, 0, 0, .36),
        0 0 70px rgba(255, 190, 90, .16),
        inset 0 1px 0 rgba(255, 255, 255, .10) !important;
}

.cg-home-hero-v2.cg-atmosphere-rain .cg-weather-card-v2 {
    box-shadow:
        0 28px 90px rgba(0, 0, 0, .38),
        0 0 70px rgba(34, 211, 238, .12),
        inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.cg-home-hero-v2.cg-atmosphere-wind .cg-weather-card-v2 {
    box-shadow:
        0 28px 90px rgba(0, 0, 0, .36),
        0 0 70px rgba(143, 208, 255, .14),
        inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

/* ==========================================================
   BOTTOM SHEET
========================================================== */
.cg-weather-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.cg-weather-modal.is-open { display: block; }

.cg-weather-modal__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(2,8,15,.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cg-weather-modal__window {
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: min(980px, calc(100% - 32px));
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    transform: translateX(-50%);
    padding: 26px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 30px;
    background: radial-gradient(circle at top left, rgba(8,199,212,.14), transparent 34%), #08141f;
    color: #fff;
    box-shadow: 0 36px 120px rgba(0,0,0,.52);
    outline: none;
}

.cg-weather-modal__handle {
    width: 44px;
    height: 5px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.24);
}

.cg-weather-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.cg-weather-modal__eyebrow {
    color: rgba(255,255,255,.52);
    font-size: 12px;
    font-weight: 750;
}

.cg-weather-modal__header h2 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1;
}

.cg-weather-modal__close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #fff;
    cursor: pointer;
}

.cg-weather-sheet-current {
    display: grid;
    grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
    gap: 18px;
    margin-bottom: 22px;
}

.cg-weather-sheet-current__state,
.cg-weather-sheet-current__summary {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background: rgba(255,255,255,.045);
}

.cg-weather-sheet-current__state {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cg-weather-sheet-current__icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cg-weather-sheet-current__icon svg { width: 54px; height: 54px; }
.cg-weather-sheet-current__state span { display: block; color: rgba(255,255,255,.62); }
.cg-weather-sheet-current__state strong { display: block; margin-top: 4px; font-size: 52px; line-height: .92; }
.cg-weather-sheet-current__summary strong { font-size: 18px; }
.cg-weather-sheet-current__summary p { margin: 8px 0 0; color: rgba(255,255,255,.66); line-height: 1.5; }
.cg-weather-sheet-section + .cg-weather-sheet-section { margin-top: 24px; }
.cg-weather-sheet-section__head { margin-bottom: 12px; }
.cg-weather-sheet-section__head h3 { margin: 0; color: #fff; font-size: 18px; }

.cg-weather-hourly {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.cg-weather-hourly::-webkit-scrollbar { display: none; }

.cg-weather-hourly__item {
    min-width: 82px;
    padding: 13px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
}

.cg-weather-hourly__item > span:first-child,
.cg-weather-hourly__item small { color: rgba(255,255,255,.52); font-size: 11px; }
.cg-weather-hourly__icon,
.cg-weather-hourly__icon svg { width: 28px; height: 28px; }
.cg-weather-hourly__item strong { font-size: 17px; }

.cg-weather-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
}

.cg-weather-stat-card {
    min-height: 92px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
}
.cg-weather-stat-card--marine { background: rgba(8,199,212,.06); }
.cg-weather-stat-card span { color: rgba(255,255,255,.52); font-size: 11px; font-weight: 700; }
.cg-weather-stat-card strong { margin-top: 14px; color: #fff; font-size: 20px; }

.cg-weather-daily { display: grid; gap: 8px; }
.cg-weather-daily__item {
    min-height: 54px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 30px 28px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.cg-weather-daily__icon,
.cg-weather-daily__icon svg { width: 25px; height: 25px; }
.cg-weather-daily__label { color: rgba(255,255,255,.68); }
.cg-weather-daily__item strong { font-size: 15px; }
.cg-weather-daily__item strong span { margin-left: 7px; color: rgba(255,255,255,.42); }

.cg-weather-activities { display: flex; flex-wrap: wrap; gap: 9px; }
.cg-weather-activity {
    min-height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(8,199,212,.20);
    border-radius: 999px;
    background: rgba(8,199,212,.08);
}
.cg-weather-activity strong { font-size: 12px; }
.cg-weather-activity span { color: rgba(255,255,255,.54); font-size: 11px; }

html.cg-weather-modal-open,
html.cg-weather-modal-open body { overflow: hidden; }

@media (max-width: 1100px) {
    .cg-home-hero-v2__inner { grid-template-columns: 1fr; }
    .cg-home-hero-v2 .cg-weather-card-v2 { display: none; }
}

@media (max-width: 760px) {
    .cg-weather-modal__window {
        bottom: 0;
        width: 100%;
        max-height: 90vh;
        padding: 18px 16px 28px;
        border-radius: 28px 28px 0 0;
    }
    .cg-weather-sheet-current { grid-template-columns: 1fr; }
    .cg-weather-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
