/* /home/bruno/Github/clima.jardinamerica.net/style.css */

/* --- DISEÑO BASE --- */
:root {
    --primary: #0ea5e9; /* Azul Cielo vibrante pero elegante */
    --accent: #fb923c; /* Naranja/Ámbar suave para contrastar */
    --text-on-primary: #ffffff;

    /* Light Theme (Default) */
    --bg-main: #f4f6f9; /* Gris muy suave con un levísimo tono frío */
    --bg-card: #ffffff;
    --bg-hover: #f0f4f8; /* Gris sutil para hovers */
    --text-primary: #1e293b; /* Gris oscuro profundo, más legible */
    --text-secondary: #64748b; /* Gris medio elegante */
    --border-color: #e2e8f0;
    --border-soft: #f8fafc;
    --shadow-color: rgba(15, 23, 42, 0.05);
}
html.dark-mode {
    color-scheme: dark;
    --bg-main: #0b1120; /* Pizarra nocturno un poco más profundo */
    --bg-card: #1e293b;
    --bg-hover: #2a374a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --border-soft: #1e293b;
    --shadow-color: rgba(0,0,0,0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background-color: var(--bg-main); color: var(--text-primary); }

/* --- ESTILOS APP CLIMA (STANDALONE) --- */
body.weather-standalone-app {
    display: flex; flex-direction: row; justify-content: center;
    min-height: 100vh; align-items: flex-start; overflow-y: auto; margin: 0; padding: 0;
}
.standalone-weather-panel {
    width: 100%; background: var(--bg-main); min-height: 100vh;
    box-shadow: 0 0 25px rgba(0,0,0,0.15); display: flex;
    flex-direction: column; position: relative;
}

@media (min-width: 769px) {
    body.weather-standalone-app { align-items: center; background-color: var(--border-color); padding: 20px 0; }
    .standalone-weather-panel {
        max-width: 400px; min-height: auto; height: 850px; max-height: 90vh;
        border-radius: 35px; box-shadow: 0 25px 50px rgba(0,0,0,0.3), 0 0 0 12px #18181b;
        overflow-y: auto;
    }
    .standalone-weather-panel::-webkit-scrollbar { display: none; }
    .standalone-weather-panel { -ms-overflow-style: none; scrollbar-width: none; }
}

/* Botones Slider Próximas 24hs */
.title-scroll-actions { display: none; gap: 8px; }
@media (min-width: 769px) { .title-scroll-actions { display: flex; } }
.wp-scroll-btn {
    background: var(--bg-main); border: 1px solid var(--border-color);
    color: var(--text-primary); width: 28px; height: 28px;
    border-radius: 50%; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: all 0.2s;
}
.wp-scroll-btn:hover { background: var(--border-color); transform: scale(1.1); }

/* --- BANNER DE INSTALACIÓN PWA --- */
.install-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25); padding: 15px;
    display: none; align-items: center; justify-content: space-between;
    z-index: 9999; gap: 12px;
}
.install-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.install-info img { width: 45px; height: 45px; border-radius: 12px; }
.install-info div { display: flex; flex-direction: column; }
.install-info strong { font-size: 0.95rem; color: var(--text-primary); font-weight: 800; line-height: 1.2; }
.install-info span { font-size: 0.75rem; color: var(--text-secondary); margin-top: 3px; }
.install-banner button#installBtn { background: var(--primary); color: var(--text-on-primary); border: none; padding: 10px 18px; border-radius: 20px; font-weight: 800; cursor: pointer; transition: transform 0.2s; }
.install-banner button#installBtn:hover { transform: scale(1.05); }
.install-banner button#closeInstallBtn { background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; padding: 5px; opacity: 0.6; transition: color 0.2s; }
.install-banner button#closeInstallBtn:hover { opacity: 1; color: var(--text-primary); }

/* --- TARJETAS DEL CLIMA --- */
.wp-card { background: var(--bg-card); border-radius: 16px; box-shadow: 0 6px 20px var(--shadow-color); padding: 20px; margin-bottom: 20px; border: 1px solid var(--border-soft); position: relative; overflow: hidden; }
.wp-title { font-size: 0.75rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
html.dark-mode .wp-title { color: var(--text-secondary); }
.wp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.wp-detail-item { display: flex; align-items: center; gap: 15px; }
.wp-detail-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-main); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.3rem; flex-shrink: 0; box-shadow: 0 2px 8px var(--shadow-color); }
.wp-detail-info { display: flex; flex-direction: column; }
.wp-detail-label { font-size: 0.7rem; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.wp-detail-val { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); line-height: 1; }

/* Scroll Horizontal 24hs */
.wp-hourly-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin: 0 -5px; padding-left: 5px; padding-right: 5px; -ms-overflow-style: none; scrollbar-width: none; }
.wp-hourly-scroll::-webkit-scrollbar { display: none; }
.wp-hourly-item { display: flex; flex-direction: column; align-items: center; min-width: 65px; padding: 15px 10px; border-radius: 16px; background: var(--bg-main); border: 1px solid var(--border-soft); flex-shrink: 0; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; }
.wp-hourly-item:hover { transform: translateY(-3px); background: var(--bg-hover); box-shadow: 0 4px 10px var(--shadow-color); }
.wp-hourly-time { font-size: 0.8rem; color: var(--text-secondary); font-weight: 800; margin-bottom: 10px; }
.wp-hourly-icon { font-size: 1.5rem; margin-bottom: 10px; }
.wp-hourly-temp { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); line-height: 1; }

/* Lista Extendida 7 Días */
.wp-daily-list { display: flex; flex-direction: column; gap: 4px; }
.wp-daily-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.wp-daily-item:last-child { border-bottom: none; padding-bottom: 0; }
.wp-daily-day { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); width: 85px; }
.wp-daily-icon { font-size: 1.3rem; width: 40px; text-align: center; }
.wp-daily-temps { font-size: 1rem; font-weight: 800; color: var(--text-secondary); flex: 1; text-align: right; padding-right: 15px; }
.wp-daily-temps span:last-child { color: var(--text-primary); }
.wp-daily-prob { font-size: 0.8rem; color: #3b82f6; font-weight: 800; width: 55px; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.wp-water-drop { background: var(--bg-hover); padding: 4px 8px; border-radius: 20px; color: var(--primary); font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }
html.dark-mode .wp-water-drop { background: #1e3a8a; color: #93c5fd; }

/* Tarjeta Especial: Estación Local */
.wp-card.local-station { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border-color: #bae6fd; box-shadow: 0 8px 25px rgba(14, 165, 233, 0.08); }
.wp-card.local-station .wp-title, .wp-card.local-station .wp-detail-val { color: #0369a1; }
.wp-card.local-station .wp-detail-label { color: #0284c7; }
.wp-card.local-station .mid-col { border-left: 1px solid rgba(2, 132, 199, 0.15); border-right: 1px solid rgba(2, 132, 199, 0.15); }
html.dark-mode .wp-card.local-station { background: linear-gradient(135deg, #082f49 0%, #0c4a6e 100%); border-color: #0369a1; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }
html.dark-mode .wp-card.local-station .wp-title, html.dark-mode .wp-card.local-station .wp-detail-val, html.dark-mode .wp-card.local-station .wp-detail-label { color: #e0f2fe; }
html.dark-mode .wp-card.local-station .mid-col { border-color: rgba(186, 230, 253, 0.15); }
