@font-face {
    font-family: 'Poppins';
    src: url('/static/fonts/Poppins-ExtraLight.ttf') format('woff2');
}

* {
    font-family: Poppins;
}

body {
    height: 100vh;
    background: rgb(85, 85, 85);
    background: radial-gradient(circle, rgb(143 141 141) 0%, rgb(84 83 83) 50%, rgb(47 46 46) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    color: white;
}

h1 {
    font-weight: 300;
    line-height: 1.2;
    font-size: 22px !important;
}

.flipped {
    transform: scaleX(-1);
}

#results {
    transform: scaleX(-1);
}

.center-face {
    width: 180px;
    height: 267px;
    position: absolute;
    top: 68px;
    right: 168px;
    border-radius: 80px;
    border: 4px dashed rgba(0, 195, 255, 0.5);
    z-index: 99999;
}

.modal-ku {
    width: 515px !important;
    margin: auto !important;
}

.Imgreco {
    width: 13rem;
    margin-bottom: 2rem;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
}

.modal-content {
    border-radius: 0 !important;
}

.swal-footer {
    text-align: center !important;
}

.container_button {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.container_button_modal {
    position: absolute;
    left: 0rem;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    margin-top: 2rem;
    width: 100%;
}

.btn_close_modal {
    position: absolute;
    top: 2%;
    left: 85%;
    z-index: 2;
    display: none;
    height: 9.8%;
    font-size: calc(100vh * 0.078) !important;

    background-color: #5d5d5f00 !important;
    border: none;

    color: white !important;
    opacity: 1 !important;


    line-height: 1;
}



.btn_content {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: .8rem;
}

.btn_take_picture {
    min-width: max-content;

    background-color: #ff8000 !important;
    border: 1px solid #ff8000 !important;

    font-size: 20px;
    font-weight: bold !important;
    color: white;
}

#retakephoto {

    background-color: #55555500 !important;
    border: 1px solid #ffffff !important;
    color: #e0e0e0;
    font-weight: bold !important;
}

#uploadphoto {

    background-color: #00d111 !important;
    border: 1px solid #00d111 !important;

}

.swal-button {
    width: 152px !important;
    background-color: #007bff !important;
    border-radius: 0;
}

.swal-modal {
    border-radius: 0;
}

