:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#previewImage {
    max-height: 400px;
    object-fit: contain;
}

#videoElement {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    background-color: #000;
}

#cameraPreview {
    position: relative;
}

#cameraPreview video {
    border-radius: 10px;
}

/* Estilos para las categorías */
.categoria-container {
    margin-bottom: 1rem;
}

.categoria-botones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.btn-categoria {
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.btn-categoria i {
    font-size: 1.1rem;
}

.btn-categoria:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-categoria.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(25, 135, 84, 0.3);
}

/* Estilos para las etiquetas */
.etiquetas-container {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

#todas-las-etiquetas {
    margin-top: 0.75rem;
}

/* Estilos para etiquetas en el modal */
#etiquetasModalGrid .etiqueta-badge {
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    color: #495057;
    font-weight: 500;
}

#etiquetasModalGrid .etiqueta-badge:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#etiquetasModalGrid .etiqueta-badge.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(25, 135, 84, 0.3);
}

.etiqueta-badge {
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: #495057;
}

.etiqueta-badge:hover {
    background-color: #dee2e6;
}

.etiqueta-badge.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Estilos para las etiquetas seleccionadas */
#etiquetasSeleccionadas .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#etiquetasSeleccionadas .btn-close {
    font-size: 0.6rem;
    padding: 0.5rem;
}

/* Mejoras para el formulario */
#captureForm {
    height: 100%;
}

#categoriasEtiquetas {
    background-color: transparent;
    border: none !important;
    padding: 0;
}

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: scale(1.05);
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 15px;
}

.badge-tag {
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.table-actions button {
    margin-right: 5px;
}

.min-vh-100 {
    min-height: 100vh;
}

.form-label {
    font-weight: 600;
    color: #495057;
}

.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
}

.alert {
    border-radius: 5px;
}

.modal-content {
    border-radius: 10px;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Estilos específicos para el modal de etiquetas */
#etiquetasModal .modal-header {
    transition: background-color 0.3s ease;
}

#etiquetasModal .modal-body {
    min-height: 200px;
}

@media (max-width: 768px) {
    .photo-card img {
        height: 200px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .categoria-botones {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .categoria-botones {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}
