/* Estilos para el Modal de Visualizador */
.modal-visualizador {
  max-width: 98vw;
  max-height: 95vh;
  width: 98vw;
  height: 95vh;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.visualizador-fullscreen {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

.visualizador-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(95vh - 80px);
}

.visualizador-imagen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.visualizador-imagen img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.visualizador-pdf {
  width: 100%;
  height: 100%;
  min-height: 600px;
  display: flex;
}

.visualizador-pdf embed {
  border-radius: 8px;
  width: 100%;
  height: 100%;
}

.visualizador-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.visualizador-video video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.visualizador-texto {
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow: auto;
}

.visualizador-texto pre {
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.visualizador-no-soportado,
.visualizador-error {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.visualizador-no-soportado i,
.visualizador-error i {
  font-size: 72px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.visualizador-error i {
  color: #ef4444;
}

.visualizador-no-soportado p,
.visualizador-error p {
  font-size: 18px;
  margin: 0 0 20px 0;
  color: #94a3b8;
}

.visualizador-error small {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
  font-family: monospace;
}

.visualizador-no-soportado button {
  margin-top: 10px;
}

/* Controles de Zoom para Imágenes */
.visualizador-imagen-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.visualizador-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.btn-zoom {
  padding: 10px 16px;
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.btn-zoom:hover {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.zoom-level {
  padding: 8px 16px;
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  min-width: 70px;
  text-align: center;
}

.visualizador-imagen {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 0;
}

.visualizador-imagen img {
  transition: transform 0.2s ease;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Estilos para Panel de Archivos */
.archivos-panel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archivo-panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.archivo-panel-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.archivo-panel-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  transform: translateY(-3px);
  background: #ffffff;
}

.archivo-panel-item:hover::before {
  transform: scaleY(1);
}

.archivo-panel-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.archivo-panel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  flex-shrink: 0;
  border: 2px solid #bae6fd;
}

.archivo-panel-icon i {
  font-size: 24px;
}

.archivo-panel-detalles {
  flex: 1;
  min-width: 0;
}

.archivo-panel-nombre {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archivo-panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.archivo-panel-extension {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid #93c5fd;
}

.archivo-panel-acciones {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-panel {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-panel i {
  font-size: 14px;
}

.btn-panel-ver {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-panel-ver:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-panel-fullscreen {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-panel-fullscreen:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-panel-descargar {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-panel-descargar:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Notificaci\u00f3n de descarga */
.download-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
}

.download-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.download-notification i {
  font-size: 20px;
}

.download-notification span {
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .archivo-panel-acciones {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-panel {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .modal-visualizador {
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
  }
  
  .visualizador-body {
    min-height: 400px;
  }
  
  .visualizador-imagen,
  .visualizador-video {
    padding: 10px;
  }
  
  .visualizador-texto {
    padding: 10px;
  }
  
  .visualizador-texto pre {
    font-size: 12px;
    padding: 15px;
  }
  
  .archivo-panel-item {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .archivo-panel-info {
    width: 100%;
  }
  
  .archivo-panel-acciones {
    width: 100%;
    flex-direction: column;
  }
  
  .btn-panel {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }
  
  .btn-panel span {
    display: inline;
  }
}
