/* Reset di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #00C8C8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Contenitore Login */
.login-container {
    background-color: #005F5F;
    width: 400px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Mercatino */
.logo-mercatino {
    width: 185px;
    margin-bottom: 10px;
}

/* Titolo */
.title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Logo CodeGest */
.logo-codegest {
    width: 120px;
    margin-bottom: 20px;
}

/* Campi di input */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    text-align: center;
}

/* Pulsante Login */
.btn-login {
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.btn-icon {
    width: 80px;
}

/* Contenitore Reception */
.reception-container {
    background-color: #005F5F;
    width: 450px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
}

/* Titoli */
h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 20px;
    margin: 15px 0;
    text-align: left;
}

/* Form input */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Pulsanti */
button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* Pulsanti principali */
button[name="add_client"] {
    background-color: #007ACC;
    color: white;
}

button[name="serve_now"] {
    background-color: #FFD700;
    color: black;
}

button[name="serve_client"] {
    background-color: #32CD32;
    color: white;
}

/* Logout */
button[name="logout"] {
    background-color: #CC0000;
    color: white;
}

/* Stile della lista */
ul {
    list-style: none;
    padding: 0;
}

/* Stile degli elementi in lista */
.queue-item {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: black;
}

/* Pulsante Monitor */
.btn-monitor {
    background-color: #228B22;
    color: white;
    font-size: 16px;
    width: 100%;
}

/* Numerazione cliente */
.queue-number {
    font-weight: bold;
    color: #007ACC;
}

/* Sezione "In Servizio" */
.serving {
    background-color: #FFD700 !important;
    font-weight: bold;
}

/* Dashboard admin */
.admin-container {
    width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: #008CBA;
    color: white;
    text-align: center;
    border-radius: 10px;
}

.admin-container input,
.admin-container select,
.admin-container button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
}

.admin-container button {
    background: #005f73;
    color: white;
    cursor: pointer;
}

.admin-container .error {
    color: #ff4136;
}

.admin-container .success {
    color: #2ecc71;
}

/* Stile per i campi di input */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Contenitore dashboard per uniformità */
.dashboard-container {
    background-color: #005F5F;
    width: 400px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Stile dei pulsanti */
.btn-primary {
    background-color: #007ACC;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-danger {
    background-color: #CC0000;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

/* Pulsante Torna alla Dashboard */
.btn-back {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #007ACC;
    color: white;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.btn-back:hover {
    background-color: #005fa3;
}

/* Pulsante Apri Monitor */
.btn-monitor {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #228B22;
    color: white;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.btn-monitor:hover {
    background-color: #1a6e1a;
}


/* Stile per il form select */
select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    text-align: center;
}

/* Contenitore Gestione Video */
.video-container {
    background-color: #008CBA;
    width: 90%;
    max-width: 600px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
    margin: 50px auto;
}

/* Titolo */
.video-container h1 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Tabella video */
.video-table {
    width: 100%;
    max-width: 500px; /* Limite massimo per evitare allargamenti */
    border-collapse: collapse;
    margin: 10px auto;
    background: white;
    color: black;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed; /* Evita l'allargamento */
}

/* Intestazioni tabella */
.video-table th {
    background-color: #0077A3;
    color: white;
    padding: 10px;
    font-size: 14px;
    text-align: center;
}

/* Celle tabella */
.video-table td {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    text-align: center;
    word-wrap: break-word;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Colonna Nome (limita il testo) */
.video-table td:nth-child(2) {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Colonna Azioni */
.video-table td:nth-child(3) {
    width: 120px;
}

/* Righe alternate */
.video-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.video-table tr:nth-child(odd) {
    background-color: #e6e6e6;
}

/* Anteprima video */
.video-preview video {
    width: 90px;
    height: 50px;
    border-radius: 5px;
    display: block;
    margin: auto;
}

/* Pulsanti azioni */
.btn-video {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease;
    width: 100px;
    max-width: 100%;
}

/* Pulsante per caricare un video */
.btn-upload {
    background-color: #28A745;
    width: 100%;
    max-width: 180px;
    padding: 8px;
    margin: 10px auto;
}

.btn-upload:hover {
    background-color: #218838;
}

/* Pulsante per eliminare un video */
.btn-delete {
    background-color: #DC3545;
    padding: 6px 10px;
    font-size: 12px;
    width: 100%;
    max-width: 100px;
}

.btn-delete:hover {
    background-color: #C82333;
}

/* Pulsante per tornare alla Dashboard */
.btn-dashboard {
    background-color: #FFD700;
    color: black;
    font-weight: bold;
    width: 100%;
    max-width: 180px;
    padding: 8px;
    margin-top: 10px;
}

.btn-dashboard:hover {
    background-color: #E6C200;
}

/* Messaggi di conferma ed errore */
.success-message {
    color: #28A745;
    font-weight: bold;
    margin-top: 10px;
}

.error-message {
    color: #DC3545;
    font-weight: bold;
    margin-top: 10px;
}

/* Sezione Responsive */
@media (max-width: 600px) {
    .video-container {
        width: 95%;
    }
    .video-preview video {
        width: 80px;
        height: 50px;
    }
    .btn-video {
        padding: 6px 10px;
        font-size: 12px;
    }
    .video-table {
        max-width: 100%;
    }
    .video-table td {
        font-size: 12px;
        padding: 5px;
    }
}


/* Contenitore Generale */
.monitor-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #00C8C8;
    overflow: hidden;
}

/* Sezioni Laterali (Clienti in Attesa e in Servizio) */
.queue-section, .serving-section {
    width: 25%;
    height: 100%;
    background-color: #005F5F;
    padding: 20px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Sezione Video Centrale */
.video-section {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Video Fullscreen */
.video-section video {
    width: 95%;
    max-height: 90%;
    border-radius: 15px;
}

/* Titoli delle Sezioni */
h2 {
    font-size: 26px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Lista Clienti */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Singolo Cliente */
ul li {
    background-color: white;
    color: black;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: bold;
}

.payment-container {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 5px auto;
}

.payment-container input {
    width: 100%;               /* Larghezza completa per entrambi i campi */
    padding: 10px;             /* Altezza maggiore */
    margin: 2px 0;
    font-size: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.btn-payment {
    background-color: #dc3545; /* Colore rosso */
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 12px;
    border-radius: 5px;
    width: 100%;               /* Larghezza completa */
}

.btn-payment:hover {
    background-color: #c82333; /* Rosso più scuro al passaggio del mouse */
}


/* Sezione Responsive */
@media (max-width: 1920px) {
    h2 {
        font-size: 22px;
    }
    ul li {
        font-size: 18px;
    }
}


/* Sezione Responsive */
@media (max-width: 768px) {
    .monitor-container {
        flex-direction: column;
        align-items: center;
    }
    .queue-section, .serving-section {
        width: 90%;
        margin-bottom: 15px;
    }
    .video-section {
        width: 100%;
    }
}


/* Contenitore Responsive */
@media (max-width: 480px) {
    .video-container {
        width: 90%;
    }
    .video-preview video {
        width: 70px;
        height: 40px;
    }
    .btn-video {
        padding: 5px 8px;
        font-size: 10px;
    }
}



/* Sezione Responsive */
@media (max-width: 480px) {
    .reception-container, .login-container, .admin-container {
        width: 90%;
    }
}
