﻿/* === Bottone per mostrare sidebar su mobile === */
.menu-toggle {
    margin-bottom: 10px;
    background-color: transparent;
    padding: 8px 15px;
    font-size: 16px;
    position: fixed;
    bottom: 0;
    right: 0;
    text-align: center;
}

/* === Contenitore principale === */
.responsive-container {
    display: flex;
    justify-content: center; /* Centra orizzontalmente */
    gap: 10px;
    /*height: 100vh;*/ /* Occupa tutta l'altezza della finestra */
    box-sizing: border-box;
}

.nomeaziendaSenzalogo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #15214d;
    align-content: center;
    height:30px;
}

/* === Sidebar === */
.col-dx {
    flex: 0 0 25%;
    max-width: 25%;
    box-sizing: border-box;
    overflow-y: auto;
}

.col-dx-fullwidth {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 5px 8px;
    border-left-color: transparent;
}

/* === Contenuto principale === */
.col-sx {
    border-radius: 15px;
    box-sizing: border-box;
}

/* === Griglia calendario === */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.day-cell {
    border: 1px solid #ccc;
    min-height: 16vh;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

    .day-cell.out-of-month {
        background: gray;
        color: black;
        opacity: 0.5;
    }

    .day-cell.today {
        border: 1px solid #1859ad;
        border-radius: 10px;
        color: #1859ad;
        background-color: rgba(14, 103, 150, 0.3);
    }

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.div-cliccabile {
    margin: 5px;
    display: block;
    border-radius: 10px;
    background-color: #f0f0f0;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
}

/* === Appuntamenti === */
.appointment {
    z-index: 2;
    display: block;
    margin: 5px;
    border: 1px solid silver;
    text-align: left;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 0.8em;
    cursor: pointer;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    padding: 5px 0;
    background-color: #d0d0d0;
}

.calendar-header-item {
    /*position: sticky;*/ /* Si "attacca" quando raggiunge il top */
    /*top: 110px;*/ /* Si fissa a 0px dal bordo superiore */
    /*z-index: 100;*/ /* Rimane sopra gli altri elementi */

    font-weight: bold;
    padding: 5px;
    margin: 5px 0;
    color: white;
    background: linear-gradient(180deg, rgba(6, 150, 207, 1) 0%, rgba(14, 103, 150, 1) 100%);
}

.grid-calendario {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

    .grid-calendario th {
        position: sticky;
        top: 55px;
        background-color: #f3f3f3;
        padding: 8px;
        text-align: left;
        border-bottom: 2px solid #ccc;
    }

    .grid-calendario td {
        padding: 8px;
        border-bottom: 1px solid #eee;
        vertical-align: middle;
    }

    .grid-calendario tr:hover {
        background-color: #f9f9f9;
    }

    .grid-calendario img {
        width: 20px;
        height: auto;
    }

/* === Month Picker === */
.monthpicker-header {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
}

.monthpicker-title {
    margin: 0;
    font-size: 1.5em;
    text-align: center;
}

.monthpicker-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: stretch;
    margin: 10px 0;
}

    .monthpicker-nav > div,
    .monthpicker-nav > .aspnet-button-wrapper {
        display: flex;
        flex-wrap: wrap;
        border-radius: 20px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        background: #fff;
        gap: 10px;
    }

    .monthpicker-nav .aspnet-button-wrapper {
        flex-direction: row;
    }

    .monthpicker-nav .monthpicker-arrow {
        width: 24px;
        height: 24px;
        vertical-align: middle;
    }

    .monthpicker-nav label,
    .monthpicker-nav .aspnet-button-wrapper .custom-link,
    .monthpicker-nav .aspnet-button-wrapper label {
        font-size: 1.1rem;
        color: #333;
        white-space: normal;
    }

    .monthpicker-nav .aspnet-button-wrapper .custom-link {
        padding: 8px 12px;
        border-radius: 15px;
        text-decoration: none;
        background: #007BFF;
        color: white;
        border: none;
    }


/* Responsive Month Picker */
@media (max-width: 600px) {
    .monthpicker-nav {
        flex-direction: column;
        align-items: stretch;
    }
}

/* === Calendar Switch === */
.calendar-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 10px;
}

