/* Weather widget embed */
.ww {
    --ww-radius: 10px;
    --ww-fs-location: 13px;
    --ww-fs-temp: 28px;
    --ww-fs-temp-sm: 11px;
    --ww-fs-body: 12px;
    --ww-fs-small: 10px;
    --ww-fs-city-name: 12px;
    --ww-fs-city-temp: 16px;
    --ww-fs-daypart-label: 9px;
    --ww-fs-hour-temp: 11px;
    --ww-fs-aqi-badge: 11px;
    --ww-temp-current: var(--ww-accent, #1d8fe8);
    --ww-temp-max: #f59e0b;
    --ww-temp-min: var(--ww-label, var(--ww-muted, #5a6d82));
    --ww-value: var(--ww-text, #0c1929);
    --ww-label: var(--ww-muted, #5a6d82);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--ww-bg, #f4f8fc);
    color: var(--ww-text, #0c1929);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.ww--light {
    --ww-surface: rgba(12, 25, 41, 0.05);
}

.ww--dark {
    --ww-surface: rgba(255, 255, 255, 0.05);
}

.ww--dark .ww__location-flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ww__content {
    flex: 0 0 auto;
    padding: 12px 14px;
    overflow: visible;
}

.ww__loading {
    color: var(--ww-muted, #5a6d82);
    font-size: var(--ww-fs-body, 12px);
    text-align: center;
    padding: 24px 0;
}

.ww__brand {
    flex-shrink: 0;
    padding: 4px 10px 8px;
    text-align: center;
    border-top: 1px solid var(--ww-border, rgba(12,25,41,.14));
}

.ww__brand a {
    font-size: var(--ww-fs-small, 10px);
    color: var(--ww-muted, #5a6d82);
    text-decoration: none;
}

.ww__brand a:hover {
    color: var(--ww-accent, #1d8fe8);
}

/* Current / today header */
.ww__header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.ww__location {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--ww-fs-location, 13px);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ww-text);
    text-decoration: none;
    text-align: center;
}

.ww__location-flag {
    width: 16px;
    height: 12px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ww__location-name {
    line-height: 1.3;
}

.ww__location:hover {
    color: var(--ww-accent);
}

.ww__hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ww__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
}

.ww__temps {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.1;
}

.ww__temp-max {
    font-size: var(--ww-fs-temp, 28px);
    font-weight: 700;
    color: var(--ww-temp-max);
}

.ww__temp-min {
    font-size: var(--ww-fs-temp, 28px);
    font-weight: 700;
    color: var(--ww-temp-min);
}

.ww__temp {
    font-size: var(--ww-fs-temp, 28px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ww-temp-current, var(--ww-accent));
}

.ww__forecast-card {
    text-align: center;
}

.ww__forecast-label {
    font-size: var(--ww-fs-body, 12px);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ww-value, var(--ww-text));
    text-align: center;
}

.ww__details {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.ww__details-inner {
    width: max-content;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: var(--ww-fs-body, 12px);
    line-height: 1.35;
}

.ww__details-inner col.ww__details-col-icon {
    width: 14px;
}

.ww__details-inner tr.ww__detail {
    display: table-row;
}

.ww__details-inner td {
    padding: 2px 0;
    vertical-align: middle;
    text-align: left;
}

.ww__details-inner .ww__detail-icon-cell,
.ww__details-inner .ww__detail-label-col,
.ww__details-inner .ww__detail-value {
    display: table-cell;
}

.ww__details-inner .ww__detail-icon-cell {
    width: 14px;
    padding-right: 6px;
    text-align: left;
}

.ww__details-inner .ww__detail-label-col {
    padding-right: 12px;
    text-align: left;
    white-space: nowrap;
}

.ww__details-inner .ww__detail-icon {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0;
}

.ww__details-inner .ww__detail-label {
    display: inline-block;
    text-align: left;
}

.ww__details-inner .ww__detail-value {
    text-align: left;
    font-weight: 500;
    color: var(--ww-value, var(--ww-text));
    white-space: nowrap;
}

.ww__detail {
    display: grid;
    grid-template-columns: auto auto;
    gap: 4px 12px;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    max-width: 300px;
    font-size: var(--ww-fs-body, 12px);
    line-height: 1.35;
}

.ww__detail-label-col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

.ww__detail-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Colored label icons (aligned with main site weather details) */
.ww__detail-icon--description {
    filter: brightness(0) saturate(100%) invert(72%) sepia(55%) saturate(1200%) hue-rotate(355deg) brightness(1.05) contrast(1.1);
}

.ww__detail-icon--min_max {
    filter: brightness(0) saturate(100%) invert(58%) sepia(90%) saturate(1800%) hue-rotate(360deg) brightness(1.05) contrast(1.1);
}

.ww__detail-icon--feels_like {
    filter: brightness(0) saturate(100%) invert(62%) sepia(35%) saturate(1800%) hue-rotate(310deg) brightness(1.05) contrast(1.1);
}

.ww__detail-icon--wind {
    filter: brightness(0) saturate(100%) invert(56%) sepia(100%) saturate(3000%) hue-rotate(165deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--cloud {
    filter: brightness(0) saturate(100%) invert(62%) sepia(100%) saturate(3000%) hue-rotate(195deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--pressure {
    filter: brightness(0) saturate(100%) invert(48%) sepia(100%) saturate(3000%) hue-rotate(250deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--humidity {
    filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(3000%) hue-rotate(155deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--visibility {
    filter: brightness(0) saturate(100%) invert(66%) sepia(100%) saturate(3000%) hue-rotate(200deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--uv_index {
    filter: brightness(0) saturate(100%) invert(75%) sepia(100%) saturate(3000%) hue-rotate(5deg) brightness(1.2) contrast(1.4);
}

.ww__detail-icon--sunrise {
    filter: brightness(0) saturate(100%) invert(85%) sepia(40%) saturate(1500%) hue-rotate(355deg) brightness(1.05) contrast(1.1);
}

.ww__detail-icon--sunset {
    filter: brightness(0) saturate(100%) invert(55%) sepia(90%) saturate(2000%) hue-rotate(355deg) brightness(1) contrast(1.2);
}

.ww__detail-icon--precip {
    filter: brightness(0) saturate(100%) invert(52%) sepia(85%) saturate(2200%) hue-rotate(185deg) brightness(1.1) contrast(1.2);
}

.ww__detail-label {
    color: var(--ww-label, var(--ww-muted));
    min-width: 0;
}

.ww__detail-label::after {
    content: ':';
}

.ww__detail-value {
    color: var(--ww-value, var(--ww-text));
    font-weight: 500;
    text-align: center;
    min-width: 0;
    word-wrap: break-word;
}

.ww__desc {
    font-size: var(--ww-fs-body, 12px);
    color: var(--ww-label, var(--ww-muted));
    margin-top: 2px;
    text-align: center;
}

/* Day parts (today widget) */
.ww__dayparts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ww-border);
}

.ww__daypart {
    text-align: center;
    min-width: 0;
}

.ww__daypart-label {
    font-size: var(--ww-fs-daypart-label, 9px);
    font-weight: 600;
    color: var(--ww-label, var(--ww-muted));
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.ww__daypart-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

.ww__daypart-temp {
    font-size: var(--ww-fs-body, 12px);
    font-weight: 700;
    color: var(--ww-value, var(--ww-text));
    line-height: 1.2;
}

.ww__daypart-desc {
    font-size: var(--ww-fs-daypart-label, 9px);
    color: var(--ww-label, var(--ww-muted));
    margin-top: 2px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ww__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
}

.ww__meta-line {
    font-size: var(--ww-fs-small, 10px);
    line-height: 1.3;
    color: var(--ww-label, var(--ww-muted));
    word-wrap: break-word;
}

.ww__day .ww__meta {
    margin-top: 2px;
    gap: 1px;
}

.ww__day .ww__meta-line {
    font-size: var(--ww-fs-daypart-label, 9px);
    padding: 0 1px;
}

.ww__daypart .ww__meta-line {
    font-size: var(--ww-fs-small, 10px);
    line-height: 1.35;
}

/* Hourly strip */
.ww__hourly {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid var(--ww-border);
    scrollbar-width: thin;
}

.ww__hour {
    flex: 0 0 auto;
    text-align: center;
    min-width: 44px;
    font-size: var(--ww-fs-small, 10px);
}

.ww__hour-time {
    color: var(--ww-label, var(--ww-muted));
    margin-bottom: 4px;
}

.ww__hour-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ww__hour-temp {
    font-weight: 600;
    font-size: var(--ww-fs-hour-temp, 11px);
    margin-top: 2px;
    color: var(--ww-value, var(--ww-text));
}

/* Week row */
.ww__week {
    display: grid;
    grid-template-columns: repeat(var(--ww-week-days, 7), minmax(0, 1fr));
    gap: 4px;
}

.ww__day {
    flex: 1;
    text-align: center;
    min-width: 52px;
    font-size: var(--ww-fs-small, 10px);
}

.ww__day-label {
    color: var(--ww-label, var(--ww-muted));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.ww__day-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ww__day-temps {
    margin-top: 2px;
}

.ww__day-temps .ww__temps {
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.ww__day-temps .ww__temp-max,
.ww__day-temps .ww__temp-min {
    font-size: var(--ww-fs-temp-sm, 11px);
    font-weight: 700;
    line-height: 1.2;
}

.ww__day-temps .ww__temp-max {
    color: var(--ww-temp-max);
}

.ww__day-temps .ww__temp-min {
    color: var(--ww-temp-min);
}

/* Air quality */
.ww__section-divider {
    margin: 12px 0 10px;
    border-top: 1px solid var(--ww-border);
}

.ww__aqi {
    text-align: center;
}

.ww__aqi-title {
    font-size: var(--ww-fs-body, 12px);
    font-weight: 600;
    color: var(--ww-value, var(--ww-text));
    margin-bottom: 8px;
}

.ww__aqi-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--ww-fs-aqi-badge, 11px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--aqi-color, var(--ww-accent));
    border: 1.5px solid var(--aqi-color, var(--ww-accent));
    background: transparent;
    margin-bottom: 8px;
}

.ww__aqi-desc {
    font-size: var(--ww-fs-hour-temp, 11px);
    line-height: 1.4;
    color: var(--ww-label, var(--ww-muted));
    margin: 0 auto 10px;
    max-width: 280px;
}

.ww__pollutants {
    display: grid;
    gap: 6px;
    text-align: left;
}

.ww__pollutant {
    display: flex;
    justify-content: space-between;
    font-size: var(--ww-fs-hour-temp, 11px);
    padding: 4px 8px;
    border-radius: 6px;
    border-left: 3px solid var(--pollutant-color, var(--ww-accent));
    background: var(--ww-surface, rgba(0, 0, 0, 0.04));
}

.ww--dark .ww__pollutant {
    background: var(--ww-surface);
}

/* Multi city */
.ww--multi .ww__content {
    padding: 10px 12px;
}

.ww__cities {
    display: flex;
    gap: 10px;
}

.ww--layout-vertical .ww__cities {
    flex-direction: column;
}

.ww--layout-horizontal .ww__cities {
    flex-direction: row;
    flex-wrap: wrap;
}

.ww__city {
    flex: 1;
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--ww-radius);
    background: var(--ww-surface, rgba(0, 0, 0, 0.04));
}

.ww--dark .ww__city {
    background: var(--ww-surface);
}

.ww--layout-vertical .ww__city {
    width: 100%;
}

.ww__city-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: contain;
}

.ww__city-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--ww-fs-city-name, 12px);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    color: var(--ww-text);
}

.ww__city-name:hover {
    color: var(--ww-accent);
}

.ww__city-temp {
    font-size: var(--ww-fs-city-temp, 16px);
    font-weight: 700;
    color: var(--ww-temp-current, var(--ww-accent));
}

.ww__city-desc {
    font-size: var(--ww-fs-small, 10px);
    color: var(--ww-label, var(--ww-muted));
}

.ww__error {
    color: #ef4444;
    font-size: var(--ww-fs-body, 12px);
    text-align: center;
    padding: 16px;
}
