.kc-weather-widget,
.kc-weather-widget * {
    box-sizing: border-box;
}

.kc-weather-widget {
    width: 100%;
    color: var(--kc-weather-text, #111827);
    font-family: inherit;
}

.kc-weather-card {
    overflow: hidden;
    border: 1px solid var(--kc-weather-border, #e5e7eb);
    border-radius: 18px;
    background: var(--kc-weather-current-bg, #f9fafb);
    box-shadow: var(--kc-weather-card-shadow, 0 18px 45px rgba(15, 23, 42, 0.16));
}

.kc-weather-widget--no-shadow .kc-weather-card {
    box-shadow: none;
}

.kc-weather-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: var(--kc-weather-header-bg, #ffffff);
    border-bottom: 1px solid var(--kc-weather-border, #e5e7eb);
}

.kc-weather-title strong {
    display: block;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.15;
}

.kc-weather-title span,
.kc-weather-updated,
.kc-day-date,
.kc-day-condition,
.kc-detail span,
.kc-low,
.kc-pop,
.kc-weather-footer,
.kc-weather-provider {
    color: var(--kc-weather-muted-text, #6b7280);
}

.kc-weather-title span {
    display: block;
    margin-top: 4px;
}

.kc-weather-updated {
    text-align: right;
    font-size: 0.875rem;
    line-height: 1.35;
}

.kc-weather-provider {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
}

.kc-weather-main {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
    gap: 0;
}


.kc-weather-widget--current-only .kc-weather-main {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
}

.kc-weather-widget--current-only .kc-weather-current {
    border-right: 1px solid var(--kc-weather-border, #e5e7eb);
}

.kc-current-details--forecast-slot {
    align-content: start;
    margin-top: 0;
    padding: 22px;
    background: var(--kc-weather-day-bg, #ffffff);
}

.kc-current-details--forecast-slot .kc-detail {
    min-height: 84px;
}

.kc-weather-current {
    padding: 22px;
    background: var(--kc-weather-current-bg, #f9fafb);
    border-right: 1px solid var(--kc-weather-border, #e5e7eb);
}

.kc-current-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kc-current-icon,
.kc-day-icon {
    color: var(--kc-weather-icon-color, #2563eb);
}

.kc-wx-svg {
    display: block;
    width: 58px;
    height: 58px;
}

.kc-day .kc-wx-svg {
    width: 32px;
    height: 32px;
}

.kc-wx-emoji {
    display: inline-block;
    font-size: 3rem;
    line-height: 1;
}

.kc-day .kc-wx-emoji {
    font-size: 1.75rem;
}

.kc-current-temp {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.kc-current-temp sup {
    font-size: 0.35em;
    letter-spacing: 0;
    vertical-align: super;
}

.kc-current-condition {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.kc-current-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.kc-detail {
    padding: 12px;
    border: 1px solid var(--kc-weather-border, #e5e7eb);
    border-radius: 12px;
    background: var(--kc-weather-detail-bg, #ffffff);
}

.kc-detail span,
.kc-detail strong {
    display: block;
}

.kc-detail span {
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.kc-detail strong {
    font-size: 1rem;
}

.kc-forecast {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--kc-weather-day-bg, #ffffff);
}

.kc-day {
    display: grid;
    grid-template-columns: 62px 42px minmax(90px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid var(--kc-weather-border, #e5e7eb);
    background: var(--kc-weather-day-bg, #ffffff);
}

.kc-day:nth-child(even) {
    background: var(--kc-weather-day-bg-alt, #f9fafb);
}

.kc-day-name {
    font-weight: 800;
}

.kc-day-date,
.kc-day-condition,
.kc-low,
.kc-pop {
    font-size: 0.875rem;
}

.kc-high {
    font-weight: 800;
    margin-right: 5px;
}

.kc-low,
.kc-pop {
    display: inline-block;
    margin-left: 4px;
}

.kc-weather-footer {
    padding: 12px 20px;
    background: var(--kc-weather-footer-bg, #f9fafb);
    border-top: 1px solid var(--kc-weather-border, #e5e7eb);
    font-size: 0.85rem;
}

.kc-weather-loading,
.kc-weather-error {
    padding: 18px;
    border: 1px solid var(--kc-weather-border, #e5e7eb);
    border-radius: 14px;
    background: var(--kc-weather-current-bg, #f9fafb);
}

.kc-weather-widget--compact .kc-weather-header,
.kc-weather-widget--compact .kc-weather-current,
.kc-weather-widget--compact .kc-day {
    padding: 12px 14px;
}

.kc-weather-widget--compact .kc-current-details {
    display: none;
}

@media (max-width: 760px) {
    .kc-weather-header,
    .kc-weather-main {
        display: block;
    }

    .kc-weather-updated {
        margin-top: 8px;
        text-align: left;
    }

    .kc-weather-widget--current-only .kc-weather-main {
        display: block;
    }

    .kc-weather-current,
    .kc-weather-widget--current-only .kc-weather-current {
        border-right: 0;
        border-bottom: 1px solid var(--kc-weather-border, #e5e7eb);
    }

    .kc-current-details--forecast-slot {
        padding: 18px;
    }

    .kc-day {
        grid-template-columns: 58px 36px 1fr;
    }

    .kc-day > div:last-child {
        grid-column: 1 / -1;
    }
}
