/* ==========================================================================
   GLOWMX SPOOKTACULAR HALLOWEEN CAMPAIGN STYLESHEET
   Activation: Oct 21 – Nov 1, 2026 (or ?preview_halloween=true)
   Zero disruption to medical-grade clinic branding.
   ========================================================================== */

/* ---------- 1. Layer Stacking & Pointer Events Priority ---------- */
#halloween-floating-doodles,
#halloween-floating-doodles *,
.halloween-doodle-svg,
.halloween-card-web {
  pointer-events: none !important;
  user-select: none !important;
}

#halloween-floating-doodles {
  position: fixed;
  inset: 0;
  z-index: 1 !important;
  overflow: hidden;
  pointer-events: none !important;
}

/* Ensure Header, Sticky Nav, Dock, and all interactive elements are 100% clickable */
header,
header *,
nav,
nav *,
.nav-links,
.nav-links *,
button,
button *,
a,
a *,
input,
select,
textarea,
#halloween-announcement-bar,
#halloween-announcement-bar *,
#glowmx-social-dock,
#glowmx-social-dock * {
  pointer-events: auto !important;
}

/* Header offset under announcement bar */
:root {
  --halloween-ribbon-height: 40px;
}

body.halloween-theme header,
body.halloween-theme header.sticky {
  top: var(--halloween-ribbon-height, 40px) !important;
  transition: top 0.25s ease;
}

/* Guarantee pristine visibility & contrast of all clinic content */
body.halloween-theme main,
body.halloween-theme section,
body.halloween-theme .group,
body.halloween-theme h1,
body.halloween-theme h2,
body.halloween-theme h3,
body.halloween-theme h4,
body.halloween-theme p,
body.halloween-theme span:not(.dock-tooltip),
body.halloween-theme div:not(#halloween-floating-doodles):not(#glowmx-social-dock):not(.dock-tooltip) {
  opacity: 1 !important;
}

/* Clinic Staff & Treatment Visuals - Strictly NO distorting filters */
body.halloween-theme img {
  filter: none !important;
}

/* ---------- 2. Sticky Top Announcement Bar with Live Countdown ---------- */
#halloween-announcement-bar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 40px;
  background: #111116;
  color: #ffffff;
  border-bottom: 1px solid #FF7518;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  z-index: 10000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  font-family: inherit;
  box-sizing: border-box;
}

.halloween-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
}

.halloween-bar-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #fff6ee;
}

.halloween-bar-text strong {
  color: #ff8a3d;
  font-weight: 700;
}

.halloween-bar-sep {
  opacity: 0.4;
  color: #ff7518;
  font-weight: 300;
}

.halloween-countdown-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffe6d4;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.halloween-countdown-clock {
  display: inline-block;
  background: rgba(255, 117, 24, 0.16);
  border: 1px solid rgba(255, 117, 24, 0.4);
  color: #ff9e58;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 0 8px rgba(255, 117, 24, 0.25);
}

.halloween-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #FF7518 0%, #D35400 100%);
  color: #FFFFFF !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(255, 117, 24, 0.4);
  transition: all 0.25s ease;
  text-decoration: none;
}

.halloween-bar-cta:hover {
  background: linear-gradient(135deg, #FF8A3D 0%, #E65100 100%);
  box-shadow: 0 0 14px rgba(255, 117, 24, 0.7);
  transform: translateY(-1px);
}

/* Smooth Scroll & Clearance for Treatments / Services Booking Section */
html {
  scroll-behavior: smooth;
}

#featured-services,
#book-services {
  scroll-margin-top: 100px !important;
}

