/* Ícones animados de clima — base 64px, escalados por tamanho */
.clima-weather-mount {
    position: relative;
    display: block;
    flex-shrink: 0;
    overflow: visible;
    --clima-moon-shadow: #212121;
}

.clima-weather-mount--header {
    width: 32px;
    height: 32px;
    --clima-weather-scale: 0.5;
}

.clima-weather-mount--hero {
    width: 52px;
    height: 52px;
    --clima-weather-scale: 0.8125;
}

.clima-weather-mount--day {
    width: 32px;
    height: 32px;
    --clima-weather-scale: 0.5;
}

.site-clima--header [data-clima-icon] {
    display: block;
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: visible;
    --clima-moon-shadow: var(--header-dark, #162e3d);
}

#clima-modal .clima-modal__hero-icon {
    --clima-moon-shadow: #1a3560;
}

#clima-modal .clima-modal__day-icon {
    --clima-moon-shadow: #f1f5f9;
}

.clima-weather-mount .weather-icon {
    width: 64px;
    height: 64px;
    position: relative;
    transform: scale(var(--clima-weather-scale, 0.375));
    transform-origin: 0 0;
    pointer-events: none;
}

/* Sol */
.clima-weather-mount .sun-core {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    background: #ffd54f;
    border-radius: 50%;
    box-shadow: 0 0 22px rgba(255, 193, 7, 0.65);
    animation: clima-weather-pulse-sun 2s infinite alternate ease-in-out;
}

.clima-weather-mount .sun-core::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 3px dashed #ffd54f;
    animation: clima-weather-rotate-sun 10s linear infinite;
}

/* Lua */
.clima-weather-mount .moon-core {
    position: absolute;
    inset: 0;
    margin: auto;
    background: #d8d8d8;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.clima-weather-mount .moon-shadow {
    width: 42px;
    height: 42px;
    position: relative;
    background: var(--clima-moon-shadow, #212121);
    border-radius: 50%;
    animation: clima-weather-moon-move 2.4s infinite alternate ease-in-out;
    transform: translate3d(8px, -8px, 0);
}

/* Nuvem */
.clima-weather-mount .cloud {
    position: absolute;
    left: 12px;
    bottom: 14px;
    width: 42px;
    height: 18px;
    background: #edf2f7;
    border-radius: 30px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    animation: clima-weather-cloud-float 2.4s infinite alternate ease-in-out;
}

.clima-weather-mount .cloud::before,
.clima-weather-mount .cloud::after {
    content: "";
    position: absolute;
    background: #edf2f7;
    border-radius: 50%;
}

.clima-weather-mount .cloud::before {
    width: 22px;
    height: 22px;
    left: 6px;
    top: -11px;
}

.clima-weather-mount .cloud::after {
    width: 26px;
    height: 26px;
    right: 4px;
    top: -15px;
}

/* Parcialmente nublado */
.clima-weather-mount .sun-small {
    position: absolute;
    top: 8px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: #ffd54f;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.55);
    animation: clima-weather-pulse-sun 2s infinite alternate ease-in-out;
}

.clima-weather-mount .moon-small {
    position: absolute;
    top: 6px;
    left: 8px;
    width: 26px;
    height: 26px;
    background: #e2e8f0;
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(226, 232, 240, 0.45);
    overflow: hidden;
}

.clima-weather-mount .moon-small .moon-shadow {
    width: 26px;
    height: 26px;
    background: var(--clima-moon-shadow, #111827);
    border-radius: 50%;
    animation: clima-weather-moon-move 2.4s infinite alternate ease-in-out;
    transform: translate3d(7px, -7px, 0);
}

/* Chuva */
.clima-weather-mount .drop {
    position: absolute;
    top: 44px;
    width: 4px;
    height: 12px;
    background: #58a6ff;
    border-radius: 20px;
    animation: clima-weather-rain-drop 0.8s linear infinite;
}

.clima-weather-mount .d1 {
    left: 23px;
}

.clima-weather-mount .d2 {
    left: 32px;
    animation-delay: 0.18s;
}

.clima-weather-mount .d3 {
    left: 41px;
    animation-delay: 0.36s;
}

/* Tempestade */
.clima-weather-mount .lightning {
    position: absolute;
    left: 28px;
    top: 34px;
    width: 14px;
    height: 24px;
    background: #ffd54f;
    clip-path: polygon(45% 0, 100% 0, 62% 43%, 100% 43%, 18% 100%, 38% 57%, 0 57%);
    animation: clima-weather-flash 1.4s infinite;
}

/* Névoa */
.clima-weather-mount .fog {
    position: absolute;
    left: 10px;
    width: 44px;
    height: 5px;
    background: #dfe6ec;
    border-radius: 20px;
    animation: clima-weather-fog-move 2s infinite alternate ease-in-out;
}

.clima-weather-mount .f1 {
    top: 22px;
}

.clima-weather-mount .f2 {
    top: 32px;
    width: 36px;
    left: 16px;
    animation-delay: 0.2s;
}

.clima-weather-mount .f3 {
    top: 42px;
    width: 46px;
    animation-delay: 0.4s;
}

@keyframes clima-weather-rotate-sun {
    to {
        transform: rotate(360deg);
    }
}

@keyframes clima-weather-pulse-sun {
    to {
        transform: scale(1.08);
    }
}

@keyframes clima-weather-moon-move {
    100% {
        transform: translate3d(30px, -30px, 0);
    }
}

@keyframes clima-weather-cloud-float {
    to {
        transform: translateX(5px) translateY(-2px);
    }
}

@keyframes clima-weather-rain-drop {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes clima-weather-flash {
    0%,
    80%,
    100% {
        opacity: 0;
    }

    84%,
    90% {
        opacity: 1;
        filter: drop-shadow(0 0 8px #ffd54f);
    }
}

@keyframes clima-weather-fog-move {
    to {
        transform: translateX(8px);
        opacity: 0.65;
    }
}

@media (max-width: 768px) {
    .site-clima--header [data-clima-icon] {
        width: 28px;
        height: 28px;
    }

    .clima-weather-mount--header {
        width: 28px;
        height: 28px;
        --clima-weather-scale: 0.4375;
    }
}

@media (prefers-reduced-motion: reduce) {
    .clima-weather-mount .sun-core,
    .clima-weather-mount .sun-core::before,
    .clima-weather-mount .sun-small,
    .clima-weather-mount .moon-small .moon-shadow,
    .clima-weather-mount .moon-shadow,
    .clima-weather-mount .cloud,
    .clima-weather-mount .drop,
    .clima-weather-mount .lightning,
    .clima-weather-mount .fog {
        animation: none !important;
    }

    .clima-weather-mount .moon-shadow {
        transform: translate3d(18px, -18px, 0);
    }
}