.fade.show {
    background: rgb(85, 85, 85);
    background: radial-gradient(circle, rgba(85, 85, 85, 1) 0%, rgba(76, 76, 76, 1) 50%, rgba(102, 102, 102, 1) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
}

.modal-body {
    box-shadow: 0px 0px 42px #333333;
}

.section-container {
    display: flex;
    flex-flow: column;

    justify-content: center;
    align-items: center;

    padding-top: 4rem;
}

.icon {
    width: 1.95rem;
}

.svg-white {}

.svg-gray {
    filter: brightness(0) saturate(100%) invert(87%) sepia(1%) saturate(316%) hue-rotate(314deg) brightness(77%) contrast(72%);
}

.verif-facial-container {
    max-width: 56rem;
    width: 56rem;
    padding: calc(100vw * 0.005);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    background-color: #1d1e22;
    background: linear-gradient(to bottom, rgb(138 138 138 / 29%) 0%, rgb(57 57 57 / 50%) 50%, rgba(36, 36, 36, 0.6) 100%);
    height: 75%;
    width: calc(.3 * 100%);
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all .2s ease;
    animation: appear 1s ease-out forwards;
    backdrop-filter: blur(3px);
}

.verif-facial-container__header {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
    padding: 0rem 5%;
    height: 10%;
    width: 100%;
    flex-direction: row;
    border-bottom: 1px solid rgb(116, 116, 116);
}

.verif-facial-container__wrapper {
    height: 90%;
    display: flex;
    flex-direction: column;
    transition: all ease-out .4s;
    visibility: visible;
    opacity: 1;
}

.verif-facial-container__header__icon {
    height: 100%;
    max-height: 100%;
    width: 45%;
    object-fit: contain;
    box-sizing: border-box;
}

.verif-facial-container__wrapper__footer {
    display: flex;
    padding: 1em 0rem .5rem 0rem;
    padding: calc(100vw * 0.005) 0rem calc(100vw * 0.005) 0rem;
    flex-direction: row;
    justify-content: space-between;
    margin: 0rem calc(100vw * 0.01);
    border-top: 1px solid rgb(116, 116, 116);
    height: 13%;
    gap: calc(100vw * 0.01);
}

.verif-facial-container__wrapper__footer__header {
    width: 45%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.verif-facial-container__wrapper__footer__header img {
    height: 100%;
    object-fit: contain;
    padding: calc(100vw * 0.005);
}

.verif-facial-container__wrapper__footer__header__title {
    width: 50%;
    gap: calc(100vw * 0.005);
    margin: 0rem;
    line-height: calc(100vw * 0.01);
    color: white;
    font-weight: bold;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: calc(100vw * 0.01) !important;
}


.verif-facial-container__wrapper__footer__header__title img {
    width: 30%;
    padding: calc(100vw * 0.005);
    margin-left: calc(-1 *(100vw * 0.01));
    height: auto;
}

.verif-facial-container__wrapper__footer__header__button {
    width: 45%;
    background-color: #ff8a07;
    border: none;
    color: white;
    padding: calc(100vw * 0.007) calc(100vw * 0.01);
    text-align: center;
    font-weight: bolder;
    text-decoration: none;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    line-height: calc(100vw * 0.015);
    font-size: calc(100vw * 0.0078) !important;

}

.verif-facial-container__wrapper__footer__header__button__img {
    height: 100%;
    width: calc(100vw * 0.015);
    object-fit: contain;
}

.verif-facial-container__wrapper__footer__header__button:hover {

    background-color: #ee7f00;

}

.verif-facial-container__wrapper__footer__header__button:active {

    background-color: #dd7601;

}

#hero-canvas {
    animation: appear .2s;
    transform: none !important;

}

@media (min-width: 768px) {
    /* estilos para desktop */

    /* .verif-facial-container {
                max-width: 30rem;
                min-height: 25rem;
                max-height: 31rem;

            } */
}

/* Móviles estándar */
@media (max-width: 1068px) {

    /* estilos para móviles en general */
    .verif-facial-container {
        max-height: 55%;
        width: 75%;
        max-width: 30rem;
    }

    .verif-facial-container__wrapper__footer__header__title {
        line-height: calc(100vw * 0.03);
        font-size: calc(100vw * 0.03) !important;
    }

    .verif-facial-container__wrapper__footer__header__button {
        line-height: calc(100vw * 0.02);
        font-size: calc(100vw * 0.02) !important;

    }

    .verif-facial-container__wrapper__footer__header__button__img {
        width: calc(100vw * 0.05);
        padding: 0rem;
    }

    .verif-facial-container__wrapper__footer__header img {
        padding: calc(100vw * 0.04);
    }

    .verif-facial-container__wrapper__footer__header {
        width: 50%;
    }
}

@keyframes jumping-lighting {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        filter: brightness(1.5);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
}

@keyframes appear-normal {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    100% {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes appear {
    0% {
        transform: scale(0.98) translate(-50%, -50%);
        opacity: 0;
        visibility: hidden;
    }

    100% {
        transform: scale(1) translate(-50%, -50%);
        opacity: 1;
        visibility: visible;
    }
}

@keyframes highlight {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }

    100% {
        filter: brightness(1);
    }
}

@keyframes toMax {
    0% {
        left: var(--start-left, 50%);
        top: var(--start-top, 50%);
        width: var(--start-width, 40%);
        height: var(--start-height, auto);
        transform: translate(-50%, -50%);

    }

    100% {
        left: 0;
        top: 0;
        min-width: 100%;
        height: 100%;
        transform: translate(-50%, -50%);
    }
}

.verif-facial-container__background-guie {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: none;
    align-items: flex-start;
    justify-content: flex-start;
    background: radial-gradient(circle, rgba(143, 141, 141, 0) 0%, rgba(39, 39, 39, 0.45) 50%, rgb(0, 0, 0) 100%);
    animation: appear-normal 1s;

}

.verif-facial-container__background-guie::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(143, 141, 141, 0) 30%, rgba(39, 39, 39, 0.45) 42%, rgb(0, 0, 0) 90%);
    backdrop-filter: blur(2px);
    z-index: 1;
    -webkit-backdrop-filter: blur(4px);

    /* Crea un agujero en el centro */
    mask: radial-gradient(circle,
            transparent 31%,
            /* centro sin blur */
            black 42%
            /* bordes con blur */
        );
}

