/* ─────────────────────────────────────────────────────────────────────────
   Pro My Account — Premium 3D Seasonal Themes (Halloween & Christmas)
   Tailored exclusively for MonaCare (موناکِر)
   High-impact, GPU-accelerated, 100% responsive, RTL-perfect, accessible.
   ───────────────────────────────────────────────────────────────────────── */

/* ═════════════════════════════════════════════════════════════════════════
   1. HALLOWEEN ATMOSPHERIC COLOR PALETTE & GLOBAL THEME
   ═════════════════════════════════════════════════════════════════════════ */

.pma-theme-halloween {
  /* Halloween Core Tokens */
  --pma-h-orange:        #ff7a00;
  --pma-h-orange-bright: #ff9d00;
  --pma-h-orange-glow:   rgba(255, 122, 0, 0.55);
  --pma-h-purple:        #9333ea;
  --pma-h-purple-dark:   #581c87;
  --pma-h-purple-glow:   rgba(147, 51, 234, 0.45);
  --pma-h-green:         #22c55e;

  /* Plugin Design Tokens Override (Full Halloween Transformation) */
  --pma-brand:           #ff7a00 !important;
  --pma-brand-dark:      #ea580c !important;
  --pma-brand-light:     rgba(255, 122, 0, 0.15) !important;
  --pma-brand-dim:       rgba(255, 122, 0, 0.12) !important;
  --pma-brand-ring:      rgba(255, 122, 0, 0.35) !important;
  --pma-brand-glow:      rgba(255, 122, 0, 0.55) !important;
  --pma-on-brand:        #ffffff !important;

  /* Spooky Night Surfaces */
  --pma-bg:              #0e0b16 !important;
  --pma-surface:         #181326 !important;
  --pma-border:          #2e2346 !important;
  --pma-border-soft:     #231a38 !important;

  /* High-Contrast Crisp Typography */
  --pma-text:            #f9fafb !important;
  --pma-text-2:          #d1d5db !important;
  --pma-text-3:          #9ca3af !important;

  /* Eerie Shadows */
  --pma-shadow-xs:       0 2px 8px rgba(0, 0, 0, 0.45) !important;
  --pma-shadow-sm:       0 4px 16px rgba(0, 0, 0, 0.55) !important;
  --pma-shadow-md:       0 8px 30px rgba(0, 0, 0, 0.65) !important;
  --pma-shadow-lg:       0 14px 44px rgba(0, 0, 0, 0.75) !important;
}

/* ── Full Dashboard Halloween Night Atmosphere ───────────────────────────── */
.pma-theme-halloween.pma-dashboard,
.pma-theme-halloween.pma-scope,
.pma-theme-halloween#pma-cart,
.pma-theme-halloween#pma-checkout {
  background: radial-gradient(circle at 85% 15%, rgba(147, 51, 234, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(255, 122, 0, 0.12) 0%, transparent 40%),
              #0e0b16 !important;
  color: #f9fafb !important;
  position: relative;
  overflow-x: clip !important;
}

/* ── Sidebar & Navigation Theming ────────────────────────────────────────── */
.pma-theme-halloween .pma-sidebar {
  background: linear-gradient(180deg, #151022 0%, #0e0a17 100%) !important;
  border-inline-end-color: #2b1f44 !important;
}

.pma-theme-halloween .pma-nav-item {
  color: #e5e7eb !important;
  transition: all .25s ease;
}

.pma-theme-halloween .pma-nav-item:hover {
  background: rgba(255, 122, 0, 0.08) !important;
  color: #ff9d00 !important;
}

/* ── CRITICAL FIX: Active Sidebar Nav Item & Icon Contrast ──────────────── */
.pma-theme-halloween .pma-nav-item.active {
  background: rgba(255, 122, 0, 0.14) !important;
  color: #ff9d00 !important;
  border-inline-start: 4px solid #ff7a00 !important;
  box-shadow: inset 0 0 14px rgba(255, 122, 0, 0.08);
}

.pma-theme-halloween .pma-nav-item.active .pma-nav-icon {
  background: #ff7a00 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.55);
}

.pma-theme-halloween .pma-nav-item.active .pma-nav-icon svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
  fill: none !important;
}

