/* public/style.css - v0.29.0 Mobile Hard Fix */

:root {
    --primary: #27ae60;
    --primary-grad: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --secondary: #2c3e50;
    --bg-body: #ffffff;
    --text-main: #333;
    --radius-btn: 50px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

/* --- NAVBAR (Fissa e Pulita) --- */
nav {
    background: rgba(255, 255, 255, 0.98);
    padding: 0 15px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0px rgba(0,0,0,0.05);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* LOGO NAVBAR - Piccolo Cerchio */
.logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    border: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* Rimuove bordi neri */
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
}

/* --- BOTTONI NAVBAR --- */
.btn-login-nav {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero-guest {
    text-align: center;
    padding: 40px 20px;
    background: white;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-highlight { color: var(--primary); }

.hero-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Bottone CTA Grande */
.btn-hero-cta {
    background: var(--primary-grad);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    width: 100%;
    max-width: 280px;
    cursor: pointer;
    display: inline-block;
}

/* --- MAPPA --- */
#map-container-guest, #map-container {
    width: 100%;
    height: 350px;
    border-radius: 20px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    z-index: 1;
    border: 1px solid #eee;
}

/* --- LOGIN DESKTOP --- */
.desktop-login-area { display: flex; gap: 10px; }
.desktop-login-area input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 0.9rem; }

/* --- MOBILE SPECIFIC FIX --- */
@media (max-width: 768px) {
    /* Nascondi forzatamente elementi desktop */
    .desktop-login-area { display: none !important; }
    
    /* Navbar Mobile */
    nav { padding: 0 15px; height: 56px; }
    .nav-guest-mobile { display: block !important; }
    
    /* Hero Mobile */
    .hero-guest { padding: 30px 20px; }
    .hero-title { font-size: 2rem; margin-top: 10px; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 20px; }
    
    /* Mappa Mobile */
    #map-container-guest { height: 300px; margin-top: 25px; }
}

/* --- UI CARDS & MODALE (Standard) --- */
.main-container { max-width: 1000px; margin: 0 auto; }
.content-wrapper { padding: 20px; }
.event-card { background: white; border-radius: 12px; padding: 15px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-left: 4px solid var(--primary); }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-content { background: white; padding: 25px; border-radius: 20px; width: 85%; max-width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); text-align: center; }
input, select { width: 100%; padding: 12px; margin: 8px 0 15px 0; border: 1px solid #eee; border-radius: 10px; font-size:1rem; background:#f9f9f9; }
.btn-small { border:none; padding:6px 12px; border-radius:6px; cursor:pointer; font-weight:600; font-size:0.8rem; }

/* --- AGGIUNTA v0.30.0 (Tabelle e Liste) --- */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
    min-width: 600px; /* Forza lo scroll su mobile */
}

.admin-table th { background: var(--secondary); color: white; padding: 12px; text-align: left; }
.admin-table td { padding: 12px; border-bottom: 1px solid #eee; color: #555; }
.admin-table tr:last-child td { border-bottom: none; }

/* Stile lista partecipanti (Gestore) */
.names-list {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    border-left: 3px solid #ddd;
}

/* --- AGGIUNTA v0.31.1 (Toast Notification) --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px; /* Molto rotondo */
    padding: 12px 24px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.95rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 40px; /* Piccolo movimento verso l'alto */
}