/* ============================================================================
   ARCHIVO: weather.css
   UBICACIÓN: CanariasApart.Web/wwwroot/css/front/
   DESCRIPCIÓN: Estilos para la barra de previsión meteorológica en la página
                pública de propiedad. Diseño responsive con scroll horizontal.
                Fondo claro mint/verde agua con textos oscuros.
   ============================================================================ */

/* ===== WEATHER BAR CONTAINER ===== */
.weather-bar {
    background: #e2efec;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #cde0dc;
    border-bottom: 1px solid #cde0dc;
}

/* ===== HEADER ROW ===== */
.weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 60px) 0;
    position: relative;
    z-index: 1;
}
.weather-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a2a2a;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.weather-title i {
    color: #008572;
    font-size: 1rem;
}
.weather-location {
    color: #5a6b6b;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
}
.weather-updated {
    color: #8a9a9a;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
}

/* ===== TABS (Hoy / Semana) ===== */
.weather-tabs {
    display: flex;
    gap: 0;
    padding: 10px clamp(16px, 4vw, 60px) 0;
    position: relative;
    z-index: 1;
}
.weather-tab {
    background: rgba(0,133,114,0.08);
    border: 1px solid rgba(0,133,114,0.15);
    color: #5a6b6b;
    padding: 6px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}
.weather-tab:first-child {
    border-radius: 8px 0 0 8px;
}
.weather-tab:last-child {
    border-radius: 0 8px 8px 0;
}
.weather-tab.active {
    background: #008572;
    color: #ffffff;
    border-color: #008572;
}
.weather-tab:hover:not(.active) {
    background: rgba(0,133,114,0.14);
    color: #1a2a2a;
}

/* ===== SCROLL CONTAINER ===== */
.weather-scroll-wrapper {
    position: relative;
    z-index: 1;
}
.weather-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px clamp(16px, 4vw, 60px) 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.weather-scroll::-webkit-scrollbar {
    display: none;
}

/* ===== SCROLL ARROWS ===== */
.weather-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,133,114,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,133,114,0.2);
    color: #008572;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 5;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}
.weather-scroll-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}
.weather-scroll-arrow:hover {
    background: rgba(0,133,114,0.22);
}
.weather-scroll-arrow.left {
    left: 6px;
}
.weather-scroll-arrow.right {
    right: 6px;
}

/* ===== HOURLY ITEM ===== */
.weather-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 8px 6px;
    border-radius: 10px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.weather-hour:hover {
    background: rgba(0,133,114,0.07);
}
.weather-hour.now {
    background: rgba(223,187,62,0.18);
    border: 1px solid rgba(223,187,62,0.4);
}
.weather-hour-time {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #5a6b6b;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.weather-hour.now .weather-hour-time {
    color: #b8952e;
    font-weight: 700;
}
.weather-hour-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
    line-height: 1;
}
.weather-hour-temp {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a2a;
}
.weather-hour-precip {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    color: #3a8fd4;
    margin-top: 2px;
}
.weather-hour-wind {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    color: #8a9a9a;
    margin-top: 1px;
}

/* ===== DAILY ITEM ===== */
.weather-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 10px 8px;
    border-radius: 10px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.weather-day:hover {
    background: rgba(0,133,114,0.07);
}
.weather-day.today {
    background: rgba(223,187,62,0.18);
    border: 1px solid rgba(223,187,62,0.4);
}
.weather-day-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6b6b;
    margin-bottom: 6px;
    text-transform: capitalize;
}
.weather-day.today .weather-day-name {
    color: #b8952e;
    font-weight: 700;
}
.weather-day-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
    line-height: 1;
}
.weather-day-temps {
    display: flex;
    gap: 6px;
    align-items: baseline;
}
.weather-day-max {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a2a2a;
}
.weather-day-min {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #8a9a9a;
}
.weather-day-precip {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    color: #3a8fd4;
    margin-top: 3px;
}

/* ===== SEPARATOR ===== */
.weather-separator {
    width: 1px;
    background: rgba(0,133,114,0.12);
    margin: 4px 4px;
    flex-shrink: 0;
    align-self: stretch;
}

/* ===== LOADING STATE ===== */
.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #5a6b6b;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}
.weather-loading i {
    color: #008572;
    animation: weatherSpin 1s linear infinite;
}
@keyframes weatherSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== ERROR STATE ===== */
.weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #8a9a9a;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

/* ===== PANEL VISIBILITY ===== */
.weather-panel {
    display: none;
}
.weather-panel.active {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .weather-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-top: 12px;
    }
    .weather-hour {
        min-width: 56px;
    }
    .weather-day {
        min-width: 76px;
    }
    .weather-scroll {
        padding: 10px 12px 14px;
    }
    .weather-tabs {
        padding-left: 12px;
    }
    .weather-scroll-arrow {
        display: none;
    }
}
@media (max-width: 480px) {
    .weather-hour {
        min-width: 52px;
        padding: 6px 4px;
    }
    .weather-hour-icon {
        font-size: 1.2rem;
    }
    .weather-day {
        min-width: 68px;
    }
}