.pma-theme-halloween .pma-nav-item.active .pma-nav-label {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.pma-theme-halloween .pma-badge {
  background: #ea580c !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.6);
}

/* ── Card Styling across ALL tabs (Overview, Orders, Tickets, Profile, etc.) */
.pma-theme-halloween .pma-card,
.pma-theme-halloween .pma-stat-card,
.pma-theme-halloween .pma-profile-card,
.pma-theme-halloween .pma-orders-table,
.pma-theme-halloween .pma-orders-card,
.pma-theme-halloween .pma-order-detail-card,
.pma-theme-halloween .pma-address-card,
.pma-theme-halloween .pma-ticket-card,
.pma-theme-halloween .pma-ticket-view,
.pma-theme-halloween .pma-course-card,
.pma-theme-halloween .pma-download-card,
.pma-theme-halloween .pma-notif-card,
.pma-theme-halloween .pma-pref-card,
.pma-theme-halloween .pma-support-hub,
.pma-theme-halloween .pma-box,
.pma-theme-halloween #order_review,
.pma-theme-halloween .pma-cart-totals,
.pma-theme-halloween .pma-cart-items,
.pma-theme-halloween .pma-auth-card,
.pma-theme-halloween .pma-overview-hero {
  position: relative !important;
  background: #181326 !important;
  border: 1px solid rgba(255, 122, 0, 0.22) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 122, 0, 0.06) !important;
  color: #f9fafb !important;
  overflow: visible !important;
  transition: transform .28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .28s ease, border-color .28s ease;
}

.pma-theme-halloween .pma-card:hover,
.pma-theme-halloween .pma-stat-card:hover,
.pma-theme-halloween .pma-address-card:hover,
.pma-theme-halloween .pma-ticket-card:hover,
.pma-theme-halloween .pma-order-detail-card:hover,
.pma-theme-halloween .pma-support-hub:hover {
  border-color: #ff7a00 !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 122, 0, 0.28) !important;
  transform: translateY(-2px);
}

.pma-theme-halloween .pma-stat-value {
  color: #ff9d00 !important;
  text-shadow: 0 0 16px rgba(255, 157, 0, 0.45);
}

.pma-theme-halloween .pma-stat-icon {
  background: rgba(255, 122, 0, 0.15) !important;
  color: #ff7a00 !important;
  border: 1px solid rgba(255, 122, 0, 0.3) !important;
}

/* Ensure card titles and icons stay strictly in foreground */
.pma-card-header,
.pma-card-body,
.pma-stat-info,
.pma-stat-icon,
.pma-hero-text,
.pma-support-hub-content {
  position: relative;
  z-index: 2;
}

.pma-theme-halloween .pma-overview-hero {
  background: linear-gradient(135deg, #241a3c 0%, #171128 60%, #1b0e25 100%) !important;
  border-color: rgba(255, 122, 0, 0.35) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 122, 0, 0.12) !important;
  padding-inline-start: 100px !important; /* Space for the 3D Jack-o'-Lantern on the left */
}

.pma-theme-halloween .pma-hero-badge {
  background: rgba(255, 122, 0, 0.2) !important;
  border: 1px solid #ff7a00 !important;
  color: #ffb703 !important;
}

/* ── Form Inputs & Selects Theming ───────────────────────────────────────── */
.pma-theme-halloween input[type="text"],
.pma-theme-halloween input[type="email"],
.pma-theme-halloween input[type="tel"],
.pma-theme-halloween input[type="password"],
.pma-theme-halloween input[type="number"],
.pma-theme-halloween select,
.pma-theme-halloween textarea {
  background: #201933 !important;
  border: 1px solid #3d2f5a !important;
  color: #f9fafb !important;
}

.pma-theme-halloween input:focus,
.pma-theme-halloween select:focus,
.pma-theme-halloween textarea:focus {
  border-color: #ff7a00 !important;
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.28) !important;
  outline: none;
}

/* ═════════════════════════════════════════════════════════════════════════
   2. HALLOWEEN BUTTONS: SLEEK STYLING & SPECTRAL HOVER MOTION
   ═════════════════════════════════════════════════════════════════════════ */

.pma-theme-halloween .pma-btn,
.pma-theme-halloween .pma-btn-primary,
.pma-theme-halloween .pma-checkout-submit-btn,
.pma-theme-halloween .button.checkout-button,
.pma-theme-halloween .pma-btn-auth-submit,
.pma-theme-halloween .woocommerce-button,
.pma-theme-halloween .button {
  position: relative !important;
  background: linear-gradient(135deg, #ff7a00 0%, #ea580c 50%, #c2410c 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(254, 215, 170, 0.45) !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35) !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
  overflow: hidden !important;
  z-index: 1;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Spectral Light Sweep on Hover */
.pma-theme-halloween .pma-btn::after,
.pma-theme-halloween .pma-btn-primary::after,
.pma-theme-halloween .pma-checkout-submit-btn::after,
.pma-theme-halloween .button.checkout-button::after,
.pma-theme-halloween .pma-btn-auth-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: none;
}

.pma-theme-halloween .pma-btn:hover,
.pma-theme-halloween .pma-btn-primary:hover,
.pma-theme-halloween .pma-checkout-submit-btn:hover,
.pma-theme-halloween .button.checkout-button:hover,
.pma-theme-halloween .pma-btn-auth-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(255, 122, 0, 0.6), 0 0 16px rgba(251, 146, 60, 0.4) !important;
  border-color: #fed7aa !important;
}

