/* =========================================================
   WEATHER ALERTS · CARGA ANIMADA Y ESCENAS METEOROLÓGICAS
   ========================================================= */

.weather-loading {
    min-height: 165px;
    padding: 38px 20px;
    display: grid;
    justify-items: center;
    align-content: start;
}

.weather-loading[hidden] {
    display: none !important;
}

.weather-loading__orbit {
    position: relative;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #d2f2d7;
    background: rgba(14, 45, 59, 0.65);
    box-shadow: 0 0 28px rgba(135, 222, 192, 0.12);
}

.weather-loading__orbit::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(169, 221, 199, 0.17);
    border-top-color: #9de7bb;
    border-right-color: #7ec9ed;
    border-radius: 50%;
    animation: weather-orbit 1.1s linear infinite;
}

.weather-loading__hourglass {
    width: 37px;
    height: 37px;
    animation: weather-hourglass 2.2s ease-in-out infinite;
}

.weather-loading__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.weather-loading--error {
    color: #ffb0ac;
}

#geo-button.is-locating {
    color: #a5efc3;
    opacity: 1;
    animation: weather-gps-pulse 850ms ease-in-out infinite;
}

.app-shell[data-weather-scene] {
    background-color: #0d2634;
    background-image: linear-gradient(180deg, rgba(8, 23, 34, 0.55) 0, rgba(8, 26, 37, 0.52) 18rem, rgb(71 100 108) 43rem, #143b50 76rem), var(--weather-scene-image), linear-gradient(180deg, #1a3e5a, #0d3441);
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center top, center top, center top;
    background-size: 100% 78rem, 100% auto, 100% 100%;
}

.app-shell[data-weather-scene] .app-header {
    background: transparent;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.app-shell[data-weather-scene] .search-row {
    background: transparent;
}

.app-shell[data-weather-scene] .metric-grid article,
.app-shell[data-weather-scene] .forecast-dropdown,
.app-shell[data-weather-scene] .panel,
.app-shell[data-weather-scene] .alert-card {
    background-color: transparent;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.app-shell[data-weather-scene='snow'] .current-summary,
.app-shell[data-weather-scene='sunny'] .current-summary {
    text-shadow: 0 2px 11px rgba(3, 15, 24, 0.65);
}

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

@keyframes weather-hourglass {
    0%,
    38% {
        transform: rotate(0deg);
    }

    55%,
    88% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes weather-gps-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .weather-loading__orbit::before,
    .weather-loading__hourglass,
    #geo-button.is-locating {
        animation-duration: 3s;
    }
}
