/* ============================================
   IV CENTRAL — subscribe.css
   Suscripción · App Banner · Mobile mejoras
   ============================================ */

/* ── APP BANNER ──────────────────────────────────────────────── */
#app-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  background: linear-gradient(90deg, #0e0900 0%, #1c1200 50%, #0e0900 100%);
  border-bottom: 2px solid rgba(212,160,23,.5);
  box-shadow: 0 4px 32px rgba(0,0,0,.7), 0 0 0 1px rgba(212,160,23,.08);
}
#app-banner.visible { transform: translateY(0); }

/* Línea decorativa dorada en la parte superior */
#app-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4A017, #f6d365, #D4A017, transparent);
  animation: bannerGlow 3s ease infinite;
}
@keyframes bannerGlow {
  0%, 100% { opacity: .6; }
  50%       { opacity: 1; }
}

.app-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  max-width: 960px;
  margin: 0 auto;
}
.app-banner-logo {
  font-size: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(212,160,23,.5));
}
.app-banner-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.35;
  color: #aaa;
  min-width: 0;
}
.app-banner-text strong {
  color: #fff;
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.app-banner-badge {
  display: inline-block;
  background: rgba(212,160,23,.15);
  border: 1px solid rgba(212,160,23,.35);
  color: #D4A017;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  border-radius: 4px;
  padding: 2px 7px;
  margin-right: 6px;
  vertical-align: middle;
}
.app-banner-btn {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 12px rgba(212,160,23,.35);
}
.app-banner-btn:hover {
  background: #f6d365;
  box-shadow: 0 4px 18px rgba(212,160,23,.55);
  transform: translateY(-1px);
}
.app-banner-btn:active { transform: scale(.97); }
.app-banner-btn:disabled {
  opacity: .5;
  cursor: default;
  transform: none;
}
.app-banner-close {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: #555;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.app-banner-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── SUBSCRIBE MODAL ────────────────────────────────────────── */
#sub-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
#sub-modal.open { opacity: 1; pointer-events: all; }

.sub-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
}

.sub-box {
  will-change: transform;
  position: relative;
  background: var(--bg2);
  border: 1px solid rgba(212,160,23,.25);
  border-radius: 20px;
  padding: 32px 28px 28px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  transform: scale(.95) translateY(16px);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  gap: 0;
}
#sub-modal.open .sub-box {
  will-change: transform; transform: scale(1) translateY(0); }

.sub-box::-webkit-scrollbar { width: 4px; }
.sub-box::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.sub-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .15s;
}
.sub-close:hover { color: var(--gold); }

.sub-logo-wrap { margin-bottom: 6px; }

.sub-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}

.sub-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.sub-sub strong { color: var(--gold); }

/* Tags / checkboxes de intereses */
.sub-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.sub-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.sub-tag:has(input:checked) {
  border-color: var(--gold);
  background: rgba(212,160,23,.08);
  color: var(--gold);
}
.sub-tag input { display: none; }

/* Inputs */
.sub-field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

/* Push row */
.sub-push-row {
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sub-push-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
}
.sub-push-label input { accent-color: var(--gold); }

.sub-legal {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.sub-error {
  font-size: 11px;
  color: #ef4444;
  margin-top: 8px;
  min-height: 16px;
}

/* Success view */
#sub-success-view {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 16px 0;
}
.sub-success-icon { font-size: 48px; color: var(--gold); }
.sub-success-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  color: #fff;
}
.sub-success-text {
  font-size: 13px;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.6;
}

/* Welcome coupon */
.sub-coupon-box {
  background: linear-gradient(135deg, rgba(212,160,23,.12), rgba(212,160,23,.06));
  border: 1px dashed rgba(212,160,23,.5);
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  width: 100%;
}
.sub-coupon-label {
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.sub-coupon-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--gold);
  letter-spacing: .12em;
}
.sub-coupon-desc {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

/* ── MOBILE FIXES ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Cuando el banner está visible, empujar el contenido */
  body.has-banner .shell { padding-top: 56px; }

/* Desktop también necesita compensar el banner */
@media (min-width: 769px) {
  body.has-banner .shell { padding-top: 52px; }
}

  /* Touch targets más grandes */
  .nav-btn { min-height: 44px; }
  .btn-gold, .btn-outline { min-height: 44px; }
  .form-input, .form-select, .form-textarea { font-size: 16px; /* evita zoom en iOS */ }

  /* Sidebar móvil mejorado */
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 200;
    transition: left .25s ease;
    box-shadow: 4px 0 32px rgba(0,0,0,.6);
  }
  .sidebar.open { left: 0; }

  /* Hamburger visible */
  .hamburger { display: flex !important; }

  /* Main full width */
  .main { margin-left: 0 !important; }

  /* Hero adjustments */
  .hero-h1 { font-size: clamp(40px, 12vw, 72px); }
  .hero-btns { flex-direction: column; }

  /* Studio tabs scroll horizontal */
  .studio-nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .studio-nav-tabs::-webkit-scrollbar { display: none; }

  /* Sub modal full-screen on mobile */
  .sub-box {
  will-change: transform;
    width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px 24px;
  }
  #sub-modal {
    align-items: flex-end;
  }

  /* Filter bar scroll */
  .filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .filter-bar::-webkit-scrollbar { display: none; }

  /* Actions grid single column */
  .actions-grid { grid-template-columns: 1fr 1fr !important; }

  /* Booking card stack */
  .booking-card { flex-direction: column !important; }
  .booking-summary { width: 100% !important; }

  /* Stats row compact */
  .stats-row { gap: 8px; padding: 14px 12px; }
  .stat-num { font-size: 28px !important; }
}

@media (max-width: 400px) {
  .actions-grid { grid-template-columns: 1fr !important; }
  .hero-h1 { font-size: 36px; }
}

/* ── SAFE AREA (iOS notch) ───────────────────────────────────── */
@supports (padding: max(0px)) {
  .sidebar {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  #app-banner { padding-top: env(safe-area-inset-top); }
  .hamburger { top: max(12px, calc(env(safe-area-inset-top) + 8px)); }
}

/* ── SUSCRIPCIÓN FLOATING BTN ───────────────────────────────── */
#sub-float-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 480;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 10px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(212,160,23,.35);
  transition: transform .15s, box-shadow .15s, opacity .3s;
  animation: subBtnPulse 3s ease infinite;
  max-width: 160px;
  white-space: nowrap;
  /* Semitransparente para no tapar texto importante */
  opacity: 0.92;
}
#sub-float-btn:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(212,160,23,.5); opacity: 1; }

/* On mobile, more space from bottom to avoid nav bar overlap */
@media (max-width: 768px) {
  #sub-float-btn {
    bottom: 72px;
    right: 14px;
    padding: 9px 14px;
    font-size: 10px;
  }
}

@keyframes subBtnPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(212,160,23,.35); }
  50% { box-shadow: 0 4px 32px rgba(212,160,23,.6); }
}
