/* ═══════════════════════════════════════════════════════════════
   SISTEMA ANTIPLAGIO - MODAL PERSONALIZADO
   Estilo matching dashboard Design Reyes
   ═══════════════════════════════════════════════════════════════ */

/* Overlay del modal */
.protection-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  animation: none;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-out;
}

.protection-alert-modal.show {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Contenedor del modal */
.protection-modal-content {
  background: linear-gradient(
    135deg,
    rgba(15, 5, 30, 0.95) 0%,
    rgba(25, 10, 45, 0.93) 50%,
    rgba(15, 5, 30, 0.95) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(124, 58, 237, 0.35),
    0 0 0 1px rgba(168, 85, 247, 0.15) inset;
  animation: protectionSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1);
  opacity: 1;
}

@keyframes protectionSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header del modal */
.protection-modal-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.protection-modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.5rem;
  line-height: 1;
  animation: protectionIconFloat 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes protectionIconFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Ícono error - rojo */
.protection-modal-icon.error {
  background: radial-gradient(circle at 30% 30%, rgba(255, 59, 59, 0.2) 0%, transparent 60%);
  border: 2px solid rgba(255, 59, 59, 0.4);
  color: #ff3b3b;
  box-shadow:
    0 0 40px rgba(255, 59, 59, 0.3),
    inset 0 0 20px rgba(255, 59, 59, 0.1);
}

/* Ícono warning - amarillo */
.protection-modal-icon.warning {
  background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.2) 0%, transparent 60%);
  border: 2px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  box-shadow:
    0 0 40px rgba(251, 191, 36, 0.3),
    inset 0 0 20px rgba(251, 191, 36, 0.1);
}

/* Título */
.protection-modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Body del modal */
.protection-modal-body {
  padding: 2rem;
  overflow-y: auto;
}

.protection-modal-message {
  color: #d9d6f0;
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* Footer del modal */
.protection-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/* Botón del modal */
.protection-modal-button {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #7c3aed 100%);
  background-size: 200% 200%;
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  padding: 1rem 3rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow:
    0 8px 25px rgba(124, 58, 237, 0.5),
    0 0 40px rgba(124, 58, 237, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.4);
  will-change: transform, box-shadow;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.protection-modal-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 12px 40px rgba(124, 58, 237, 0.7),
    0 0 60px rgba(124, 58, 237, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.5);
  border-color: rgba(168, 85, 247, 0.8);
  background-position: 100% 100%;
}

.protection-modal-button:active {
  transform: translateY(-2px) scale(1.02);
}

.protection-modal-button:focus {
  outline: none;
}

/* Botón secundario */
.protection-modal-button.secondary {
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.protection-modal-button.secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

/* Responsivo */
@media (max-width: 640px) {
  .protection-alert-modal {
    padding: 1rem;
  }

  .protection-modal-content {
    max-width: 100%;
    width: calc(100% - 2rem);
  }

  .protection-modal-header,
  .protection-modal-body,
  .protection-modal-footer {
    padding: 1.5rem;
  }

  .protection-modal-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .protection-modal-title {
    font-size: 1.4rem;
  }

  .protection-modal-message {
    font-size: 0.95rem;
  }

  .protection-modal-button {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }
}