/* Bottoni calendario */
.calendar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 5px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    transition: background 0.3s;
}

    .calendar-btn:hover {
        background: #e0e0e0;
    }

.banner {
    width: 100%;
    height: 70px;
    background: linear-gradient(to right, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%), url('banner.jpg') left center no-repeat;
    background-size: cover;
}
.calendar-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.monthpicker-arrow {
    width: 32px;
    height: 32px;
    padding: 0;
}

/* === Mobile Indicator === */
.visible-onlyon-mobile {
    display: none;
    text-align: center;
    color: red;
    font-size: 1.2em;
}

.visible-onlyon-desktop {
    display: block;
}

/* === Popup === */
.popup-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2;
}

.popup-box {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.popup-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.popup-header-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

    .popup-header-close-btn:hover {
        color: #333;
    }

.popup-body {
    margin-bottom: 15px;
    font-size: 14px;
}

.popup-footer {
    margin-top: 10px;
}

.popup-footer-grid {
    grid-template-columns: 1fr 1fr;
    display: grid;
    margin-top: 10px;
    gap: 10px;
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.popup-btn,
.popup-linkbtn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.popup-linkbtn {
    text-align: center;
    align-items: center;
    padding-right: 24px;
}

.popup-btn:disabled {
    background-color: lightgray;
    color: dimgray;
}

.footer-salva-scadenza {
    position: fixed;
    bottom: 30px;
    left: 45%;
    width: 100%;
}

/* === Mobile Layout === */
@media screen and (max-width: 768px) {

    .nomeaziendaSenzalogo {
        font-size: 0.9rem;
        max-width:100px;
    }
    .footer-salva-scadenza {
        position: relative;
        bottom: 20px;
        left: 0px;
        border-radius: 20px;
        padding: 20px 10px;
        width: 100%;
        background-color: white;
        text-align: center;
    }

    .day-cell {
        min-height: 10vh;
    }

    .visible-onlyon-mobile {
        display: block;
    }

    .popup-footer-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .visible-onlyon-desktop {
        display: none;
    }

    .menu-toggle {
        position: static;
        width: 100%;
        left: 0;
        text-align: center;
    }


    .col-dx {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 5px 8px 0;
        border-left-color: transparent;
        min-height: 300px;
        margin-bottom: 50px;
    }

    .col-sx {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .appointment {
        font-size: 0.8em;
    }

    .popup-box {
        width: 100%;
        max-width: 100%;
    }
}

/* === Pulsanti === */
.button {
    border-radius: 8px;
    background-image: linear-gradient(to bottom right, #3faeff, #164070);
    background-color: #164070;
    border: solid 1px silver;
    padding: 5px 8px;
    min-width: 80px;
    font-family: Verdana, Arial;
    font-size: 9pt;
    color: white;
    text-align: center;
}

    .button:hover {
        background-color: #0056b3;
    }

.button-green {
    background-color: #4CAF50;
    color: white;
}

.button-red {
    background-color: #f44336;
    color: white;
}

.button-blue {
    background-color: #2f6bcc;
    color: white;
}

.button-orange {
    background-color: #ff8000;
    color: white;
}

.button-close {
    background-color: silver;
    color: white;
}

.button-transparent {
    background-color: white;
    color: white;
}

.button-green:hover,
.button-red:hover,
.button-blue:hover,
.button-orange:hover,
.button-close:hover {
    filter: brightness(1.2);
}

/* === Modal Background === */
.modalBackground {
    background: #CCCCCC;
    filter: alpha(opacity=60);
    opacity: 0.6;
}

/* === Textbox === */
.textbox {
    border-radius: 8px;
    border: solid 1px silver;
    padding: 0 5px;
}

/* === Layout Body === */
.body-2col,
.body-2col-transparent {
    padding: 10px;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.body-2col {
    border: 1px solid #ddd;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.page-banner {
    width: 110%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: white;
    margin-left: -5%;
    margin-right: -5%;
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

/* === Form === */
.form-container,
.form-container-transparent {
    margin: 30px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-radius: 20px;
}
.form-container-filtri {
    margin: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background-color:transparent;
}
.form-container {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.form-container-transparent {
    background: rgba(255,255,255,0.8);
}

.form-subcontainer {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 18px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-container h2,
.form-container-transparent h2 {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    padding: 3px;
}

.form-group-full-width {
    grid-column: 1 / -1;
}

.form-row {
    display: flex;
    align-items: center;
}

    .form-row input[type="checkbox"],
    .form-row label {
        margin: 0;
    }



.controllo-form-textbox {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 15px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    text-align: center;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

    .controllo-form-textbox::placeholder {
        color: white; /* Colore del placeholder */
        opacity: 1; /* Assicura che il colore sia visibile */
    }

    .controllo-form-textbox:focus {
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
    }

.controllo-form {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 15px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    text-align: center;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

    .controllo-form:focus {
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
    }

    .controllo-form::-moz-placeholder,
    .controllo-form:-ms-input-placeholder,
    .controllo-form::-webkit-input-placeholder {
        color: #999;
    }

    .controllo-form[disabled],
    .controllo-form[readonly],
    fieldset[disabled] .controllo-form {
        background-color: #eeeeee;
        opacity: 1;
        cursor: not-allowed;
    }

.only-arrow select {
    color: transparent;
    background-color: transparent;
    border: none;
    width: 20px;
    padding: 0;
    appearance: none;
    text-indent: 9999px;
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.form-control-desc {
    padding: 8px;
    resize: both;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 15px;
    width: 100%;
    max-width: none;
}

.form-actions {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.btn-primary {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 15px;
    cursor: pointer;
}

    .btn-primary:hover {
        background-color: #0056b3;
    }

/* Responsive Forms */
@media (max-width: 600px) {
    .form-container,
    .form-subcontainer,
    .form-container-transparent,
    .body-2col,
    .body-2col-transparent {
        grid-template-columns: 1fr;
    }
}

/* === Tooltip === */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.checklist input[type="checkbox"] {
    margin-right: 4px; /* <-- spazio tra la casella e il testo */
}
.custom-tooltip {
    position: absolute;
    top: 0px;
    right: -50px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 9999;
    min-width: 120px;
    margin-top: 5px;
}

.custom-tooltip-onclick-hidden {
    position: absolute;
    top: 80%;
    left: -50px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 9999;
    width: contain;
    margin-top: 5px;
}
.custom-tooltip-onclick-visible {
    position: absolute;
    top: 80%;
    left: -50px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 9999;
    width: contain;
    margin-top: 5px;
}

.tooltip-wrapper:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === Flex Utility === */
.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
}

.flex-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* === Dettagli appuntamenti === */
.appuntamento {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

    .appuntamento:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.wrap-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}

.data {
    flex: 1 1 auto;
    max-width: 350px;
    font-weight: bold;
    color: #155d8c;
    font-size: 1em;
}

.nomescad {
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.riga-persone-gruppi .persone,
.riga-persone-gruppi .gruppi {
    flex: 1 1 auto;
    min-width: 150px;
    color: #555;
    font-size: 0.95em;
}

.icon {
    margin-right: 5px;
    color: #888;
    font-style: normal;
}

.descrizione,
.note {
    margin-top: 5px;
    color: #555;
    font-size: 0.95em;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

    /* ✅ Blocca lo scroll del body SOLO quando il popup è aperto */
    body.modal-open {
        overflow: hidden;
    }

.btn-salva-scadenza {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 15px;
    cursor: pointer;
    width: 300px;
    text-align: center;
}

    .btn-salva-scadenza:hover {
        background-color: #0056b3;
    }
/* ---------- Stile base / Desktop ---------- */
.gridview {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

    /* Input dentro la GridView */
    .gridview input[type="text"],
    .edit-textbox {
        padding: 8px 10px;
        border-radius: 8px;
        border: 1px solid #ccc;
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
    }

    .gridview th,
    .gridview td {
        padding: 12px 15px;
        border: none;
    }

    .gridview th {
        background-color: rgba(42, 123, 155, 1);
        color: white;
        text-align: left;
    }

    .gridview tr {
        background-color: #fff;
    }

    /* Ogni cella viene mostrata come coppia Etichetta + Valore */
    .gridview-periodo {
        display: flex;
        flex-direction: column
    }
        .gridview tr:nth-child(even) {
            background-color: #f9f9f9;
        }

        .gridview tr:hover {
            background-color: #f1f1f1;
        }

        /* Separatore sottile tra le righe */
        .gridview tr:not(:last-child) td {
            border-bottom: 1px solid #ddd;
        }

    /* Bordi arrotondati */
    .gridview th:first-child {
        border-top-left-radius: 12px;
    }

    .gridview th:last-child {
        border-top-right-radius: 12px;
    }

    .gridview tr:last-child td:first-child {
        border-bottom-left-radius: 12px;
    }

    .gridview tr:last-child td:last-child {
        border-bottom-right-radius: 12px;
    }

/* ===== MOBILE FULL SCREEN ===== */
@media (max-width: 768px) {
    /* Contenitore principale per mobile */

    .form-container-filtri {
        margin: auto;
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
    }
    .custom-tooltip {
        left: auto;
        right: 0;
    }

    .responsive-container {
        flex-wrap: wrap;
        padding-bottom: 50px;
        height: auto;
    }

    .btn-salva-scadenza {
        width: 100%;
    }

    .calendar-switch {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        border-radius: 20px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        padding: 5px 8px;
        max-width: fit-content;
    }

        .calendar-switch.btnoggi {
            display: none;
        }

        /* Nasconde il bordo/ombra dei div interni in mobile */
        .calendar-switch:not(:first-child) {
            border: none;
            box-shadow: none;
            padding: 0;
            margin-bottom: 0;
        }

    /* Nasconde il bordo/ombra dei div interni in mobile */
    .tooltip-wrapper:not(:first-child) {
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 0;
    }
    /* Unisci tutti i div come se fossero uno solo */
    .calendar-switch-container {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center; /* Centra in orizzontale */
    }
    /* Overlay a pieno schermo */
    .popup-overlay {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background-color: white; /* oppure rgba(0,0,0,0.3) */
        z-index: 9999;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    /* Box principale del popup */
    .popup-box {
        padding: 5px;
        margin: 0px;
        width: 100%;
        overflow: auto;
        display: flex;
        flex-direction: column;
        flex: 1;
        border-radius: 0;
        box-shadow: none;
    }

    .popup-btn,
    .popup-linkbtn {
        padding: 8px 16px;
        border: none;
        border-radius: 10px;
        font-size: 12px;
        cursor: pointer;
        width: fit-content;
    }

    .gridview,
    .gridview table,
    .gridview tbody,
    .gridview th,
    .gridview td,
    .gridview tr {
        display: block;
        width: 100%;
    }

        /* Nasconde l'intestazione classica */
        .gridview tr:first-child {
            display: none !important;
        }
        /* Ogni riga diventa una card */
        .gridview tr {
            margin-bottom: 12px;
            border: 1px solid #ccc;
            border-radius: 10px;
            padding: 10px;
            background: #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }

        /* Ogni cella viene mostrata come coppia Etichetta + Valore */
        .gridview td {
            display: flex;
            justify-content: space-between;
            padding: 8px;
            border-bottom: 1px solid #eee;
        }

        /* Ogni cella viene mostrata come coppia Etichetta + Valore */
        .gridview-periodo {
            text-align: right;
        }

            /* Mostra il nome della colonna come etichetta */
            .gridview td:before {
                content: attr(data-label);
                font-weight: bold;
                color: #2A7B9B;
                margin-right: 10px;
            }

            /* Rimuove il bordo dall'ultima cella */
            .gridview td:last-child {
                border-bottom: none;
            }

    .form-subcontainer {
        padding: 10px;
    }

    .form-container-transparent {
        margin: 0px;
    }
}