/* imagen guía: empezará posicionada (absolute) y luego animará a cubrir el contenedor */
.verif-facial-container__background-guie__guie {
    position: absolute;
    width: 40%;
    max-width: 420px;
    transform: translate(-50%, -50%);
    object-fit: cover;
    transition: none;
    z-index: 2;
    will-change: left, top, width, height, transform;
}

.verif-facial-container__background-guie__ovalo {
    position: absolute;
    width: 40%;
    max-width: 420px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    animation: appear-normal 4s ease-out 0s forwards,
        highlight 1s ease-out 1s infinite;
    z-index: 2;
    will-change: left, top, width, height, transform;
}

/* animación que expande la guía hasta cubrir el contenedor (anima width/height)
           y al final hace un pequeño "brinco" con scale. IMPORTANTE: mantener el mismo
           tipo de transform (translate + scale) en todos los fotogramas para evitar saltos. */
@keyframes expandGuide {
    0% {
        left: var(--start-left, 50%);
        top: var(--start-top, 50%);
        min-width: var(--start-width, 40%);
        height: var(--start-height, auto);
        transform: translate(-50%, -50%) scale(0.96);
    }

    55% {

        left: 0;
        top: 0;
        min-width: 100%;
        height: 100%;
        /* llegar ligeramente sobredimensionado para rebotar */
        transform: translate(0%, 0%) scale(1.04);
    }

    78% {
        left: 0;
        top: 0;
        min-width: 100%;
        height: 100%;
        /* rebote inverso */
        transform: translate(0%, 0%) scale(0.985);
    }

    100% {
        left: 0;
        top: 0;
        min-width: 100%;
        height: 100%;
        transform: translate(0%, 0%) scale(1);
    }
}

.verif-facial-container__background-guie__guie.animate-expand {
    /* duración y curva suavizada para el efecto de rebote */
    animation: expandGuide ease-in 1s forwards;
    transform-origin: center center;
    /* escalar desde el centro visual */
    object-fit: fill;
    /* asegurar que ocupe completamente sin distorsionar */
}

.verif-facial-container__background-guie__buttons {
    position: absolute;
    top: 85%;
    left: 0%;
    width: 100%;
    height: 8.8%;
    z-index: 3;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.verif-facial-container__background-guie__buttons__button {
    width: 40%;
    height: 100%;
    background-color: #ff8a07;
    border: none;
    color: white;
    padding: calc(100vw * 0.007) calc(100vw * 0.01);
    text-align: center;
    font-weight: bolder;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    line-height: calc(100vw * 0.015);
}
.verif-facial-container__background-guie__buttons__button div {
    font-size: calc(100vw * 0.012) !important;

}
.verif-facial-container__background-guie__buttons__button div img{
    height: 100%;
    width: calc(100vw * 0.02);
    object-fit: contain;
}
.verif-facial-container__background-guie__buttons__button img {
    height: 100%;
    width: calc(100vw * 0.015);
    object-fit: contain;
}

.verif-facial-container__background-guie__buttons__button:hover {

    background-color: #ee7f00;

}

.verif-facial-container__background-guie__buttons__button:active {

    background-color: #dd7601;

}

.verif-facial-container__background-guie__video-container {
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background: rgba(128, 128, 128, 0.447);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#results,
#results {
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
}

/* Forzar que el elemento de cámara / video ocupe todo el contenedor */
#my_camera,
video,
#results,
#results img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

video {
    animation: appear-normal 3s forwards;
}