/* ---------- 4. Full-Screen Floating Doodles (Hardware Accelerated) ---------- */
.floating-doodle-layer {
  position: absolute;
  will-change: transform;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* 14s – 22s Multi-Directional Floating Animations */
@keyframes doodleFloatA {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(24px, -28px, 0) rotate(3deg); }
  50% { transform: translate3d(40px, 16px, 0) rotate(-2deg); }
  75% { transform: translate3d(16px, 36px, 0) rotate(2deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes doodleFloatB {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(-20px, 26px, 0) rotate(-3deg); }
  50% { transform: translate3d(-36px, -18px, 0) rotate(2deg); }
  75% { transform: translate3d(-14px, -32px, 0) rotate(-1deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes doodleFloatC {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(18px, -22px, 0) scale(1.05); }
  66% { transform: translate3d(-18px, 18px, 0) scale(0.98); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.95; transform: scale(1.15) rotate(180deg); }
}

.anim-drift-a { animation: doodleFloatA 18s ease-in-out infinite; }
.anim-drift-b { animation: doodleFloatB 21s ease-in-out infinite; }
.anim-drift-c { animation: doodleFloatC 16s ease-in-out infinite; }
.anim-twinkle { animation: starTwinkle 3.2s ease-in-out infinite; }

/* ---------- 5. Promotional "37% OFF" Badges ---------- */
/* Hero Heading Promotional Badge */
.halloween-hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  width: auto !important;
}

.halloween-hero-badge-inner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #111116 !important;
  border: 1px solid #FF7518 !important;
  color: #fff6ee !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  box-shadow: 0 0 16px rgba(255, 117, 24, 0.4), 0 4px 12px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(8px) !important;
}

/* Service Cards Mini Badge */
.halloween-card-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 20 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #111116 !important;
  border: 1px solid #FF7518 !important;
  color: #ffffff !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 117, 24, 0.35) !important;
  pointer-events: none !important;
  user-select: none !important;
  backdrop-filter: blur(4px) !important;
}

body.halloween-theme .halloween-promo-badge,
body.halloween-theme span:has(> del) ~ span:last-child,
body.halloween-theme .halloween-discount-badge {
  background: #FFF5EB !important;
  border: 1.5px solid #FF7518 !important;
  color: #D35400 !important;
  box-shadow: 0 0 10px rgba(255, 117, 24, 0.28) !important;
  font-weight: 700 !important;
  font-size: 10px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: 9999px !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.25s ease !important;
}

body.halloween-theme .group:hover .halloween-promo-badge,
body.halloween-theme .group:hover span:has(> del) ~ span:last-child {
  box-shadow: 0 0 14px rgba(255, 117, 24, 0.45) !important;
  border-color: #FF8A3D !important;
}

/* Service Card Corner Web via CSS SVG */
body.halloween-theme .group.justify-between::before,
body.halloween-theme .border-\[\#e5d8c9\]\/80::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23FF7518' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M0 0 L100 0' stroke-width='3'/%3E%3Cpath d='M0 0 L0 100' stroke-width='3'/%3E%3Cpath d='M0 0 L92 38'/%3E%3Cpath d='M0 0 L72 72'/%3E%3Cpath d='M0 0 L38 92'/%3E%3Cpath d='M26 0 Q20 14 0 26'/%3E%3Cpath d='M52 0 Q40 28 0 52'/%3E%3Cpath d='M78 0 Q62 42 0 78'/%3E%3Cpath d='M96 0 Q78 54 0 96'/%3E%3Cpath d='M70 42 L70 68' stroke-dasharray='2,3'/%3E%3Ccircle cx='70' cy='71' r='3.5' fill='%23FF7518'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.45;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.halloween-theme .group.justify-between:hover::before,
body.halloween-theme .border-\[\#e5d8c9\]\/80:hover::before {
  opacity: 0.85 !important;
  transform: scale(1.06);
}

/* Card Glow on Hover */
body.halloween-theme .group.justify-between:hover,
body.halloween-theme .border-\[\#e5d8c9\]\/80:hover {
  border-color: #FF7518 !important;
  box-shadow: 0 12px 28px -4px rgba(255, 117, 24, 0.22), 0 0 16px rgba(255, 117, 24, 0.15) !important;
  transform: translateY(-3px) !important;
}

/* Pricing Row Contrast */
body.halloween-theme del {
  color: #888888 !important;
  text-decoration: line-through !important;
  font-weight: 400 !important;
}

body.halloween-theme del + span,
body.halloween-theme span.font-bold.text-\[\#211f1f\] {
  color: #211f1f !important;
  font-weight: 700 !important;
}

/* Primary Festive CTA Button Styling */
body.halloween-theme a.bg-\[\#211f1f\],
body.halloween-theme a.bg-\[\#171616\],
body.halloween-theme a.bg-\[\#b99132\],
body.halloween-theme button.bg-\[\#211f1f\],
body.halloween-theme a.halloween-primary-btn {
  background: linear-gradient(135deg, #FF7518 0%, #D35400 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 14px rgba(255, 117, 24, 0.32) !important;
  transition: all 0.25s ease !important;
}

body.halloween-theme a.bg-\[\#211f1f\]:hover,
body.halloween-theme a.bg-\[\#171616\]:hover,
body.halloween-theme a.bg-\[\#b99132\]:hover,
body.halloween-theme button.bg-\[\#211f1f\]:hover,
body.halloween-theme a.halloween-primary-btn:hover {
  background: linear-gradient(135deg, #FF8A3D 0%, #E65100 100%) !important;
  box-shadow: 0 0 20px rgba(255, 117, 24, 0.6), 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  transform: translateY(-2px) !important;
}

/* ---------- 6. Mobile Responsiveness (< 768px) ---------- */
@media (max-width: 768px) {
  body.halloween-theme {
    --halloween-bar-height: 58px;
  }
  #halloween-announcement-bar {
    padding: 6px 10px;
    font-size: 11px;
  }
  .halloween-bar-inner {
    gap: 6px;
    justify-content: center;
  }
  .halloween-bar-text {
    font-size: 11px;
  }
  .halloween-countdown-wrap {
    font-size: 10px;
  }
  .halloween-countdown-clock {
    padding: 1px 6px;
    font-size: 10px;
  }
  .halloween-bar-cta {
    font-size: 9px;
    padding: 3px 9px;
  }
  .halloween-bar-sep {
    display: none;
  }

  /* Scale Mobile Doodles: 35px – 45px and opacity: 0.50 */
  .floating-doodle-layer svg {
    max-width: 42px !important;
    max-height: 42px !important;
    opacity: 0.50 !important;
  }
}
