﻿/* ===================================================
   RESET BASE
   =================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto Condensed', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

.red {
    color:red !important;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

.form-check {
    display: flex;
    align-items: baseline;
    gap: 6px; /* spazio tra box e label */
}

.suggerito {
    border: 2px solid red !important;
    background-color: #ffe6e6;
}

.text-suggerito {
    color: #cc0000;
    font-size: 0.85rem;
}

#lblEsito {
    display: block;
    margin: 10px 0;
}

/* ===================================================
   LAYOUT
   =================================================== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.footer {
    margin-top: auto;
    background-color: #212529;
    color: #ffffff;
    text-align: center;
    padding: 2rem 1rem;
}

    .footer img {
        max-height: 50px;
        margin: 1rem auto;
    }

.row-missione {
    background-color: #fff3cd !important; /* giallo tenue compatibile Bootstrap */
}

.clear-btn {
    border: none;
    background: transparent;
    color: #6c757d; /* grigio Bootstrap */
    padding: 0.25rem;
    margin-right: 0.5rem; /* sposta leggermente verso sinistra */
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .clear-btn:hover {
        color: #dc3545; /* rosso tenue all’hover */
        background: transparent; /* niente sfondo */
    }

    .clear-btn i {
        font-size: 1rem;
    }

/* ===================================================
   HEADER - NAVBAR (Bootstrap 5)
   =================================================== */
.navbar-brand img {
    height: 32px;
}

.logo-header {
    max-height: 60px;
}

.navbar .text-end {
    line-height: 1.2;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff;
    text-align: center;
}

    .navbar-dark .navbar-nav .nav-link:hover {
        color: #ffc107;
    }

.navbar .navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.25rem 0.5rem;
}

#navbarMobileMenu {
    background-color: #212529;
}

    #navbarMobileMenu.collapse:not(.show) {
        display: none;
    }

    #navbarMobileMenu.collapse.show {
        animation: fadeIn 0.2s ease-in-out;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu mobile sovrapposto sotto la navbar */
#navbarMobileMenu.collapse.show {
    display: block !important;
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================
   FIX MENU MOBILE SOVRAPPOSTO (parte da 100px)
   =================================================== */
#navbarMobileMenu {
    position: fixed;
    top: 77px;
    left: 0;
    width: 100%;
    height: calc(100vh - 100px);
    background-color: #212529;
    z-index: 1050;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    opacity: 0;
}

    /* Quando si apre */
    #navbarMobileMenu.show {
        transform: translateY(0);
        opacity: 1;
    }

/* Disattiva l'animazione Bootstrap predefinita del collapse */
.collapse:not(.show) {
    display: none !important;
    height: auto !important;
}

/* ===================================================
   HEADER FISSO + MENU MOBILE SOTTOSTANTE
   =================================================== */

/* Mantiene la navbar sempre in alto */
.navbar.fixed-top {
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050; /* sopra al menu mobile */
}

/* Fa sì che il contenuto non venga nascosto dalla navbar */
body {
    padding-top: 100px; /* altezza approssimativa della header */
}

/* Il menu mobile inizia sotto la navbar */
#navbarMobileMenu {
    position: fixed;
    top: 77px;
    left: 0;
    width: 100%;
    height: calc(100vh - 77px);
    background-color: #212529;
    z-index: 1040;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    opacity: 0;
}

    #navbarMobileMenu.show {
        transform: translateY(0);
        opacity: 1;
    }

.collapse:not(.show) {
    display: none !important;
    height: auto !important;
}



/* ===================================================
   LOGIN FORM
   =================================================== */
.login-container {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

    .login-container .card {
        border: none;
        box-shadow: 0 0 15px rgba(0,0,0,0.1);
    }

    .login-container .card-body {
        padding: 2rem;
    }

    .login-container .form-control {
        border-radius: 0.25rem;
    }

    .login-container .btn {
        border-radius: 0.25rem;
    }

input[type=checkbox] {
    margin-right: 6px; /* distanza tra la checkbox e il testo */
}

label {
    color:#8b8b8b !important;
}

/* Checkbox personalizzate visibili */
input[type=checkbox] {
    appearance: none; /* rimuove lo stile di default */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #007bff; /* bordo scuro */
    border-radius: 4px;
    background-color: #007bff; /* sfondo scuro */
    cursor: pointer;
    position: relative;
}

    /* Quando è selezionata */
    input[type=checkbox]:checked {
        background-color: #007bff; /* blu bootstrap o altro colore acceso */
        border-color: #007bff;
    }

        /* La spunta bianca */
        input[type=checkbox]:checked::after {
            content: '✔';
            color: #fff;
            font-size: 14px;
            position: absolute;
            left: 2px;
            top: -2px;
        }


/* =============================
   HOME PAGE - PULSANTI GRANDI
   ============================= */
.block-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    height: 50vh; /* Altezza fissa visibile su desktop */
    gap: 3vw;
    margin: 4vh 0;
    padding: 0 2vw;
}

