/* ========================================
   Peschiera Parking - Layout
   Header Comune, barra info, mappa a tutta altezza, footer Gestopark
   ======================================== */

.app {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    padding-top: var(--safe-area-top);
}

/* ---------- Header Comune ---------- */

.header {
    position: relative;
    z-index: 1100; /* sopra i controlli Leaflet, per il menu lingua */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--pp-header-height);
    padding: 6px var(--pp-gutter);
    background: var(--gp-primary);
    color: #fff;
}

.header-comune {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-stemma {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.header-comune-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.header-comune-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.header-comune-nome {
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ---------- Barra info ---------- */

/* Griglia: titolo/sottotitolo | orario + Aggiorna ora; sotto, la didascalia a tutta larghezza
   (nella sola colonna sinistra, stretta su mobile, andrebbe a capo su 4-5 righe) */
.infobar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto; /* colonna destra larga quanto il pulsante */
    align-items: start;
    gap: 0 12px;
    padding: 12px var(--pp-gutter) 8px;
    background: var(--gp-surface);
}

.infobar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.infobar-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--gp-radius-sm);
    background: var(--gp-primary);
    color: #fff;
    font-size: 1.25rem;
}

.infobar-subtitle {
    margin-top: 2px;
    font-size: 0.9375rem;
    color: var(--gp-text-secondary);
}

.infobar-hint {
    grid-column: 1 / -1;
    margin-top: 6px;
    font-size: 0.875rem;
    font-style: italic;
    color: var(--gp-text-secondary);
}

.infobar-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.infobar-update {
    text-align: right;
    font-size: 0.875rem;
    color: var(--gp-text-secondary);
}

.infobar-update.is-stale {
    color: var(--gp-error);
    font-weight: 600;
}

/* ---------- Filtri ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px var(--pp-gutter) 12px;
    background: var(--gp-surface);
    border-bottom: 1px solid var(--gp-border);
}

/* ---------- Mappa ---------- */

.map-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
}

#map {
    position: absolute;
    inset: 0;
}

/* ---------- Footer Gestopark ---------- */

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 6px var(--pp-gutter) calc(6px + var(--safe-area-bottom));
    background: var(--gp-surface);
    border-top: 1px solid var(--gp-border);
    font-size: 0.75rem;
    color: var(--gp-text-secondary);
}

.footer-powered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-logo {
    height: 20px;
    width: auto;
}

/* ---------- Mobile ---------- */

@media (max-width: 420px) {
    .header-stemma { height: 38px; }
    .header-comune-label { font-size: 0.6875rem; }
    .header-comune-nome { font-size: 0.9375rem; }
    .infobar-title { font-size: 1.25rem; }
    .infobar-subtitle { font-size: 0.875rem; }
    .infobar-update { font-size: 0.8125rem; }
    .filters { gap: 6px; }
}
