/* =========================================================
   MODALES Y COMPONENTES DINÁMICOS
   ========================================================= */

/* ====================== MODAL DE CAMPAÑA ====================== */
.campaign-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalIn .4s cubic-bezier(.22, 1, .36, 1);
}
.campaign-modal.closing { animation: modalOut .3s ease forwards; }

.campaign-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 24, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.campaign-modal-content {
  position: relative;
  background: white;
  border-radius: 28px;
  padding: 50px 40px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  max-height: 90vh;
  overflow-y: auto;
}

.campaign-modal-close {
  position: absolute;
  top: 18px; right: 22px;
  background: none;
  border: none;
  font-size: 34px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color .3s, transform .3s;
}
.campaign-modal-close:hover { color: #1a1f2c; transform: rotate(90deg); }

.campaign-success-icon {
  width: 88px; height: 88px;
  background: linear-gradient(135deg, #159bb7, #0d6e80);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  margin-bottom: 24px;
  animation: bounceIn .6s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 10px 40px rgba(21,155,183,.35);
}

.campaign-modal-content h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.4rem;
  margin: 0 0 12px;
  color: #1a1f2c;
}

.campaign-modal-lead {
  color: #7a7f8c;
  font-size: 1rem;
  margin-bottom: 28px;
}
.campaign-modal-lead strong { color: #159bb7; }

.campaign-ticket {
  background: linear-gradient(135deg, #f7f3ec, #ebe4d6);
  border: 2px dashed #c9a86a;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
}
.ticket-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7a7f8c;
  margin-bottom: 8px;
  font-weight: 600;
}
.ticket-code {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  color: #1a1f2c;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.copy-ticket {
  background: white;
  border: 1px solid #c9a86a;
  color: #1a1f2c;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: all .3s;
}
.copy-ticket:hover {
  background: #c9a86a;
  color: white;
}

.campaign-share {
  background: #f7f3ec;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.campaign-share p {
  font-size: 14px;
  color: #3a3f4c;
  margin: 0 0 16px;
}
.campaign-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 50px;
  color: white !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .3s;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.share-btn.fb { background: #1877f2; }
.share-btn.tk { background: #000; }
.share-btn.wa { background: #25d366; }

.campaign-modal-footer {
  font-size: 13px;
  color: #7a7f8c;
  margin: 0;
}
.campaign-modal-footer i { color: #159bb7; }

/* ====================== MODAL DE REEL/VIDEO ====================== */
.reel-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalIn .3s ease;
}
.reel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.92);
}
.reel-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: black;
}
.reel-modal-content video,
.reel-modal-content iframe {
  width: 100%; height: 100%;
  border: none;
}
.reel-modal-close {
  position: absolute;
  top: -50px; right: 0;
  background: rgba(255,255,255,.1);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}
.reel-modal-close:hover { background: rgba(255,255,255,.2); }

/* ====================== ANIMACIONES ====================== */
@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 560px) {
  .campaign-modal-content { padding: 36px 24px; }
  .campaign-modal-content h2 { font-size: 1.8rem; }
  .ticket-code { font-size: 1.5rem; }
  .share-btn { font-size: 12px; padding: 8px 12px; }
}