.entra-user, .esci-user {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    text-align: center;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    font-size: 6vw;
    color: #fff !important;
    text-decoration: none;
    border-radius: 40px;
    border: solid 20px transparent;
    background-repeat: no-repeat;
    background-size: 140px auto;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    line-height: normal;
    min-width: 280px;
    height: 50vh;
    padding-bottom:35px;
    font-style:oblique;
}

.presenze-user {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 120px; /* 🔹 più basso rispetto ai 50vh */
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 500;
    font-size: 2rem; /* 🔹 testo più piccolo ma ben visibile */
    color: #fff !important;
    text-decoration: none;
    border-radius: 25px;
    border: solid 6px transparent; /* 🔹 bordo più sottile */
    background-color: #1e88e5; /* 🔹 blu coordinato */
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    line-height: normal;
    font-style: oblique;
    min-width: 280px;
    margin: 0 auto;
}

    .entra-user:hover,
    .esci-user:hover, .presenze-user:hover{
        transform: scale(1.03);
    }

.entra-user {
    background-color: #216b21;
    border-color: #1a5d01;
    background-image: url('../images/click.png');
    background-position: center 80px; /* più in basso */
}

.esci-user {
    background-color: #af0000;
    border-color: #851616;
    background-image: url('../images/click.png');
    background-position: center 80px;
}

.presenze-user {
    background-color: #003366;
    border-color: #002a52;
}


.entra-user:active,
.esci-user:active, .presenze-user {
    transform: scale(0.98);
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.3);
}


.presenze-user {
    transform: scale(1.0);
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.3);
}

/* ===================================================
   ACCESSO BADGE - PULSANTE IMMAGINE
   =================================================== */
.block-buttons-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Bottone principale */
.badge-user {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #dddddd; /* grigio Bootstrap */
    border-radius: 40px;
    border: solid 20px transparent;
    border-color: #ebebeb;
    width: 50%;
    padding: 20px;
    transition: all 0.25s ease-in-out;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

    .badge-user:hover {
        transform: scale(1.05);
        background-color: #dddddd;
    }

    /* Immagine responsiva all'interno */
    .badge-user .badge-img {
        width: 70%;
        height: auto;
        object-fit: contain;
        transition: transform 0.3s ease-in-out;
    }

    .badge-user:hover .badge-img {
        transform: scale(1.08);
    }

/* Responsive mobile */
@media (max-width: 768px) {
    .badge-user {
        width: 90vw;
        height: auto;
        border-radius: 20px;
    }

        .badge-user .badge-img {
            width: 75%;
        }
}


.logout-loader {
    width: 80px;
    height: 80px;
    border: 8px solid #e0e0e0;
    border-top: 8px solid #0d6efd; /* blu bootstrap */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Optional: effetto fade-in del messaggio */
.card-body {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* =============================
   MOBILE
   ============================= */
@media (max-width: 992px) {
    .block-buttons {
        flex-direction: column;
        align-items: center;
        height: 100vh;
        gap: 30px;
        margin: 20px 0;
        padding: 0;
    }

    .entra-user, .esci-user, .presenze-user {
        width: 90%;
        height: 50vh; /* stessa altezza anche su mobile */
        font-size: 15vw;
        background-size: 100px auto;
        border-width: 10px;
        background-position: center 20px; /* più in basso */
        padding-bottom:0;
    }

}





/* ===================================================
   RESPONSIVE - MOBILE (<992px)
   =================================================== */
@media (max-width: 991.98px) {
    .navbar .text-end {
        display: none !important;
    }

    .navbar .container-fluid {
        flex-wrap: nowrap;
    }

    .navbar .mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}
/* ===================================================
   RESPONSIVE - DESKTOP (≥992px)
   =================================================== */
@media (min-width: 992px) {
    .mobile-only-link {
        display: none !important;
    }

    #navbarMobileMenu {
        display: none !important;
    }
}

/* =======================================================
   🔸 CUSTOM THEME COLOR - ORANGE
   ======================================================= */
:root {
    --bs-orange-strong: #ff6100; /* il tuo arancio personalizzato */
}

/* ======== Varianti automatiche ======== */
.bg-orange {
    background-color: var(--bs-orange-strong) !important;
    color: #fff !important;
}

.text-orange {
    color: var(--bs-orange-strong) !important;
}

.border-orange {
    border-color: var(--bs-orange-strong) !important;
}

/* ======== Bottoni compatibili Bootstrap ======== */
.btn-orange {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-orange-strong);
    --bs-btn-border-color: var(--bs-orange-strong);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #e15600;
    --bs-btn-hover-border-color: #d04e00;
    --bs-btn-focus-shadow-rgb: 255, 97, 0;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #d04e00;
    --bs-btn-active-border-color: #c74800;
    --bs-btn-disabled-bg: var(--bs-orange-strong);
    --bs-btn-disabled-border-color: var(--bs-orange-strong);
}

/* Alert personalizzato (opzionale) */
.alert-orange {
    color: #542400;
    background-color: #ffe1cc;
    border-color: #ffc7a3;
}


.badge {
    font-size:16px !important;
}


