/* ============================================
   FALLBACKS DE AVISTAMIENTOS - LUUPIGO
   Archivo: assets/css/ficha_animal-fallback.css
   ✅ Estilos para cuando el sistema principal falla
   ✅ Modales de avistamientos alternativos
   ============================================ */

/* ===== MODAL FALLBACK PARA REPORTAR AVISTAMIENTO ===== */
.luupigo-modal-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.luupigo-modal-fallback-contenido {
  background: var(--bg-primary, #ffffff);
  padding: var(--space-6, 2rem);
  border-radius: var(--radius-lg, 10px);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0,0,0,0.1));
}

.luupigo-modal-fallback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5, 1.5rem);
  border-bottom: 2px solid var(--border-color, #eee);
  padding-bottom: var(--space-4, 1rem);
}

.luupigo-modal-fallback-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold, 700);
  color: var(--text-primary, #2c3e50);
}

.luupigo-modal-fallback-cerrar {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary, #95a5a6);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full, 50%);
  transition: var(--transition, all 0.3s ease);
  padding: 0;
  line-height: 1;
}

.luupigo-modal-fallback-cerrar:hover {
  background: var(--bg-tertiary, #f5f5f5);
  color: var(--text-primary, #2c3e50);
  transform: rotate(90deg);
}

.luupigo-modal-fallback-cerrar:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* ===== MODAL FALLBACK PARA LISTA DE AVISTAMIENTOS ===== */
.luupigo-modal-avistamientos-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.luupigo-modal-avistamientos-contenido {
  background: var(--bg-primary, #ffffff);
  padding: var(--space-6, 2rem);
  border-radius: var(--radius-lg, 10px);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0,0,0,0.1));
}

.luupigo-modal-avistamientos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4, 1.5rem);
  border-bottom: 2px solid var(--border-color, #eee);
  padding-bottom: var(--space-3, 1rem);
}

.luupigo-modal-avistamientos-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold, 700);
  color: var(--text-primary, #2c3e50);
}

.luupigo-modal-avistamientos-cerrar {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary, #95a5a6);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full, 50%);
  transition: var(--transition, all 0.3s ease);
  padding: 0;
  line-height: 1;
}

.luupigo-modal-avistamientos-cerrar:hover {
  background: var(--bg-tertiary, #f5f5f5);
  color: var(--text-primary, #2c3e50);
  transform: rotate(90deg);
}

.luupigo-lista-avistamientos {
  margin-bottom: var(--space-4, 1.5rem);
}

.luupigo-avistamiento-detallado {
  border: 1px solid var(--border-color, #eee);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-4, 1rem);
  margin-bottom: var(--space-3, 1rem);
  background: var(--bg-secondary, #f8f9fa);
}

.luupigo-avistamiento-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-2, 0.5rem);
}

.luupigo-badge-confirmaciones {
  background: var(--color-success, #27ae60);
  color: var(--text-white);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full, 12px);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold, 600);
}

.luupigo-avistamiento-ubicacion {
  color: var(--text-secondary, #666);
  margin-bottom: var(--space-2, 0.5rem);
  font-size: 0.95rem;
  line-height: var(--line-height-normal, 1.5);
}

.luupigo-avistamiento-comentario {
  font-style: italic;
  color: var(--text-primary, #2c3e50);
  background: var(--bg-primary, #ffffff);
  padding: var(--space-2, 0.5rem);
  border-radius: var(--radius-sm, 4px);
  margin: var(--space-2, 0.5rem) 0;
  font-size: 0.9rem;
  border-left: 3px solid var(--color-brand, #667eea);
}

.luupigo-avistamiento-acciones {
  margin-top: var(--space-2, 0.5rem);
}

.luupigo-btn-ver-mapa {
  background: var(--color-info, #3498db);
  color: var(--text-white);
  border: none;
  padding: var(--space-2, 0.5rem) var(--space-3, 1rem);
  border-radius: var(--radius-md, 5px);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium, 500);
  transition: var(--transition, all 0.3s ease);
  min-height: var(--touch-target-min, 44px);
}

.luupigo-btn-ver-mapa:hover {
  background: var(--color-info-dark, #2980b9);
  transform: translateY(-1px);
}

.luupigo-avistamientos-acciones {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-3, 1rem);
}

/* Responsive */
@media (max-width: 768px) {
  .luupigo-modal-fallback-contenido,
  .luupigo-modal-avistamientos-contenido {
    padding: var(--space-4, 1.5rem);
  }
  
  .luupigo-modal-fallback-header h2,
  .luupigo-modal-avistamientos-header h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .luupigo-avistamiento-header {
    flex-direction: column;
    gap: var(--space-2, 0.5rem);
  }
  
  .luupigo-badge-confirmaciones {
    align-self: flex-start;
  }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  .luupigo-modal-fallback-contenido,
  .luupigo-modal-avistamientos-contenido {
    background: var(--bg-secondary, #2c3e50);
    border-color: var(--border-color-dark, #34495e);
  }
  
  .luupigo-modal-fallback-header,
  .luupigo-modal-avistamientos-header {
    border-bottom-color: var(--border-color-dark, #34495e);
  }
  
  .luupigo-modal-fallback-header h2,
  .luupigo-modal-avistamientos-header h2 {
    color: var(--text-white, #ffffff);
  }
  
  .luupigo-avistamiento-detallado {
    background: var(--bg-tertiary, #34495e);
    border-color: var(--border-color-dark, #2c3e50);
  }
  
  .luupigo-avistamiento-ubicacion {
    color: var(--text-secondary, #bdc3c7);
  }
  
  .luupigo-avistamiento-comentario {
    background: var(--bg-secondary, #2c3e50);
    color: var(--text-white, #ffffff);
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .luupigo-modal-fallback,
  .luupigo-modal-avistamientos-fallback,
  .luupigo-modal-fallback-cerrar,
  .luupigo-modal-avistamientos-cerrar,
  .luupigo-btn-ver-mapa {
    animation: none !important;
    transition: none !important;
  }
}