/* RE Clima Widget */
.recw-card,
.recw-card * {
    box-sizing: border-box;
}

.recw-card {
    --recw-accent: #2e7dbc;
    --recw-soft: rgba(46, 125, 188, .10);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 24px);
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
    box-shadow:
        0 24px 70px rgba(22, 47, 78, .16),
        inset 0 1px 0 rgba(255,255,255,.85);
    color: #18334c;
    font-family: inherit;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.recw-card.recw-sunny { --recw-accent: #e2a218; --recw-soft: rgba(245, 183, 49, .15); }
.recw-card.recw-cloudy { --recw-accent: #4d7fa6; --recw-soft: rgba(77, 127, 166, .13); }
.recw-card.recw-rain { --recw-accent: #277db9; --recw-soft: rgba(39, 125, 185, .14); }
.recw-card.recw-snow { --recw-accent: #5a91b8; --recw-soft: rgba(127, 187, 224, .15); }
.recw-card.recw-storm { --recw-accent: #645ab4; --recw-soft: rgba(100, 90, 180, .15); }
.recw-card.recw-fog { --recw-accent: #708596; --recw-soft: rgba(112, 133, 150, .14); }

.recw-card__glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    right: -80px;
    top: -95px;
    background: var(--recw-soft);
    filter: blur(4px);
    pointer-events: none;
}

.recw-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.recw-kicker {
    margin: 0 0 8px;
    color: var(--recw-accent);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.recw-location {
    margin: 0;
    color: #18334c;
    font-size: clamp(22px, 4vw, 34px);
    line-height: 1.02;
    font-weight: 850;
    letter-spacing: -.035em;
}

.recw-condition {
    margin: 8px 0 0;
    color: #658097;
    font-size: 13px;
    font-weight: 600;
}

.recw-now {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.recw-main-icon {
    font-size: clamp(46px, 7vw, 62px);
    line-height: 1;
    filter: drop-shadow(0 8px 14px rgba(24,51,76,.10));
    transform-origin: center;
    animation: recw-float 3.2s ease-in-out infinite;
}

.recw-temperature {
    display: flex;
    align-items: flex-start;
    color: var(--recw-accent);
    font-weight: 850;
    letter-spacing: -.06em;
    line-height: .9;
}

.recw-temperature > span {
    font-size: clamp(50px, 9vw, 72px);
}

.recw-temperature sup {
    padding-top: 8px;
    margin-left: 3px;
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.recw-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(245, 250, 253, .78);
    border: 1px solid rgba(39, 91, 126, .08);
}

.recw-stat {
    min-width: 0;
    padding: 6px 4px;
    text-align: center;
    border-right: 1px solid rgba(39, 91, 126, .08);
}

.recw-stat:last-child {
    border-right: 0;
}

.recw-stat__icon {
    display: block;
    min-height: 21px;
    margin-bottom: 4px;
    color: var(--recw-accent);
    font-size: 13px;
    line-height: 1.2;
}

.recw-stat > span:not(.recw-stat__icon) {
    display: block;
    color: #28465f;
    font-size: 11px;
    white-space: nowrap;
}

.recw-stat small {
    display: block;
    margin-top: 3px;
    color: #8194a5;
    font-size: 9px;
    line-height: 1.2;
}

.recw-forecast {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.recw-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 9px 5px;
    border-radius: 14px;
    background: rgba(255,255,255,.70);
    border: 1px solid rgba(39, 91, 126, .08);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.recw-day:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,.95);
    box-shadow: 0 12px 25px rgba(35, 74, 104, .09);
}

.recw-day__label {
    color: #617d93;
    font-size: 11px;
    font-weight: 750;
}

.recw-day__icon {
    margin: 6px 0 4px;
    font-size: 27px;
    line-height: 1.2;
    animation: recw-pulse 4s ease-in-out infinite;
}

.recw-day strong {
    color: #21445e;
    font-size: 15px;
    line-height: 1;
}

.recw-day small {
    margin-top: 4px;
    color: #8b9aa8;
    font-size: 11px;
}

.recw-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 10px;
    color: #9aa8b4;
    font-size: 9px;
}

.recw-footer a {
    color: #7f93a4;
    text-decoration: none;
}

.recw-footer a:hover {
    text-decoration: underline;
}

.recw-error {
    padding: 14px 16px;
    border: 1px solid #f0c7c7;
    border-radius: 12px;
    background: #fff5f5;
    color: #8a2d2d;
    font-size: 11px;
}

@keyframes recw-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes recw-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@media (max-width: 720px) {
    .recw-card {
        border-radius: 22px;
    }

    .recw-header {
        align-items: flex-start;
    }

    .recw-now {
        gap: 2px;
    }

    .recw-main-icon {
        font-size: 46px;
    }

    .recw-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .recw-stat {
        border-right: 0;
        border-bottom: 1px solid rgba(39, 91, 126, .08);
    }

    .recw-stat:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .recw-forecast {
        overflow-x: auto;
        grid-template-columns: repeat(5, minmax(76px, 1fr));
        padding-bottom: 5px;
        scrollbar-width: thin;
    }
}

@media (max-width: 470px) {
    .recw-card {
        padding: 16px 13px;
    }

    .recw-header {
        display: block;
    }

    .recw-now {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .recw-temperature > span {
        font-size: 58px;
    }

    .recw-main-icon {
        font-size: 46px;
    }

    .recw-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }

    .recw-stat:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(39, 91, 126, .08);
    }

    .recw-stat:last-child {
        grid-column: 1 / -1;
        border-bottom: 0;
    }

    .recw-footer {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recw-main-icon,
    .recw-day__icon {
        animation: none;
    }

    .recw-day {
        transition: none;
    }
}
