/* Estilos para el Gestor de Multimedia */

.ind-media-container, .ind-media-table-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ind-media-header {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.ind-media-header h2 {
    margin: 0 0 10px 0;
    color: white;
}

.ind-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 25px;
}

.ind-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #9c27b0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.ind-form-group {
    margin-bottom: 20px;
}

.ind-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ind-form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.ind-form-control:focus {
    border-color: #9c27b0;
    outline: none;
}

.ind-radio-group {
    display: flex;
    gap: 20px;
}

.ind-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.ind-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.ind-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.ind-btn-primary {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
}

.ind-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.ind-btn-success {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.ind-btn-success:hover {
    transform: translateY(-2px);
}

.ind-btn-secondary {
    background: #757575;
    color: white;
}

.ind-btn-secondary:hover {
    background: #616161;
}

.ind-btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.ind-btn-danger:hover {
    transform: translateY(-2px);
}

.ind-table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.ind-data-table {
    width: 100%;
    border-collapse: collapse;
}

.ind-data-table th,
.ind-data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ind-data-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.ind-data-table tr:hover {
    background: #f9f9f9;
}

.ind-media-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.ind-media-thumb:hover {
    border-color: #9c27b0;
    transform: scale(1.05);
}

.ind-scan-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.ind-scan-info p {
    margin: 5px 0;
}

.ind-preview-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.ind-pagination {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.ind-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #9c27b0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ind-alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.ind-alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.ind-alert-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.ind-alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

/* Popup */
.ind-media-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ind-media-popup-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ind-media-popup-header {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ind-media-popup-header h3 {
    margin: 0;
    color: white;
}

.ind-close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.ind-close-popup:hover {
    transform: scale(1.2);
}

.ind-media-popup-body {
    padding: 20px;
    text-align: center;
}

.ind-media-popup-body img,
.ind-media-popup-body video {
    max-width: 100%;
    max-height: 70vh;
}

.ind-media-popup-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.ind-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.ind-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ff9800;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.ind-login-required {
    text-align: center;
    padding: 60px 20px;
}

.ind-login-required a {
    color: #9c27b0;
    text-decoration: none;
    font-weight: bold;
}

.ind-login-required a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .ind-filters {
        grid-template-columns: 1fr;
    }
    
    .ind-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ind-data-table th,
    .ind-data-table td {
        padding: 8px;
        font-size: 12px;
    }
}
/* Estilos para el efecto espejo en la cámara */
.ind-mirror-preview {
    transform: scaleX(-1);
}

/* Estilos para el botón de cerrar preview */
.ind-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.ind-preview-header span {
    font-weight: 600;
    color: #333;
}

.ind-close-preview {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
    padding: 0 5px;
}

.ind-close-preview:hover {
    color: #f44336;
    transform: scale(1.1);
}

#ind-preview-content img,
#ind-preview-content video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

/* Efecto espejo para la vista previa de la cámara (si se usa getUsermedia) */
.mirror-preview {
    transform: scaleX(-1);
}