﻿:root {
    --modal-text: #454545;
    --modal-title: #454545;
    --modal-button: #896826;
    --modal-button-hover: #af9051;
    --modal-button-text: #ffffff;
    --modal-button-text-hover: #ffffff;
    --app-safe-area-inset-top: 0px;
    --app-safe-area-inset-bottom:0px;
}

dialog {
    margin: 0;
    padding: 0;
    max-width: none;
    max-height: none;
}

body.modal-open, body:has(.modal-reservation.active) {
    overflow: hidden;
    /*pour safari iOS*/
    touch-action: none;
    /*fin pour safari iOS*/
}

/* The Modal (background) */
.modal-backdrop {
    touch-action: none;
    overscroll-behavior: none;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0,0,0,0.24);
    view-transition-name: modal-backdrop;
}

::view-transition-group(modal-backdrop) {
    z-index: 100;
    animation-duration: 0s !important;
}

.modal-backdrop.active {
    display: flex;
}

.modal-reservation {
    overscroll-behavior: none;
    display: none;
    position: fixed;
    z-index: 1060;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: center;
    align-items: center;
    padding-top: 30px;
    padding-top: calc(env(safe-area-inset-top) + 30px);
    padding-top: calc(max(env(safe-area-inset-top), var(--app-safe-area-inset-top)) + 30px);
    padding-bottom: 30px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px);
    background: transparent;
    view-transition-name: modal-reservation;
}
::view-transition-group(modal-reservation) {
    z-index: 120;
    animation-duration: 0s !important;
}
/*si filter y'a des modales dans des modales */
.modal-reservation:has(.modal-reservation.active) {
    overflow-y:hidden;
}

.modal-reservation::backdrop {
    opacity:0;
}

.modal-full-screen {
    width: 100%;
    height: 100%;
    height: 100dvh;
    padding:0px;
    margin:0px;
}
.modal-full-screen .modal-reservation-content {
    padding: 0px;
    border: none;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: 100%;
    box-shadow: none;
    border-radius: 0px;
    margin: 0px;
}



/*.modal-ensure-full-height {
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
}*/

.modal-menu  {
    padding-right:0px;
    padding-left:0px;
    padding-top:0px;
    padding-bottom:0px;
}
.modal-menu .modal-reservation-content {
    margin-right: 0px;
    margin-left: auto;
    border-radius: 0px;
    height: 100%;
    height: 100dvh;
    /*  padding-top: 30px;
    padding-top: calc(env(safe-area-inset-top) + 30px);*/
    padding-top: 30px;
    padding-top: calc(env(safe-area-inset-top) + 30px);
    padding-top: calc(max(env(safe-area-inset-top), var(--app-safe-area-inset-top)) + 30px);
    /*padding-bottom: 30px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 30px);*/
    padding-bottom: 30px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px);
}
.modal-menu .modal-button-close {
    right:20px;
    top: 10px;
    top: calc(env(safe-area-inset-top) + 10px);
    top: calc(max(env(safe-area-inset-top), var(--app-safe-area-inset-top)) + 10px);
}
.modal-menu #modal-menu-user-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.modal-menu #modal-menu-button-logout {
    font-size: 14px;
    line-height: 1;
    background-color: #3579d2;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 15px;
    line-height: 1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.modal-menu hr {
    margin-top: 15px;
    border-top: 1px solid #edf2f9;
    margin-bottom: 15px;
}

.modal-menu #modal-menu-text-surveys-for-sync, .modal-menu #modal-menu-last-update {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.modal-menu #modal-menu-text-surveys-for-sync, .modal-menu #modal-menu-show-sub-display-mode-0 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.modal-menu #modal-menu-text-surveys-for-sync, .modal-menu .switch-toggle {
    margin-top: 10px;
}


.modal-menu #modal-menu-button-surveys-for-sync {
    font-size: 14px;
    line-height: 1;
    background-color: #3579d2;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 15px;
    line-height: 1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}
.modal-menu #modal-menu-button-surveys-for-sync:disabled {
    background-color: #cecece;
    color: #838383;
    border-color: #cecece;
    box-shadow: none;
    cursor: not-allowed;
}
.modal-menu #modal-menu-button-surveys-for-sync svg {
    height:14px;
    width:14px;
}

.modal-menu #modal-menu-button-update-data {
    font-size: 14px;
    line-height: 1;
    background-color: #3579d2;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 15px;
    line-height: 1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.modal-menu #modal-menu-button-update-data svg {
    height: 14px;
    width: 14px;
}


.modal-qr-code-scan .modal-reservation-content {
    padding: 0px;
    border: none;
    width: 100%;
    overflow: hidden;
}
.modal-qr-code-scan .modal-reservation-content .video-qr-code-scan-container {
    width:100%;
   /* height:350px;*/
    max-width:100%;
    /*max-height:350px;*/
    display:block;
    position:relative;
}

.modal-qr-code-scan .modal-reservation-content .badge-qr-code-state {
    background: #00c800;
    color:#ffffff;
    font-weight:600;
    font-size: 12px;
    width: auto;
    display: inline-flex;
    border-radius: 99px;
    line-height: 1;
    padding: 5px 10px;
    position: absolute;
    bottom: 0;
    transform: translate3d(0px, calc(100% + 15px), 0px);
}





