/* Archivo: public/css/funcionario-image-preview.css */

/* Efectos de transición para imágenes */
.img-thumbnail {
    transition: all 0.3s ease;
    cursor: pointer;
}

.img-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Zona de drag and drop */
.drag-over {
    border: 2px dashed #007bff !important;
    background-color: rgba(0, 123, 255, 0.1) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Estilo para contenedores de imagen */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.image-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Overlay para botones sobre imagen */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* Botones de acción sobre imagen */
.image-actions {
    display: flex;
    gap: 10px;
}

.image-actions .btn {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Indicadores de calidad */
.quality-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.quality-excellent {
    color: #28a745;
}

.quality-good {
    color: #ffc107;
}

.quality-poor {
    color: #dc3545;
}

/* Progreso de análisis */
.analysis-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.analysis-progress .progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

/* Cards de imagen mejoradas */
.image-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.image-card .card-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.image-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.image-card:hover .card-header::before {
    opacity: 1;
    animation: shine 1s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Custom file input styling */
.custom-file {
    position: relative;
    overflow: hidden;
}

.custom-file-input {
    opacity: 0;
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.custom-file-label {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-file-label:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.custom-file-label::before {
    content: '\f093';
    /* FontAwesome upload icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.custom-file-label:hover::before {
    color: #007bff;
}

/* Estados de validación */
.is-valid+.custom-file-label {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.is-invalid+.custom-file-label {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Modal de cámara */
.modal-lg {
    max-width: 800px;
}

#cameraVideo,
#cameraCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Botones de cámara */
.camera-controls {
    margin-top: 20px;
}

.camera-controls .btn {
    margin: 0 5px;
    min-width: 120px;
}

/* Indicadores de estado */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-loading {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.status-success {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.status-error {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

/* Tooltips personalizados */
.image-tooltip {
    position: relative;
}

.image-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.image-tooltip:hover::after {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .img-thumbnail {
        width: 100px;
        height: 100px;
    }

    .image-card {
        margin-bottom: 20px;
    }

    .camera-controls .btn {
        width: 100%;
        margin: 5px 0;
    }

    .modal-lg {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .custom-file-label {
        padding: 10px;
        font-size: 0.8rem;
    }

    .custom-file-label::before {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
}

/* Animaciones de carga */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Efectos de pulso para elementos activos */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states mejorados */
.custom-file-input:focus+.custom-file-label {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.btn:focus,
.btn.focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}