/* Estilos para la Interfaz de Configuración PWA Professional */

/* Modal de Configuración */
.config-modal {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.config-modal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.config-modal .modal-header {
  border: none;
  padding: 2rem 2rem 1rem;
  background: transparent;
}

.config-modal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.config-modal .modal-body {
  padding: 1rem 2rem 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Navegación de categorías */
.config-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.config-nav-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-nav-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.config-nav-item.active {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Contenido de configuración */
.config-content {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.config-section {
  display: none;
}

.config-section.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.config-group {
  margin-bottom: 1.5rem;
}

.config-group:last-child {
  margin-bottom: 0;
}

.config-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Elementos de configuración */
.config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.config-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.config-item-info {
  flex: 1;
}

.config-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: white;
}

.config-item-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.config-item-control {
  margin-left: 1rem;
}

/* Controles personalizados */
.config-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.config-toggle.active {
  background: rgba(72, 187, 120, 0.8);
  border-color: rgba(72, 187, 120, 1);
}

.config-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.config-toggle.active::after {
  transform: translateX(24px);
}

.config-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  min-width: 120px;
  cursor: pointer;
}

.config-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.config-select option {
  background: #2d3748;
  color: white;
}

.config-range {
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.config-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.config-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.config-color {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

/* Botones de acción */
.config-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.config-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.config-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: white;
}

.config-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.config-btn.primary {
  background: rgba(72, 187, 120, 0.8);
  border-color: rgba(72, 187, 120, 1);
}

.config-btn.danger {
  background: rgba(245, 101, 101, 0.8);
  border-color: rgba(245, 101, 101, 1);
}

/* Sección de biometría */
.biometric-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.biometric-status.supported {
  background: rgba(72, 187, 120, 0.2);
  border: 1px solid rgba(72, 187, 120, 0.3);
}

.biometric-status.not-supported {
  background: rgba(245, 101, 101, 0.2);
  border: 1px solid rgba(245, 101, 101, 0.3);
}

.biometric-icon {
  font-size: 1.5rem;
}

.biometric-info h6 {
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.biometric-info p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .config-modal .modal-content {
    margin: 1rem;
    border-radius: 16px;
  }
  
  .config-modal .modal-body {
    padding: 1rem;
    max-height: 60vh;
  }
  
  .config-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .config-nav-item {
    justify-content: center;
    font-size: 0.8rem;
  }
  
  .config-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .config-item-control {
    margin-left: 0;
    align-self: flex-end;
  }
  
  .config-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

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

/* Tema oscuro */
.theme-dark .config-modal .modal-content {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* Variables CSS para personalización */
:root {
  --config-primary: #667eea;
  --config-success: #48bb78;
  --config-danger: #f56565;
  --config-glass: rgba(255, 255, 255, 0.1);
}

/* Loading spinner */
.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
}

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