/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-width > .modal-reservation-content { 
    width: auto;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-large-width > .modal-reservation-content {
    width: 1450px;
    max-width:100%;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-classic-width > .modal-reservation-content {
    width: 90%;
    max-width: 600px;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-width-large-max-width > .modal-reservation-content {
    width: auto;
    max-width: 100%;
}


/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-max-width {
    padding-bottom: 0px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 0px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 0px);
}
.modal-reservation.modal-auto-max-width > .modal-reservation-content {
    min-width:800px;
    width: auto;
    max-width: 100%;
    min-height:82%;
    margin-bottom: unset;
    margin-left: 0px;
    margin-right: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}


/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-s-1 {

}

.modal-reservation.modal-s-1 > .modal-reservation-content {
    padding-top: 0px;
    padding-right: 0px;
    padding-left: 0px;
    padding-bottom: 0px;
    height: calc(100vh - 30px - 30px);
    height: calc(100vh - (env(safe-area-inset-bottom) + 30px) - (env(safe-area-inset-top) + 30px));
    height: calc(100vh - (max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px) - (max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px));
    overflow:hidden;
    overflow:clip;
}




.modal-reservation.active {
    display: flex;
}

.modal-reservation .button-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background-color: #e6e6e6;
    color: #393939;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    border-color: #ebebeb;
    border-radius: 30px;
}



.modal-button-close svg {
    width: 18px;
    height: 18px;
}

.modal-reservation-content {
    z-index: 2;
    pointer-events: auto;
    background-color: #ffffff;
    padding: 30px 20px;
    width: 90%;
    max-width: 600px;
    color:var(--modal-text);
    box-shadow: 0px 0px 28px #00000029;
    border-radius: 16px;
    margin-left: 20px;
    margin-right: 20px;
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    transition:opacity 0.2s ease;
}


.modal-reservation-content .modal-reservation-content-padding {
    padding: 30px 20px;
}


.modal-reservation-content .modal-reservation-title {
    color: var(--modal-title);
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 20px;
    text-align:center;
}

.modal-reservation-content .modal-reservation-title-v-1 {
    color: #454545;
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.6px;
}


.modal-reservation-content .modal-reservation-title-2 {
    color: var(--modal-title);
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: left;
}


.modal-reservation-content .modal-reservation-alert {
    font-size: 13px;
    line-height: 1;
    font-weight: 200;
    margin-bottom: 25px;
}


.modal-reservation-content form {
    display: grid;
    gap: 20px;
}

.modal-reservation-content input[type=text],
.modal-reservation-content input[type=datetime-local],
.modal-reservation-content input[type=date],
.modal-reservation-content input[type=number],
.modal-reservation-content select,
.modal-reservation-content textarea {
    font-size: 0.9rem;
}

    .modal-reservation-content .modal-label {
        font-weight: 600;
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 4px;
        display: block;
        margin-left: .375rem;
    }

    .modal-reservation-content .grid-cols-2 {
        display: grid;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        gap:15px;
    }

@media(min-width:1024px) {
    .modal-reservation-content {
        padding: 50px 50px;
        border-radius: 16px;
    }

    .container-modal-md {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-reservation-content .modal-reservation-title {
        font-size: 40px;
    }
}




.modal-reservation-content form button {
    justify-content:center;
}


.modal-button-close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background-color: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    border-color: #ebebeb;
    border-radius: 30px;
}

.modal-button-close svg {
    height: 18px;
    width: 18px;
}

.modal-reservation.modal-animation-appear {
    animation-name: modal-appear;
    animation-duration: 0.35s;
    will-change: opacity;
}


@keyframes modal-appear {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.modal-reservation.modal-animation-appear .modal-reservation-content {
    animation-name: modal-content-appear;
    animation-duration: 0.35s;
/*    will-change: transform; //NE PAS UTILISER CA FOU LA MERDE AVEC LES MODALS IMBRIQUEES DE LADMIN*/

}

@keyframes modal-content-appear {
    0% {
        transform: scale(0.97);
    }

    100% {
        transform: scale(1);
    }
}


.modal-reservation.modal-animation-disappear {
    animation-name: modal-disappear;
    animation-duration: 0.4s;
    will-change: opacity;
}

@keyframes modal-disappear {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}
.modal-reservation.modal-animation-disappear .modal-reservation-content {
    animation-name: modal-content-disappear;
    animation-duration: 0.4s;
    will-change: transform;
}

@keyframes modal-content-disappear {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.97);
    }
}




.modal-from-right-animation-appear {
    animation-name: modal-from-right-animation-appear;
    animation-duration: 0.4s;
    will-change: opacity, transform;
}


@keyframes modal-from-right-animation-appear {
    0% {
        transform: translate3d(100%, 0, 0);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}


.modal-from-right-animation-disappear {
    animation-name: modal-from-right-animation-disappear;
    animation-duration: 0.4s;
    will-change: opacity, transform;
}

@keyframes modal-from-right-animation-disappear {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        opacity: 1;
        transform: translate3d(100%, 0, 0);
    }
}