/* ==========================================================================
   MODAL DE ADVERTENCIA & AVISOS TÁCTICOS // CEUTA NO SE APAGA
   Estética cinematográfica, atmósfera oscura, acentos carmesí y ámbar táctico
   ========================================================================== */

.ceuta-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 4, 4, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ceuta-alert-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Contenedor de la Ventana */
.ceuta-alert-box {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: linear-gradient(180deg, #131313 0%, #090909 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(245, 158, 11, 0.15);
  transform: scale(0.92) translateY(14px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
  overflow: hidden;
  color: #F5F5F5;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.ceuta-alert-overlay.is-visible .ceuta-alert-box {
  transform: scale(1) translateY(0);
}

/* Modificadores por Tipo de Alerta */
.ceuta-alert-box.type-danger,
.ceuta-alert-box.type-crimson {
  border-color: rgba(158, 27, 27, 0.55);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(158, 27, 27, 0.28);
}

.ceuta-alert-box.type-info {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(59, 130, 246, 0.18);
}

.ceuta-alert-box.type-success {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(16, 185, 129, 0.2);
}

/* Línea superior luminescente (Cyber Top Bar) */
.ceuta-alert-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #F59E0B 50%, transparent 100%);
  opacity: 0.9;
}

.type-danger .ceuta-alert-laser,
.type-crimson .ceuta-alert-laser {
  background: linear-gradient(90deg, transparent 0%, #9E1B1B 20%, #E53935 50%, #9E1B1B 80%, transparent 100%);
}

.type-info .ceuta-alert-laser {
  background: linear-gradient(90deg, transparent 0%, #3B82F6 50%, transparent 100%);
}

.type-success .ceuta-alert-laser {
  background: linear-gradient(90deg, transparent 0%, #10B981 50%, transparent 100%);
}

/* Cabecera Táctica */
.ceuta-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ceuta-alert-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #F59E0B;
  text-transform: uppercase;
}

.type-danger .ceuta-alert-tag,
.type-crimson .ceuta-alert-tag {
  color: #FF5A5A;
}

.type-info .ceuta-alert-tag {
  color: #60A5FA;
}

.type-success .ceuta-alert-tag {
  color: #34D399;
}

.ceuta-alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #F59E0B;
  box-shadow: 0 0 10px #F59E0B;
  animation: ceutaAlertPulse 2s infinite ease-in-out;
}

.type-danger .ceuta-alert-dot,
.type-crimson .ceuta-alert-dot {
  background-color: #EF4444;
  box-shadow: 0 0 10px #EF4444;
}

.type-info .ceuta-alert-dot {
  background-color: #3B82F6;
  box-shadow: 0 0 10px #3B82F6;
}

.type-success .ceuta-alert-dot {
  background-color: #10B981;
  box-shadow: 0 0 10px #10B981;
}

@keyframes ceutaAlertPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

.ceuta-alert-btn-close {
  background: transparent;
  border: none;
  color: #777;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.ceuta-alert-btn-close:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Cuerpo Principal */
.ceuta-alert-body {
  padding: 24px 22px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Icono Central con Halo */
.ceuta-alert-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16) 0%, rgba(20, 20, 20, 0.6) 70%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #F59E0B;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.type-danger .ceuta-alert-icon-wrap,
.type-crimson .ceuta-alert-icon-wrap {
  background: radial-gradient(circle, rgba(158, 27, 27, 0.25) 0%, rgba(20, 20, 20, 0.6) 70%);
  border-color: rgba(158, 27, 27, 0.5);
  color: #FF5555;
  box-shadow: 0 0 25px rgba(158, 27, 27, 0.3);
}

.type-info .ceuta-alert-icon-wrap {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(20, 20, 20, 0.6) 70%);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60A5FA;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
}

.type-success .ceuta-alert-icon-wrap {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(20, 20, 20, 0.6) 70%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34D399;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.ceuta-alert-icon-wrap svg {
  width: 30px;
  height: 30px;
}

/* Título */
.ceuta-alert-title {
  font-family: var(--font-display, 'Bebas Neue', 'Syne', sans-serif);
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* Mensaje Principal */
.ceuta-alert-message {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #C5C5C5;
  max-width: 440px;
  margin-bottom: 14px;
  word-break: break-word;
}

.ceuta-alert-message p {
  margin-bottom: 8px;
}

.ceuta-alert-message p:last-child {
  margin-bottom: 0;
}

/* Caja de Detalle Adicional Táctico (Opcional) */
.ceuta-alert-detail {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #F59E0B;
  border-radius: 4px;
  text-align: left;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  color: #9E9E9E;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}

.type-danger .ceuta-alert-detail,
.type-crimson .ceuta-alert-detail {
  border-left-color: #9E1B1B;
}

.type-info .ceuta-alert-detail {
  border-left-color: #3B82F6;
}

.type-success .ceuta-alert-detail {
  border-left-color: #10B981;
}

/* Barra de Botones de Acción */
.ceuta-alert-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 14px 20px 20px 20px;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-end;
}

/* Botón Base */
.ceuta-alert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  min-height: 42px;
}

/* Botón Cancelar / Descartar */
.ceuta-alert-btn-cancel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #B3B3B3;
}

.ceuta-alert-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

/* Botón Confirmar / Aceptar (Advertencia por defecto: Ámbar) */
.ceuta-alert-btn-confirm {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  border: 1px solid #F59E0B;
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  flex-grow: 1;
}

.ceuta-alert-btn-confirm:hover {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

/* Botón Peligro / Destructivo (Carmesí Ceuta) */
.type-danger .ceuta-alert-btn-confirm,
.type-crimson .ceuta-alert-btn-confirm {
  background: linear-gradient(135deg, #9E1B1B 0%, #7A1212 100%);
  border: 1px solid #C02626;
  color: #FFFFFF;
  box-shadow: 0 0 22px rgba(158, 27, 27, 0.45);
}

.type-danger .ceuta-alert-btn-confirm:hover,
.type-crimson .ceuta-alert-btn-confirm:hover {
  background: linear-gradient(135deg, #B82323 0%, #9E1B1B 100%);
  box-shadow: 0 0 30px rgba(158, 27, 27, 0.65);
  transform: translateY(-1px);
}

/* Botón Info (Azul Neón) */
.type-info .ceuta-alert-btn-confirm {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1px solid #3B82F6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.35);
}

.type-info .ceuta-alert-btn-confirm:hover {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.55);
}

/* Botón Success (Verde Esmeralda) */
.type-success .ceuta-alert-btn-confirm {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid #10B981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.type-success .ceuta-alert-btn-confirm:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.55);
}

/* Adaptación Mobile */
@media (max-width: 480px) {
  .ceuta-alert-box {
    margin: 10px;
  }
  .ceuta-alert-actions {
    flex-direction: column-reverse;
  }
  .ceuta-alert-btn {
    width: 100%;
  }
}
