/* LAYOUT MODULE */
/* Fixed Overlay Container */
.fixed-overlay-container {
    position: fixed;
    bottom: 80px;
    left: 15px;
    right: 15px;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    padding-bottom: env(safe-area-inset-bottom);
}

.fixed-overlay-container > * {
    pointer-events: auto;
}

#app-version-fixed {
    font-size: 11px;
    color: var(--secondary-text-color);
    opacity: .7;
}

/* Screen Animations */
#home-screen, #add-expense-category-screen, #manage-categories-screen, 
#add-expense-amount-screen, #view-expenses-screen, #category-detail-screen, 
#edit-expense-screen, #edit-category-screen, #monthly-history-screen, 
#weekly-detail-screen, #weekly-category-detail-screen, #chart-screen {
    animation: screenFadeIn .25s ease-out;
}

/* Padding Top Adjustments for Header/Card proximity */
#home-screen {
    padding-top: 132px !important; 
}

/* Altre pagine - FIX: From OLD style.css (was 120px, confirmed 110px in restored style.css) */
#chart-screen, 
#calendar-screen, 
#manage-categories-screen, 
#add-expense-category-screen,
#view-expenses-screen,
#monthly-history-screen,
#weekly-detail-screen,
#weekly-category-detail-screen,
#monthly-category-detail-screen {
    padding-top: 110px !important;
}

/* FIX: More space for these screens (User req: "scendere di poco") */
#add-expense-amount-screen,
#edit-expense-screen,
#edit-category-screen {
    padding-top: 145px !important;
}

/* FIX: Data screen (Account) needs more space */
#data-screen {
    padding-top: 110px !important; /* Also 110px in restored style.css */
}

/* FIX: Loan detail screen */
#loan-detail-screen {
    padding-top: 120px !important;
    box-sizing: border-box !important;
    padding-bottom: 100px !important;
    height: 100vh !important;
    overflow-y: auto !important;
}

/* Landscape Overlay */
#landscape-overlay {
    display: none;
}

@media screen and (orientation: landscape) {
    /* Blocca scorrimento e fissa altezza */
    html, body {
        overflow: hidden !important;
        height: 100% !important;
        width: 100% !important;
        position: fixed !important; /* Inchioda tutto */
    }

    #landscape-overlay {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 200000 !important; /* Sopra a tutto */
        
        /* Sfondo Spaziale */
        background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%) !important;
        
        /* Centratura */
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        
        /* Abilita interazione se serve */
        pointer-events: auto;
    }

    /* --- FIX METEORE ORIZZONTALI --- */
    #landscape-overlay .landscape-meteors {
        width: 150vw !important; /* Più largo dello schermo */
        height: 150vh !important;
        left: -25vw; /* Centra l'espansione */
        top: -25vh;
    }
    
    #landscape-overlay .landscape-meteors span::before {
        width: 400px !important; /* Coda più lunga */
    }

    /* --- ICONA TELEFONO ANIMATA --- */
    .rotate-animation-wrapper svg {
        color: #fff;
        animation: rotatePhoneHint 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    }
}
