/* ═══════════════════════════════════════════════════
   modal_publicidad.css — PRYSE CYBERSECURITY
   Diseño: dark glass SaaS 2026
   ═══════════════════════════════════════════════════ */

/* ── Variables locales ─────────────────────────────── */
:root {
  --ad-bg-overlay:    rgba(4, 6, 12, 0.82);
  --ad-surface:       #0d1117;
  --ad-border:        rgba(0, 184, 212, 0.18);
  --ad-border-glow:   rgba(85, 193, 255, 0.272);
  --ad-accent:        #f33e6b;
  --ad-accent-dim:    rgba(245, 92, 212, 0.557);
  --ad-text-muted:    rgba(180, 195, 210, 0.65);
  --ad-text-badge:    #17c7de;
  --ad-dot:           #fd2b97fd;
  --ad-close-hover:   rgba(0, 212, 170, 0.12);
  --ad-radius:        16px;
  --ad-radius-sm:     10px;
  --ad-duration:      420ms;
  --ad-ease:          cubic-bezier(0.22, 0.68, 0.30, 1.05);
}

/* ── Overlay ────────────────────────────────────────── */
.ad-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--ad-duration) ease,
    visibility var(--ad-duration) ease;
}

.ad-modal-overlay.ad-visible {
  opacity: 1;
  visibility: visible;
}

/* ── Contenedor modal ───────────────────────────────── */
.ad-modal-container {
  position: relative;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  box-shadow:
    0 0 0 1px var(--ad-border),
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(0, 212, 170, 0.06);
  overflow: hidden;
  max-width: 1260px;
  width: 100%;
  transform: translateY(22px) scale(0.97);
  transition:
    transform var(--ad-duration) var(--ad-ease),
    box-shadow var(--ad-duration) ease;

  /* Línea superior accent */
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--ad-accent) 30%,
      var(--ad-border-glow) 70%,
      transparent 100%
    );
    z-index: 2;
  }
}

.ad-modal-overlay.ad-visible .ad-modal-container {
  transform: translateY(0) scale(1);
  box-shadow:
    0 0 0 1px var(--ad-border-glow),
    0 40px 100px rgba(0, 0, 0, 0.70),
    0 0 80px rgba(0, 212, 170, 0.08);
}

/* ── Botón cerrar ───────────────────────────────────── */
.ad-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ad-border);
  background: rgba(13, 17, 23, 0.80);
  color: var(--ad-text-muted);
  cursor: pointer;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    transform 150ms ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ad-modal-close:hover {
  background: var(--ad-close-hover);
  border-color: var(--ad-border-glow);
  color: var(--ad-accent);
  transform: rotate(90deg) scale(1.08);
}

.ad-modal-close:focus-visible {
  outline: 2px solid var(--ad-accent);
  outline-offset: 2px;
}

/* ── Imagen ─────────────────────────────────────────── */
.ad-img-wrap {
  display: block;
  line-height: 0;
}

.ad-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Mostrar/ocultar según dispositivo */
.ad-mobile  { display: none; }
.ad-desktop { display: block; }

@media (max-width: 600px) {
  .ad-desktop { display: none; }
  .ad-mobile  { display: block; }

  .ad-modal-container {
    max-width: 380px;
    border-radius: var(--ad-radius-sm);
  }
}

/* ── Footer / barra inferior ────────────────────────── */
.ad-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--ad-border);
  gap: 12px;
}

/* Badge "Oferta limitada" */
.ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ad-text-badge);
  font-family: 'Montserrat', sans-serif;
}

.ad-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ad-dot);
  animation: adDotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes adDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

/* Botón "No mostrar de nuevo" */
.ad-dismiss {
  background: none;
  border: none;
  color: var(--ad-text-muted);
  font-size: 11px;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.02em;
  transition: color 180ms ease;
  white-space: nowrap;
}

.ad-dismiss:hover {
  color: var(--ad-accent);
}

.ad-dismiss:focus-visible {
  outline: 2px solid var(--ad-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Salida / cierre ────────────────────────────────── */
.ad-modal-overlay.ad-hiding {
  opacity: 0;
}

.ad-modal-overlay.ad-hiding .ad-modal-container {
  transform: translateY(14px) scale(0.97);
}
