/* Estilos personalizados que complementan Bootstrap */
body {
    min-height: 100vh;
    background-color: #f8f9fa;
}

#camera-container {
    position: relative;
    background-color: #000;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1; /* Relación cuadrada */
    margin: 0 auto;
}

#scanner-view {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que el video llene el contenedor */
}

.scan-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 4px solid rgba(76, 175, 80, 0.5);
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
}

/* Feedback de validación */
.valid-feedback, .invalid-feedback {
    display: none;
    margin-left: 8px;
}

/* Estilo para la imagen capturada */
#captured-image {
    max-height: 300px;
    object-fit: contain;
}

/* Animación de éxito */
.success-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.checkmark {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: block;
    stroke-width: 5;
    stroke: #4CAF50;
    stroke-miterlimit: 10;
    margin: 10% auto 20px;
    box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
    animation: checkmark 1s ease-in-out, pulse 2s ease-in-out infinite;
    transform-origin: 50% 50%;
}

.checkmark-circle {
    stroke-dasharray: 480;
    stroke-dashoffset: 480;
    animation: checkmark-circle 1s ease-in-out forwards;
    fill: none;
    stroke: #4CAF50;
}

.checkmark-check {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark-check 1s 1s ease-in-out forwards;
    stroke: #4CAF50;
}

.success-message {
    color: #2e7d32;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease-in-out;
}

.zone-name {
    font-size: 20px;
    color: #333;
    margin-top: 10px;
    animation: fadeInUp 0.5s 0.2s ease-in-out both;
}

@keyframes checkmark {
    0% { transform: scale(0.6); }
    100% { transform: scale(1); }
}

@keyframes checkmark-circle {
    0% { stroke-dashoffset: 480; }
    100% { stroke-dashoffset: 0; }
}

@keyframes checkmark-check {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-message {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
}

/* Responsividad adicional */
@media (max-width: 768px) {
    #camera-container {
        max-width: 100%;
    }
    
    .scan-guide {
        width: 90%;
        height: 90%;
    }
}

/* Estilos para la sección de permisos */
.permission-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.permission-card.granted {
    border-left-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.permission-card.missing {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.permission-icon {
    font-size: 1.75rem;
    width: 50px;
    text-align: center;
}

/* Estilo para el nombre del trabajador */
.worker-name {
    font-size: 1.2rem;
    padding: 15px;
    text-align: center;
    background-color: #e8f5e9;
    border-radius: 5px;
    margin-top: 15px;
}

/* Ajustes para el header */
header img {
    max-height: 70px;
    width: auto;
}

/* Ajustes responsivos */
@media (max-width: 576px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    header img {
        margin-bottom: 1rem;
    }
}

/* Estilos para la sección de permisos */
.permission-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    background-color: #f8f9fa;
}

.permission-card.granted {
    border-left-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.permission-card.missing {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.permission-icon {
    font-size: 1.75rem;
    min-width: 50px;
    text-align: center;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .permission-card {
        margin-bottom: 1rem;
    }
    
    .permission-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
}

/* Estilos para notificaciones de error */
.toast {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.toast-danger {
    background-color: #dc3545;
}

/* Animación de entrada */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.show {
    animation: slideInUp 0.3s ease-out;
}

/* Ícono específico para errores de cámara */
.fa-video-slash {
    font-size: 1.5rem;
}


/* rounds.css - Solo cambios necesarios para diferenciar headers de botones */

/* Cabeceras - Usaremos tonos más oscuros que los botones */
.card-header.bg-primary {
    background-color: #2e3192 !important; /* Azul más oscuro */
}

.card-header.bg-warning {
    background-color: #ffca2c !important; /* Amarillo más claro */
    color: #212529 !important;
}

/* Botones - Mantenemos los colores originales de Bootstrap */
.btn-primary {
    background-color: #0d6efd; /* Azul estándar */
}

.btn-warning {
    background-color: #ffc107; /* Amarillo estándar */
    color: #212529;
}

/* Ajuste opcional para mejor contraste en cabeceras */
.card-header h2 {
    font-weight: 600;
}