/*==============================================================================
  Festival Panel Shell
  ----------------------------------------------------------------------------
  A toggleable side panel on the right, mirroring the .mht-color-theme panel
  on the left. Contains 4 festival tabs + a reset button.
==============================================================================*/

.mht-festival-panel-wrap {
  position: fixed;
  top: 24%;
  right: -320px;
  z-index: 9999;
  transition: right .4s ease;
  font-family: 'Poppins', sans-serif;
}
.mht-festival-panel-wrap.is-open {
  right: 0;
}

/* Toggle tab (the button that sticks out on the left of the panel) */
.mht-festival-switch {
  position: absolute;
  left: -46px;
  top: 0;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #e91e63, #ff9800);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px 0 0 10px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, .2);
  transition: background .25s;
  border: 0;
  animation: mht-festival-attention 6s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}
/* Sparkle ring — expanding pink halo that fades out */
.mht-festival-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px 0 0 10px;
  box-shadow: 0 0 0 0 rgba(233, 30, 99, .55);
  pointer-events: none;
  animation: mht-festival-sparkle 3.2s ease-out infinite;
}
.mht-festival-switch:hover {
  background: linear-gradient(135deg, #ff9800, #e91e63);
  animation-play-state: paused;
}
.mht-festival-switch:hover::before {
  animation-play-state: paused;
}
/* Pause the attention-grabbing animation once the user opens the panel */
.mht-festival-panel-wrap.is-open .mht-festival-switch,
.mht-festival-panel-wrap.is-open .mht-festival-switch::before {
  animation: none;
}
.mht-festival-switch i {
  transition: transform .45s ease;
  position: relative;   /* keeps the icon above the ::before halo */
  z-index: 1;
}
.mht-festival-panel-wrap.is-open .mht-festival-switch i {
  transform: rotate(90deg);
}

/* Gentle pulse + periodic wiggle on the toggle */
@keyframes mht-festival-attention {
  0%, 88%, 100% { transform: scale(1)     rotate(0deg); }
  45%           { transform: scale(1.08)  rotate(0deg); }
  90%           { transform: scale(1)     rotate(-8deg); }
  93%           { transform: scale(1)     rotate( 8deg); }
  96%           { transform: scale(1)     rotate(-4deg); }
}
/* Expanding halo around the toggle */
@keyframes mht-festival-sparkle {
  0%   { box-shadow: 0 0 0 0   rgba(233, 30, 99, .55); }
  70%  { box-shadow: 0 0 0 14px rgba(233, 30, 99, 0); }
  100% { box-shadow: 0 0 0 0   rgba(233, 30, 99, 0); }
}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mht-festival-switch,
  .mht-festival-switch::before {
    animation: none;
  }
}

/* The actual panel */
.mht-festival-panel {
  width: 320px;
  background: #fff;
  padding: 22px 22px 18px;
  box-shadow: -2px 2px 14px rgba(0, 0, 0, .18);
  border-radius: 0 0 0 10px;
}
.mht-festival-panel h5 {
  font-size: 13px;
  font-weight: 800;
  color: var(--mht-primary, #7E4555);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mht-festival-panel .mht-festival-intro {
  font-size: 11px;
  color: #888;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* Tabs grid — 2-col scrollable (9 festivals now) */
.mht-festival-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.mht-festival-tabs::-webkit-scrollbar {
  width: 6px;
}
.mht-festival-tabs::-webkit-scrollbar-thumb {
  background: rgba(126, 69, 85, .35);
  border-radius: 3px;
}
.mht-festival-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.mht-festival-tab {
  display: block;
  position: relative;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 14px 8px 12px;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: border-color .25s, transform .2s, box-shadow .25s, background .25s;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}
.mht-festival-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.mht-festival-tab:hover {
  transform: translateY(-3px);
  border-color: #e0e0e0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.mht-festival-tab:hover .mht-festival-tab-icon {
  transform: scale(1.1) rotate(-4deg);
}
.mht-festival-tab > .mht-festival-tab-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px;
  margin: 0 auto 10px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 20px !important;
  color: #fff !important;
  line-height: 1 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.mht-festival-tab > .mht-festival-tab-icon > i {
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1 !important;
}
.mht-festival-tab[data-festival="holi"]            .mht-festival-tab-icon { background: linear-gradient(135deg, #e91e63, #ffb700); }
.mht-festival-tab[data-festival="diwali"]          .mht-festival-tab-icon { background: linear-gradient(135deg, #8b4513, #ffb300); }
.mht-festival-tab[data-festival="navaratri"]       .mht-festival-tab-icon { background: linear-gradient(135deg, #7B1FA2, #E53935); }
.mht-festival-tab[data-festival="hanuman-jayanti"] .mht-festival-tab-icon { background: linear-gradient(135deg, #b71c1c, #ff5722); }
.mht-festival-tab[data-festival="janmashtami"]     .mht-festival-tab-icon { background: linear-gradient(135deg, #0f172a, #fcd34d); }
.mht-festival-tab[data-festival="ganesh-chaturthi"] .mht-festival-tab-icon { background: linear-gradient(135deg, #c62828, #ff9800); }
.mht-festival-tab[data-festival="shivaratri"]      .mht-festival-tab-icon { background: linear-gradient(135deg, #0c1445, #4a90e2); }
.mht-festival-tab[data-festival="raksha-bandhan"]  .mht-festival-tab-icon { background: linear-gradient(135deg, #8e1616, #f5a623); }
.mht-festival-tab[data-festival="makar-sankranti"] .mht-festival-tab-icon { background: linear-gradient(135deg, #ff6f00, #ffd600); }

.mht-festival-tab strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 3px;
  line-height: 1.2;
}
.mht-festival-tab span {
  display: block;
  font-size: 10px;
  color: #999;
  line-height: 1.3;
}

.mht-festival-tab.is-active {
  border-color: var(--mht-primary, #7E4555);
  background: linear-gradient(180deg, #fff 0%, #fff8fb 100%);
  box-shadow: 0 12px 28px rgba(126, 69, 85, .22), 0 0 0 3px rgba(126, 69, 85, .08);
}
.mht-festival-tab.is-active::after {
  content: "\f00c";
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mht-primary, #7E4555);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer actions area */
.mht-festival-footer {
  padding: 0 16px 18px;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
  padding-top: 14px;
}

/* Reset button */
.mht-festival-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #f7f7f7;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-family: inherit;
}
.mht-festival-reset:hover {
  background: #fff;
  border-color: var(--mht-primary, #7E4555);
  color: var(--mht-primary, #7E4555);
}
.mht-festival-reset i {
  font-size: 13px;
}

/* Footer note */
.mht-festival-note {
  font-size: 10px;
  color: #aaa;
  text-align: center;
  margin: 10px 0 0;
  font-style: italic;
}

/* Mobile — slide-up from bottom instead of right */
@media (max-width: 575px) {
  .mht-festival-panel-wrap {
    top: auto;
    bottom: -420px;
    right: 0;
    left: 0;
    width: 100%;
    transition: bottom .4s ease;
  }
  .mht-festival-panel-wrap.is-open {
    right: 0;
    bottom: 0;
  }
  .mht-festival-switch {
    top: -46px;
    left: 20px;
    border-radius: 10px 10px 0 0;
  }
  .mht-festival-switch::before {
    border-radius: 10px 10px 0 0;
  }
  .mht-festival-panel {
    width: 100%;
    border-radius: 10px 10px 0 0;
  }
}
