body {
    background-color: #f8f9fa;
}

.container {
    margin-top: 20px;
    text-align: center;
}

#information-facial {
    margin-top: 0px;
}

.panel {
    border-radius: 20px;
}

.lead {
    font-size: 1.1em;
}
.padding_label {
    padding-left: 10px; 
    padding-right: 10px;
}

#validation-facial,
#pos-validation-facial,
#end-validation-facial-without-app,
#end-validation-facial-with-app,
.canva-android-app,
.canva-ios-app,
#error-stream-facial {
    display: none;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background-color: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 3 / 4; 
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Remova a regra de position: relative para o #video */
#video {
    display: block;
    height: auto;
    /* remove: position: relative; */
}

/* Garanta que o .camera-content seja a referência de tamanho */
.camera-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* O vídeo, canvas e foto devem ser absolutos dentro do .camera-content */
#video,
#canvas,
#photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
    object-fit: cover;
}

#canvas {
    z-index: 10;
}

.status-box {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    min-height: 30px;
    line-height: 30px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    z-index: 20;
    padding: 0 15px;
}

#debug {
    font-family: monospace;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    min-height: 20px;
}

#retakeBtn {
    display: none;
}

#photo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 15px;
    position: static;
}

#photo-section {
    max-width: 350px;
    margin: auto;
}

/* Corrigido: Estilos para a tela de carregamento centralizada */
#loading-data,
#loading-data-save {
    display: flex;
    /* Usar flexbox */
    justify-content: center;
    /* Centralizar horizontalmente */
    align-items: center;
    /* Centralizar verticalmente */
    font-size: 1.5em;
    color: #555;
    flex-direction: column;
    text-align: center;
    /* Garantir que o texto também esteja centralizado */
}

#loading-data-save {
    display: none;
}

#loading-data .spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.face-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.face-frame-mask {
    width: 85%;
    height: 80%;
    max-width: 700px;
    max-height: 800px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50% 50% 45% 45% / 35% 35% 60% 60%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    border: 4px solid #b2b4b4ff;
}

.face-frame-mask.valid {
    border-color: lime !important;
}

.btn-orange {
    background-image: linear-gradient(to right, #ff5858 0%, #f09819 106%) !important;
    color: #fff !important;
    border: 2px solid transparent !important;
}

.btn-orange:hover {
    background-image: linear-gradient(to right, #ff4f00, #dc0f00) !important;
}

.btn-circle {
    border-radius: 50px;
}

.btn-outline-orange {
    border: 1px solid #f05619;
    background-color: white;
    color: #f05619 !important;
}

@media (max-width: 768px) {
    #video {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }

    .face-frame-mask {
        width: 85%;
        height: 80%;
    }
}