.pma-theme-halloween .pma-btn:hover::after,
.pma-theme-halloween .pma-btn-primary:hover::after,
.pma-theme-halloween .pma-checkout-submit-btn:hover::after,
.pma-theme-halloween .button.checkout-button:hover::after,
.pma-theme-halloween .pma-btn-auth-submit:hover::after {
  animation: pmaHalloweenBtnShine 0.85s ease-out;
}

@keyframes pmaHalloweenBtnShine {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* Playful Halloween icon bounce & tilt on hover */
.pma-theme-halloween .pma-btn:hover svg,
.pma-theme-halloween .pma-btn-primary:hover svg,
.pma-theme-halloween .pma-checkout-submit-btn:hover svg,
.pma-theme-halloween .button.checkout-button:hover svg {
  transform: scale(1.18) rotate(-8deg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* ═════════════════════════════════════════════════════════════════════════
   3. 3D CORNER SPIDERWEBS (ANCHORED SAFELY WITHOUT OBSCURING ICONS/TEXT)
   ═════════════════════════════════════════════════════════════════════════ */

.pma-seasonal-web-wrap {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: clamp(60px, 9vw, 84px) !important;
  height: clamp(60px, 9vw, 84px) !important;
  pointer-events: none !important;
  z-index: 1 !important; /* Underneath text/icons */
  filter: drop-shadow(-2px 3px 6px rgba(0, 0, 0, 0.4));
  overflow: visible !important;
  opacity: 0.82;
}

.pma-seasonal-web-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 3D Dangling Spider (Tightly anchored near corner, not cutting across content) */
.pma-seasonal-spider {
  position: absolute;
  top: clamp(26px, 4vw, 36px);
  right: clamp(18px, 3vw, 26px);
  width: 16px;
  height: 24px;
  transform-origin: top center;
  animation: pmaSpiderDangle 4s ease-in-out infinite alternate;
  pointer-events: none !important;
  transition: top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.pma-seasonal-spider-thread {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  transform: translateX(-50%);
}

.pma-seasonal-spider-svg {
  width: 16px;
  height: 16px;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.pma-card:hover .pma-seasonal-spider,
.pma-address-card:hover .pma-seasonal-spider,
.pma-ticket-card:hover .pma-seasonal-spider {
  top: clamp(14px, 2vw, 20px);
}

@keyframes pmaSpiderDangle {
  0%   { transform: rotate(-8deg); }
  50%  { transform: rotate(10deg); }
  100% { transform: rotate(-6deg); }
}

/* ═════════════════════════════════════════════════════════════════════════
   4. LARGE 3D JACK-O'-LANTERN (CLEAN SEPARATED POSITIONING)
   ═════════════════════════════════════════════════════════════════════════ */

.pma-seasonal-pumpkin-hero {
  position: absolute;
  top: 50%;
  left: 28px; /* Dedicated whitespace on the left of overview hero */
  right: auto;
  transform: translateY(-50%);
  width: clamp(58px, 9vw, 76px);
  height: clamp(50px, 8vw, 66px);
  z-index: 3;
  pointer-events: none !important;
  perspective: 800px;
  transform-style: preserve-3d;
}

.pma-seasonal-pumpkin-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(255, 122, 0, 0.6)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
  animation: pmaPumpkinBob 4.2s ease-in-out infinite alternate;
  transform-origin: center bottom;
  will-change: transform;
}

.pma-seasonal-pumpkin-glow {
  animation: pmaPumpkinFlicker 2.2s ease-in-out infinite alternate;
}

@keyframes pmaPumpkinBob {
  0%   { transform: translateY(0) rotate(-1.5deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes pmaPumpkinFlicker {
  0%, 100% { opacity: 0.85; filter: drop-shadow(0 0 6px #ffb703); }
  25%      { opacity: 1;    filter: drop-shadow(0 0 16px #ff7a00); }
  50%      { opacity: 0.7;  filter: drop-shadow(0 0 5px #ea580c); }
  75%      { opacity: 0.95; filter: drop-shadow(0 0 12px #ffb703); }
}

/* ═════════════════════════════════════════════════════════════════════════
   5. INFINITE MOTION: 3D FLYING BATS & FLOATING GHOST
   ═════════════════════════════════════════════════════════════════════════ */

.pma-seasonal-stage {
  position: absolute;
  top: 60px; /* Start strictly below the 60px topbar */
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% - 60px);
  pointer-events: none !important;
  z-index: 50; /* Float visibly in the open air above card backgrounds */
  overflow: hidden;
  max-width: 100vw;
}

/* ── 3D Luminous Moonlit Bats ────────────────────────────────────────────── */
.pma-seasonal-bat {
  position: absolute;
  width: 52px;
  height: 30px;
  pointer-events: none !important;
  z-index: 52;
  filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.9)) drop-shadow(0 0 20px rgba(255, 122, 0, 0.65));
  will-change: transform;
  transform-style: preserve-3d;
}

.pma-seasonal-bat-wing-l {
  transform-origin: right center;
  animation: pmaBatFlapL 0.24s ease-in-out infinite alternate;
}

.pma-seasonal-bat-wing-r {
  transform-origin: left center;
  animation: pmaBatFlapR 0.24s ease-in-out infinite alternate;
}

@keyframes pmaBatFlapL {
  0%   { transform: rotateY(55deg) rotateZ(-12deg); }
  100% { transform: rotateY(-40deg) rotateZ(16deg); }
}

@keyframes pmaBatFlapR {
  0%   { transform: rotateY(-55deg) rotateZ(12deg); }
  100% { transform: rotateY(40deg) rotateZ(-16deg); }
}

/* Infinite Flight Loops Across the Screen (Clear of Header) */
.pma-seasonal-bat-loop-1 {
  top: 55px; /* In stage (stage starts at 60px, so 115px from page top) */
  animation: pmaBatFlightLoop1 18s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pma-seasonal-bat-loop-2 {
  top: 95px; /* 155px from page top */
  animation: pmaBatFlightLoop2 24s ease-in-out infinite;
  animation-delay: -9s;
}

@keyframes pmaBatFlightLoop1 {
  0% {
    transform: translate3d(-80px, 0, 0) scale(0.8) rotate(10deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  30% {
    transform: translate3d(35vw, 40px, 0) scale(1.1) rotate(-8deg);
  }
  65% {
    transform: translate3d(70vw, -20px, 0) scale(0.95) rotate(6deg);
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: translate3d(calc(100vw + 80px), 20px, 0) scale(0.75) rotate(-10deg);
    opacity: 0;
  }
}

@keyframes pmaBatFlightLoop2 {
  0% {
    transform: translate3d(calc(100vw + 80px), 30px, 0) scale(0.8) rotate(-12deg);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  40% {
    transform: translate3d(60vw, -25px, 0) scale(1.15) rotate(8deg);
  }
  75% {
    transform: translate3d(25vw, 35px, 0) scale(0.9) rotate(-6deg);
  }
  94% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-80px, 10px, 0) scale(0.7) rotate(12deg);
    opacity: 0;
  }
}

/* ── Floating 3D Ghost (Far from Pumpkin) ────────────────────────────────── */
.pma-seasonal-ghost {
  position: absolute;
  top: 55px; /* In stage: 115px from page top */
  right: 8%;
  left: auto;
  width: 52px;
  height: 65px;
  pointer-events: none !important;
  z-index: 51;
  filter: drop-shadow(0 0 14px rgba(192, 132, 252, 0.75)) drop-shadow(0 0 24px rgba(255, 122, 0, 0.35));
  animation: pmaGhostFloatInfinite 6s ease-in-out infinite alternate;
  will-change: transform;
  opacity: 0.94;
}

@keyframes pmaGhostFloatInfinite {
  0%   { transform: translate3d(0, 0, 0) rotate(-4deg); }
  50%  { transform: translate3d(8px, -14px, 0) rotate(4deg); }
  100% { transform: translate3d(-6px, -8px, 0) rotate(-2deg); }
}

/* ── 3D Witch Hat for Avatar ONLY ───────────────────────────────────────── */
.pma-theme-halloween .pma-avatar-wrap {
  position: relative;
  overflow: visible !important;
}

.pma-seasonal-witch-hat {
  position: absolute;
  top: -22px;
  right: -8px;
  width: 46px;
  height: 42px;
  pointer-events: none !important;
  z-index: 6;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  transform: rotate(12deg);
  transition: transform .32s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.pma-avatar-wrap:hover .pma-seasonal-witch-hat {
  transform: rotate(18deg) scale(1.12) translateY(-3px);
}

/* ── 3D Flying Witch on Broomstick (Luminous Left-to-Right Flight) ──────── */
.pma-seasonal-witch {
  position: absolute;
  top: 45px; /* In stage (starts at 60px): 105px from page top, clear of header */
  left: -140px; /* Starts off-screen on the LEFT */
  right: auto;
  width: 115px;
  height: 72px;
  pointer-events: none !important;
  z-index: 55; /* Glides visibly across the upper sky */
  filter: drop-shadow(0 0 14px rgba(217, 70, 239, 0.95)) drop-shadow(0 0 28px rgba(255, 122, 0, 0.7));
  animation: pmaWitchFlightLeftToRight 22s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes pmaWitchFlightLeftToRight {
  0% {
    transform: translate3d(0, 0, 0) rotate(-4deg) scale(0.9);
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  25% {
    transform: translate3d(30vw, -20px, 0) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translate3d(60vw, 16px, 0) rotate(-4deg) scale(1);
  }
  75% {
    transform: translate3d(85vw, -12px, 0) rotate(4deg) scale(0.95);
  }
  96% {
    opacity: 1;
  }
  100% {
    transform: translate3d(calc(100vw + 160px), 8px, 0) rotate(-2deg) scale(0.85);
    opacity: 0;
  }
}

.pma-witch-cape {
  transform-origin: top right;
  animation: pmaCapeFlutter 1.6s ease-in-out infinite alternate;
}

@keyframes pmaCapeFlutter {
  0%   { transform: rotate(-3deg) scaleY(0.95); }
  100% { transform: rotate(5deg) scaleY(1.05); }
}

.pma-witch-magic circle {
  animation: pmaMagicSparkle 1.8s ease-in-out infinite alternate;
}

@keyframes pmaMagicSparkle {
  0%   { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1;   transform: scale(1.3); filter: drop-shadow(0 0 6px #fef08a); }
}

/* ── 3D Animated Skeleton Mascot (Stationed at bottom-left corner) ───────── */
.pma-seasonal-skeleton {
  position: fixed;
  bottom: 18px;
  left: 20px;
  width: 72px;
  height: 108px;
  pointer-events: none !important;
  z-index: 45;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 12px rgba(255, 122, 0, 0.25));
  animation: pmaSkeletonIdle 4.2s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes pmaSkeletonIdle {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-4px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(1deg); }
}

.pma-skeleton-head {
  transform-origin: 40px 42px;
  animation: pmaSkeletonHeadTilt 3.6s ease-in-out infinite alternate;
}

@keyframes pmaSkeletonHeadTilt {
  0%   { transform: rotate(-5deg); }
  100% { transform: rotate(6deg); }
}

.pma-skel-eye {
  animation: pmaSkelEyeGlow 2s ease-in-out infinite alternate;
}

@keyframes pmaSkelEyeGlow {
  0%, 100% { filter: drop-shadow(0 0 6px #ff7a00); opacity: 1; }
  50%      { filter: drop-shadow(0 0 2px #ea580c); opacity: 0.5; }
}

.pma-skeleton-arm-l {
  transform-origin: 30px 48px;
  animation: pmaSkeletonWave 2.2s ease-in-out infinite alternate;
}

@keyframes pmaSkeletonWave {
  0%   { transform: rotate(-8deg); }
  50%  { transform: rotate(18deg); }
  100% { transform: rotate(-4deg); }
}

/* ── Mini 3D Corner Pumpkin (Sidebar & Summary Cards) ────────────────────── */
.pma-seasonal-corner-pumpkin {
  position: absolute;
  bottom: 8px;
  left: 12px;
  width: 38px;
  height: 34px;
  pointer-events: none !important;
  z-index: 3;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(255, 122, 0, 0.45));
  animation: pmaPumpkinBob 4s ease-in-out infinite alternate;
}

@keyframes pmaPumpkinBob {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-2px) scale(1.04); }
}

@media (max-width: 768px) {
  .pma-seasonal-skeleton {
    width: 52px;
    height: 78px;
    bottom: 12px;
    left: 12px;
    opacity: 0.88;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   6. ANIMATED SEASONAL FAIRY LIGHTS & GARLANDS (چراغونی متحرک و درخشان)
   ═════════════════════════════════════════════════════════════════════════ */

.pma-theme-halloween .pma-topbar,
.pma-theme-christmas .pma-topbar {
  overflow: visible !important;
}

.pma-seasonal-garland {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 16px;
  pointer-events: none !important;
  z-index: 99 !important;
  overflow: visible !important;
}

/* Hang seamlessly along the bottom edge of the topbar across all tabs */
.pma-topbar .pma-seasonal-garland {
  bottom: -22px;
  top: auto;
  height: 36px;
}

/* Standalone dashboard fallback */
.pma-dashboard > .pma-seasonal-garland.pma-garland-standalone {
  top: 0;
  height: 36px;
  z-index: 95 !important;
}

/* Cart & Checkout Top Placement */
.pma-theme-halloween.pma-cart,
.pma-theme-halloween.pma-checkout,
.pma-theme-christmas.pma-cart,
.pma-theme-christmas.pma-checkout {
  position: relative !important;
  padding-top: 36px !important;
}

.pma-cart > .pma-seasonal-garland.pma-garland-cart,
.pma-checkout > .pma-seasonal-garland.pma-garland-checkout {
  top: 0;
  height: 36px;
  z-index: 30 !important;
}

/* Auth / Login Modal Top Placement */
.pma-theme-halloween .pma-auth-card,
.pma-theme-christmas .pma-auth-card {
  position: relative !important;
  overflow: visible !important;
}

.pma-auth-card > .pma-seasonal-garland.pma-garland-auth {
  top: -12px;
  height: 32px;
  z-index: 25 !important;
}

/* ── Garland Wire Line ───────────────────────────────────────────────────── */
.pma-seasonal-garland-wire {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-image: radial-gradient(ellipse at 50% 0%, transparent 60%, rgba(255, 122, 0, 0.45) 63%, #334155 70%);
  background-size: 44px 8px;
  background-repeat: repeat-x;
  opacity: 0.9;
}

.pma-seasonal-garland--christmas .pma-seasonal-garland-wire {
  background-image: radial-gradient(ellipse at 50% 0%, transparent 60%, rgba(245, 158, 11, 0.45) 63%, #14532d 70%);
}

/* ── Bulbs & Pendulum Physics ────────────────────────────────────────────── */
.pma-seasonal-bulb {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 32px;
  transform-origin: top center;
  animation: pmaBulbSway 3.8s ease-in-out infinite alternate;
}

.pma-seasonal-bulb-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.pma-seasonal-bulb:nth-child(2n) {
  animation-duration: 4.4s;
  animation-delay: -1.3s;
}

.pma-seasonal-bulb:nth-child(3n) {
  animation-duration: 3.4s;
  animation-delay: -2.2s;
}

.pma-seasonal-bulb:nth-child(5n) {
  animation-duration: 4.8s;
  animation-delay: -0.8s;
}

@keyframes pmaBulbSway {
  0%   { transform: rotate(-5deg); }
  50%  { transform: rotate(1deg); }
  100% { transform: rotate(5deg); }
}

/* ── Halloween Lighting Animations ───────────────────────────────────────── */
.pma-bulb-body--pumpkin {
  animation: pmaGlowPumpkin 2.2s ease-in-out infinite alternate;
}
.pma-bulb-body--skull {
  animation: pmaGlowSkull 2.7s ease-in-out infinite alternate;
  animation-delay: 0.4s;
}
.pma-bulb-body--potion {
  animation: pmaGlowPotion 2s ease-in-out infinite alternate;
  animation-delay: 0.9s;
}
.pma-bulb-body--toxic {
  animation: pmaGlowToxic 2.5s ease-in-out infinite alternate;
  animation-delay: 0.6s;
}

@keyframes pmaGlowPumpkin {
  0%, 100% { filter: drop-shadow(0 0 8px #ff7a00) drop-shadow(0 0 16px rgba(255, 122, 0, 0.7)); opacity: 1; }
  35%      { filter: drop-shadow(0 0 2px #ea580c); opacity: 0.6; }
  75%      { filter: drop-shadow(0 0 12px #fef08a) drop-shadow(0 0 22px #ff7a00); opacity: 1; }
}

@keyframes pmaGlowSkull {
  0%, 100% { filter: drop-shadow(0 0 7px #c084fc) drop-shadow(0 0 14px rgba(147, 51, 234, 0.6)); opacity: 0.95; }
  30%      { filter: drop-shadow(0 0 2px #9333ea); opacity: 0.55; }
  80%      { filter: drop-shadow(0 0 11px #f3e8ff) drop-shadow(0 0 20px #a855f7); opacity: 1; }
}

@keyframes pmaGlowPotion {
  0%, 100% { filter: drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 16px rgba(126, 34, 206, 0.6)); opacity: 1; }
  45%      { filter: drop-shadow(0 0 2px #7e22ce); opacity: 0.65; }
  85%      { filter: drop-shadow(0 0 13px #e879f9) drop-shadow(0 0 20px #c084fc); opacity: 1; }
}

@keyframes pmaGlowToxic {
  0%, 100% { filter: drop-shadow(0 0 8px #22c55e) drop-shadow(0 0 16px rgba(21, 128, 61, 0.6)); opacity: 1; }
  35%      { filter: drop-shadow(0 0 2px #15803d); opacity: 0.6; }
  70%      { filter: drop-shadow(0 0 12px #4ade80) drop-shadow(0 0 20px #22c55e); opacity: 1; }
}

/* ── Christmas Lighting Animations ───────────────────────────────────────── */
.pma-bulb-body--xmas-red {
  animation: pmaGlowXmasRed 2.2s ease-in-out infinite alternate;
}
.pma-bulb-body--xmas-gold {
  animation: pmaGlowXmasGold 2.6s ease-in-out infinite alternate;
  animation-delay: 0.5s;
}
.pma-bulb-body--xmas-green {
  animation: pmaGlowXmasGreen 2s ease-in-out infinite alternate;
  animation-delay: 1s;
}
.pma-bulb-body--xmas-blue {
  animation: pmaGlowXmasBlue 2.4s ease-in-out infinite alternate;
  animation-delay: 0.7s;
}

@keyframes pmaGlowXmasRed {
  0%, 100% { filter: drop-shadow(0 0 8px #e11d48) drop-shadow(0 0 16px rgba(225, 29, 72, 0.7)); opacity: 1; }
  40%      { filter: drop-shadow(0 0 2px #be123c); opacity: 0.6; }
  80%      { filter: drop-shadow(0 0 12px #fb7185) drop-shadow(0 0 20px #e11d48); opacity: 1; }
}

@keyframes pmaGlowXmasGold {
  0%, 100% { filter: drop-shadow(0 0 8px #f59e0b) drop-shadow(0 0 16px rgba(245, 158, 11, 0.7)); opacity: 1; }
  35%      { filter: drop-shadow(0 0 2px #d97706); opacity: 0.65; }
  75%      { filter: drop-shadow(0 0 13px #fef08a) drop-shadow(0 0 22px #f59e0b); opacity: 1; }
}

@keyframes pmaGlowXmasGreen {
  0%, 100% { filter: drop-shadow(0 0 8px #10b981) drop-shadow(0 0 16px rgba(16, 185, 129, 0.7)); opacity: 1; }
  45%      { filter: drop-shadow(0 0 2px #047857); opacity: 0.6; }
  85%      { filter: drop-shadow(0 0 12px #34d399) drop-shadow(0 0 20px #10b981); opacity: 1; }
}

@keyframes pmaGlowXmasBlue {
  0%, 100% { filter: drop-shadow(0 0 8px #06b6d4) drop-shadow(0 0 16px rgba(6, 182, 212, 0.7)); opacity: 1; }
  30%      { filter: drop-shadow(0 0 2px #0891b2); opacity: 0.6; }
  70%      { filter: drop-shadow(0 0 13px #67e8f9) drop-shadow(0 0 22px #06b6d4); opacity: 1; }
}

/* Responsive adjustment: on mobile, alternate bulbs to keep clean spacing */
@media (max-width: 680px) {
  .pma-seasonal-garland .pma-seasonal-bulb:nth-child(even) {
    display: none !important;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   7. CHRISTMAS THEME ELEMENTS (3D SNOWCAPS, BAUBLES, SANTA HAT)
   ═════════════════════════════════════════════════════════════════════════ */

.pma-theme-christmas {
  --pma-c-red:          #e11d48;
  --pma-c-red-glow:     rgba(225, 29, 72, 0.45);
  --pma-c-green:        #059669;
  --pma-c-gold:         #f59e0b;
}

.pma-theme-christmas .pma-card,
.pma-theme-christmas .pma-stat-card,
.pma-theme-christmas .pma-profile-card,
.pma-theme-christmas #order_review,
.pma-theme-christmas .pma-cart-totals,
.pma-theme-christmas .pma-auth-card {
  position: relative !important;
  overflow: visible !important;
}

.pma-seasonal-snowcap {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 18px;
  pointer-events: none !important;
  z-index: 2;
  filter: drop-shadow(0 3px 6px rgba(186, 230, 253, 0.6));
}

.pma-seasonal-snowcap svg {
  width: 100%;
  height: 100%;
  display: block;
  preserveAspectRatio: none;
}

.pma-seasonal-santa-hat {
  position: absolute;
  top: -24px;
  right: -6px;
  width: 48px;
  height: 44px;
  pointer-events: none !important;
  z-index: 6;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transform: rotate(12deg);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.pma-avatar-wrap:hover .pma-seasonal-santa-hat {
  transform: rotate(18deg) scale(1.1) translateY(-3px);
}

.pma-seasonal-santa-pompom {
  transform-origin: top center;
  animation: pmaPomPomSway 2.8s ease-in-out infinite alternate;
}

@keyframes pmaPomPomSway {
  0%   { transform: rotate(-14deg); }
  100% { transform: rotate(16deg); }
}

.pma-seasonal-bauble-wrap {
  position: absolute;
  top: -4px;
  z-index: 4;
  pointer-events: none !important;
  transform-origin: top center;
  will-change: transform;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.3));
}

.pma-seasonal-bauble-string {
  width: 1.5px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.95) 0%, rgba(245, 158, 11, 0.4) 100%);
}

.pma-seasonal-bauble-ball {
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

/* ═════════════════════════════════════════════════════════════════════════
   8. RESPONSIVE BREAKPOINTS (MOBILE & TABLET PRECISION)
   ═════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Mobile Stage: Starts cleanly below the 60px mobile header */
  .pma-seasonal-stage {
    top: 60px !important;
    height: calc(100% - 60px) !important;
    z-index: 50 !important;
  }

  /* 3D Witch on Mobile: Visible and clear of the header */
  .pma-seasonal-witch {
    top: 45px !important;
    width: 86px !important;
    height: 54px !important;
    z-index: 55 !important;
  }

  /* 3D Bats on Mobile: Clear flight corridors below garland */
  .pma-seasonal-bat {
    width: 38px !important;
    height: 22px !important;
    z-index: 52 !important;
  }
  .pma-seasonal-bat-loop-1 {
    top: 48px !important;
  }
  .pma-seasonal-bat-loop-2 {
    top: 85px !important;
  }

  .pma-seasonal-ghost {
    top: 45px !important;
    right: 12px !important;
    width: 42px !important;
    height: 52px !important;
    z-index: 51 !important;
  }

  .pma-seasonal-web-wrap {
    width: 65px !important;
    height: 65px !important;
  }
  .pma-seasonal-spider {
    top: 22px;
    right: 18px;
    width: 14px;
    height: 20px;
  }
  .pma-seasonal-pumpkin-hero {
    left: 14px;
    width: 50px;
    height: 44px;
  }
  .pma-theme-halloween .pma-overview-hero {
    padding-inline-start: 70px !important;
  }
  .pma-seasonal-witch-hat,
  .pma-seasonal-santa-hat {
    width: 38px;
    height: 34px;
    top: -18px;
  }
}

@media (max-width: 480px) {
  .pma-seasonal-web-wrap {
    width: 50px !important;
    height: 50px !important;
  }
  .pma-seasonal-spider {
    display: none; /* Hide dangling spider on tiny mobile cards to keep it ultra clean */
  }
  .pma-seasonal-pumpkin-hero {
    position: static;
    transform: none;
    margin: 8px 0 0;
    width: 44px;
    height: 38px;
  }
  .pma-theme-halloween .pma-overview-hero {
    padding-inline-start: 16px !important;
  }
}

/* ── Accessibility: Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pma-seasonal-bat,
  .pma-seasonal-bat-wing-l,
  .pma-seasonal-bat-wing-r,
  .pma-seasonal-spider,
  .pma-seasonal-pumpkin-svg,
  .pma-seasonal-pumpkin-glow,
  .pma-seasonal-ghost,
  .pma-seasonal-h-bulb,
  .pma-bulb-glow,
  .pma-seasonal-santa-pompom {
    animation: none !important;
    transition: none !important;
  }
}

.pma-no-anim .pma-seasonal-bat,
.pma-no-anim .pma-seasonal-bat-wing-l,
.pma-no-anim .pma-seasonal-bat-wing-r,
.pma-no-anim .pma-seasonal-spider,
.pma-no-anim .pma-seasonal-pumpkin-svg,
.pma-no-anim .pma-seasonal-pumpkin-glow,
.pma-no-anim .pma-seasonal-ghost,
.pma-no-anim .pma-seasonal-h-bulb,
.pma-no-anim .pma-bulb-glow,
.pma-no-anim .pma-seasonal-santa-pompom {
  animation: none !important;
  transition: none !important;
}
