/* ═══════════════════════════════════════════════════════════════════════
   OFFLINE ON-CAMPUS MOBILE STICKY CTA & COMPACT CLEAN MODAL
   - Mobile Only (Strictly hidden on PC/Desktop)
   - Scroll-triggered (appears after scrolling past hero > 220px)
   - Website Gold Gradient button
   - Clean "1 Days Free Demo Class Book Now" with no background on Book Now
   - Book Now text in clean lighter contrast color
   - Compact & clean popup form
   ═══════════════════════════════════════════════════════════════════════ */

/* Keyframe bounce animation matching master-class/live.html */
@keyframes cta-bounce {
  0%, 15% { transform: translateY(0); }
  35% { transform: translateY(-11px); }
  45% { transform: translateY(0); }
  55% { transform: translateY(-6px); }
  70% { transform: translateY(0); }
  80% { transform: translateY(-3px); }
  90%, 100% { transform: translateY(0); }
}

/* ═══ DESKTOP / PC MODE: STRICTLY HIDDEN ═══ */
@media (min-width: 769px) {
  .offline-sticky-bar {
    display: none !important;
  }
  body.has-offline-sticky {
    padding-bottom: 0 !important;
  }
}

/* ═══ MOBILE MODE (< 769px) ═══ */
@media (max-width: 768px) {
  /* Prevent sticky bar from covering footer content */
  body.has-offline-sticky {
    padding-bottom: 76px !important;
  }

  /* Keep existing floating WhatsApp/Call buttons neatly above the bar */
  body.has-offline-sticky .qa-float-stack,
  body.has-offline-sticky .fixed.bottom-5.right-5,
  body.has-offline-sticky [class*="qa-float"] {
    bottom: 84px !important;
    transition: bottom 0.25s ease;
    z-index: 1040 !important;
  }

  /* Sticky Bottom Floating Container - Transparent (No Black Bar Behind Button) */
  .offline-sticky-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: translateY(115%); /* Hidden initially, shown on scroll */
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none; /* Touches pass through empty areas */
  }

  /* When scrolled down past hero: slide up smoothly */
  .offline-sticky-bar.show {
    transform: translateY(0);
  }

  .offline-sticky-bar-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  /* Website Matching Signature Luxury Gold CTA Button */
  .offline-btn-gold {
    pointer-events: auto; /* Ensure button clicks work */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 11px 16px 10px;
    background: linear-gradient(135deg, #f5c879 0%, #d8a153 50%, #bd863a 100%);
    color: #15120e;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(216, 161, 83, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    text-decoration: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    transition: transform 0.15s ease, filter 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  .offline-btn-gold:active {
    transform: scale(0.98);
    filter: brightness(0.95);
  }

  .offline-btn-gold.cta-bounce {
    animation: cta-bounce 1.6s ease-in infinite;
  }

  /* Main text row: Clean Dark Ink for crisp, crystal-clear readability on Gold */
  .offline-btn-main {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #15120e; /* Solid Dark Ink */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    white-space: nowrap;
  }

  /* Book Now Text - Clean, bold, natural match */
  .offline-book-text {
    color: #15120e;
    font-weight: 900;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  /* Sub text of button */
  .offline-btn-sub {
    font-size: 11.5px;
    font-weight: 700;
    color: #2b1a03; /* Deep readable contrast */
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .offline-btn-sub strong {
    background: rgba(185, 28, 28, 0.15);
    color: #991b1b;
    border: 1px solid rgba(185, 28, 28, 0.3);
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 800;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   COMPACT & ULTRA-CLEAN POPUP MODAL (Chota & Clean)
   ═══════════════════════════════════════════════════════════════════════ */
.offline-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

/* Chota & Compact Card */
.offline-modal-card {
  position: relative;
  width: 100%;
  max-width: 370px; /* Chota & Compact */
  max-height: 88vh;
  overflow-y: auto;
  background: #191612;
  border: 1.5px solid rgba(228, 179, 95, 0.45);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(228, 179, 95, 0.12);
  padding: 18px 18px 16px; /* Clean & Compact padding */
  font-family: 'Outfit', sans-serif;
  color: #e2e8f0;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.offline-modal-overlay.active .offline-modal-card {
  transform: scale(1) translateY(0);
}

/* Close 'X' Button */
.offline-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
}

.offline-modal-close:hover {
  color: #ef4444;
}

/* Clean Header */
.offline-modal-header {
  text-align: center;
  margin-bottom: 12px;
  padding-right: 16px;
}

.offline-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: rgba(228, 179, 95, 0.15);
  border: 1px solid rgba(228, 179, 95, 0.4);
  color: #f5c879;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.offline-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.offline-modal-title em {
  font-style: normal;
  color: #f5c879;
}

/* Compact Offer Tag Strip */
.offline-modal-offer-tag {
  margin: 8px 0 12px 0;
  background: rgba(228, 179, 95, 0.08);
  border: 1px dashed rgba(228, 179, 95, 0.35);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 11px;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.35;
}

.offline-modal-offer-tag strong {
  color: #f5c879;
}

/* Form Groups */
.offline-form-group {
  margin-bottom: 10px;
}

.offline-form-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offline-input,
.offline-select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  background: #25221e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.offline-input:focus,
.offline-select:focus {
  border-color: #f5c879;
  box-shadow: 0 0 0 2px rgba(228, 179, 95, 0.2);
}

.offline-phone-group {
  display: flex;
  align-items: center;
  background: #25221e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.offline-phone-group:focus-within {
  border-color: #f5c879;
  box-shadow: 0 0 0 2px rgba(228, 179, 95, 0.2);
}

.offline-phone-prefix {
  flex: none;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #94a3b8;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  user-select: none;
}

.offline-phone-group .offline-input {
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Submit Button in Modal */
.offline-modal-submit-btn {
  width: 100%;
  margin-top: 6px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f5c879 0%, #d8a153 50%, #bd863a 100%);
  color: #15120e;
  font-size: 15px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(216, 161, 83, 0.4);
  transition: filter 0.2s ease, transform 0.15s ease;
}

.offline-modal-submit-btn:hover {
  filter: brightness(1.05);
}

.offline-modal-submit-btn:active {
  transform: scale(0.98);
}

.offline-modal-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.offline-trust-note {
  margin: 7px 0 0 0;
  text-align: center;
  font-size: 10.5px;
  color: #64748b;
}

/* Compact Success View */
.offline-success-view {
  text-align: center;
  padding: 6px 2px;
}

.offline-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 10px;
}

.offline-success-title {
  font-size: 17px;
  font-weight: 800;
  color: #22c55e;
  margin: 0 0 4px 0;
}

.offline-success-msg {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0 0 12px 0;
}

.offline-wa-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 7px;
  background: #25d366;
  color: #ffffff;
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

/* Desktop / tablet: larger, roomier booking popup (mobile stays compact) */
@media (min-width: 769px) {
  .offline-modal-card {
    max-width: 460px;
    max-height: 92vh;
    padding: 30px 32px 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, #1f1c18 0%, #171410 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(228, 179, 95, 0.08), 0 0 44px rgba(228, 179, 95, 0.14);
  }
  .offline-modal-close { top: 12px; right: 12px; font-size: 26px; }
  .offline-modal-header { margin-bottom: 14px; padding-right: 0; }
  .offline-modal-badge { font-size: 11px; padding: 4px 12px; margin-bottom: 10px; }
  .offline-modal-title { font-size: 25px; letter-spacing: -0.01em; }
  .offline-modal-offer-tag { margin: 10px 0 18px; padding: 9px 12px; font-size: 13px; border-radius: 9px; }
  .offline-form-group { margin-bottom: 14px; }
  .offline-form-label { font-size: 11.5px; margin-bottom: 6px; }
  .offline-input, .offline-select { padding: 12px 14px; font-size: 15px; border-radius: 9px; }
  .offline-phone-group { border-radius: 9px; }
  .offline-phone-prefix { padding: 0 14px; font-size: 14px; gap: 6px; }
  .offline-modal-submit-btn { margin-top: 8px; padding: 14px 18px; font-size: 16.5px; border-radius: 10px; }
  .offline-trust-note { font-size: 12.5px; margin-top: 12px; }
}

/* Link mode (blog posts): the bar is an <a> to the landing page */
a.offline-btn-gold,
a.offline-btn-gold:hover,
a.offline-btn-gold:visited {
  color: #15120e !important;
  text-decoration: none !important;
}
