/* =========================================
   BuyByeBye - CSS DEFINITIVO: SPAZI E COLORI
   ========================================= */

:root {
    --primary: #2563eb;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b; /* GIALLO ORIGINALE */
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
    --gray-light: #e5e7eb;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    margin: 0; padding: 0;
}

.app-container {
    width: 95%;
    max-width: 450px;
    margin: 0 auto !important;
    padding: 15px;
}

/* Header */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.user-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-decoration: none;
}

/* Card */
.card {
    background: var(--card);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid var(--gray-light);
}

/* --- BOTTONI (Spaziati e Colorati) --- */
.btn {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: white;
    text-align: center;
    margin-bottom: 15px !important; /* SPAZIO TRA I TASTI */
    transition: opacity 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.4 !important;
    filter: grayscale(0.5);
}

.btn-primary { background-color: var(--primary); }
.btn-success { background-color: var(--success); }
.btn-danger  { background-color: var(--danger); }
/* Forza il giallo e il testo bianco */
.btn-warning { background-color: var(--warning) !important; color: white !important; }

/* Box Risultato add_item (Orizzontale e Centrato) */
#result-box {
    background-color: #fffbeb;
    border: 3px dashed var(--warning);
    padding: 30px 20px;
    border-radius: 22px;
    margin: 30px 0 60px 0 !important;
    display: none; /* Attivato da JS */
    align-items: center;
    justify-content: center;
    gap: 15px; /* Spazio tra : numero e ORE */
    font-weight: 800;
    color: #92400e;
    width: 100%;
}

.inline-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: #b45309;
    line-height: 1;
}

/* Pop-up Modale (Nascosto di default con display:none) */
.modal-overlay {
    display: none !important; /* INDISPENSABILE PER NON FARLO APPARIRE A CASO */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 28px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Input e Select */
input, select {
    width: 100%; padding: 16px; margin: 10px 0 20px 0;
    border: 1px solid #d1d5db; border-radius: 14px; font-size: 16px;
    background: white;
}

.hero-title {
    font-size: 4.5rem !important;
    font-weight: 900;
    /* Il gradiente di colore */
    background: linear-gradient(45deg, var(--primary), #60a5fa);
    
    /* Versione standard (quella che ti veniva richiesta) */
    background-clip: text; 
    
    /* Versione per Safari/Chrome/Edge */
    -webkit-background-clip: text;
    
    /* Rende il testo trasparente per far vedere il gradiente sotto */
    -webkit-text-fill-color: transparent;
    
    margin-bottom: 10px;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}



/* --- GESTIONE WEB APP (PWA) --- */

/* Quando l'app ha la classe .is-pwa, nascondi footer e banner cookie */
.is-pwa .main-footer, 
.is-pwa #iubenda-cs-banner, 
.is-pwa .iubenda-cs-container,
.is-pwa .iubenda-banner {
    display: none !important;
}

/* Ottimizzazione per iPhone (Safe Areas) */
.is-pwa body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Spazio extra in fondo all'App */
.is-pwa .app-container {
    padding-bottom: 40px;
}