/* ========================================
   InfoPark - Layout
   Struttura schermi, header, footer
   ======================================== */

/* ----------------------------------------
   Screens
   ---------------------------------------- */
.screen {
    display: none;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* ----------------------------------------
   Header
   ---------------------------------------- */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0 var(--spacing-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.header-logo {
    height: 32px;
    width: auto;
}

.header h1 {
    font-size: 1rem;
    font-weight: 600;
}

.header-map {
    justify-content: space-between;
    background: var(--color-primary);
    color: white;
    border-bottom: none;
}

.header-map .header-logo {
    display: none;
}

.header-blue {
    background: var(--color-primary);
    border-bottom: none;
}

.header-logo-light {
    filter: brightness(0) invert(1);
}

.btn-back-header {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.btn-back-header:hover,
.btn-back-header:active {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.125rem;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
}

.btn-header-text {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Titillium Web', sans-serif;
    white-space: nowrap;
}

.btn-header-text:hover {
    background: rgba(255,255,255,0.3);
}

.btn-header-text:active {
    background: rgba(255,255,255,0.4);
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.footer {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-bottom: calc(var(--spacing-sm) + var(--safe-area-bottom));
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    min-height: 44px;
}

.footer small {
    font-size: 0.7rem;
    line-height: 1.4;
}

.footer-blue {
    background: var(--color-primary-dark);
    border-top: none;
    color: rgba(255, 255, 255, 0.8);
}

.footer-blue a {
    color: white;
    text-decoration: underline;
}

.footer-blue a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Welcome screen footer */
.footer-welcome {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer-welcome small {
    font-size: 0.7rem;
}

.footer-welcome a {
    color: var(--color-primary);
    text-decoration: underline;
}
