/* Minimal Custom CSS - Only for features Tailwind can't handle */

/* CSS Variables for Theme Colors (set dynamically by theme.js) */
/* These are set via JavaScript in theme.js, but we define defaults here */
:root {
  /* Defaults only — config.js overwrites these on documentElement at load.
     They exist so the page is not unstyled in the moment before JS runs, so
     they must match THEME_CONFIG in assets/js/config.js. */
  --color-primary: #E2136E;
  --color-secondary: #F0568F;
  --color-primary-hover: #B00E58;
  --color-text: #1A1A1A;
  --color-text-light: #6B7280;
  --color-background: #FFFFFF;
  --color-background-alt: #F5F5F7;
  --color-success: #1DA34C;
  --color-warning: #FF9100;
  --color-danger: #E53935;
  --color-border: rgba(26, 26, 26, 0.10);
  --color-success-muted: rgba(29, 163, 76, 0.12);
  --color-danger-muted: rgba(229, 57, 53, 0.14);
  --color-success-ring: rgba(29, 163, 76, 0.2);
  --color-hero-overlay: rgba(26, 26, 26, 0.55);
  --color-footer-to: #8C0A46;
  --font-sans: "Hind Siliguri", sans-serif;
  --max-width-container: 448px;
}

/* Tailwind v4 Utility Classes using CSS Variables */
/* These allow us to use classes like bg-primary, text-primary, etc. */
.bg-primary {
  background-color: var(--color-primary);
}
.bg-secondary {
  background-color: var(--color-secondary);
}
.bg-primary-hover {
  background-color: var(--color-primary-hover);
}
.bg-background {
  background-color: var(--color-background);
}
.bg-background-alt {
  background-color: var(--color-background-alt);
}

.text-primary {
  color: var(--color-primary);
}
.text-secondary {
  color: var(--color-secondary);
}
.text-primary-hover {
  color: var(--color-primary-hover);
}
.text-text {
  color: var(--color-text);
}
.text-text-light {
  color: var(--color-text-light);
}

.text-success {
  color: var(--color-success);
}
.text-warning {
  color: var(--color-warning);
}
.text-danger {
  color: var(--color-danger);
}

.bg-success-soft {
  background-color: var(--color-success-muted);
}
.bg-danger-soft {
  background-color: var(--color-danger-muted);
}

.border-border {
  border-color: var(--color-border);
}

.bg-hero-overlay {
  background-color: var(--color-hero-overlay);
}

.success-icon-ring {
  box-shadow: 0 0 0 4px var(--color-success-ring);
}

.placeholder-muted::placeholder {
  color: var(--color-text-light);
  opacity: 0.8;
}

.border-primary {
  border-color: var(--color-primary);
}
.border-secondary {
  border-color: var(--color-secondary);
}

.hover\:bg-primary:hover {
  background-color: var(--color-primary) !important;
}
.hover\:bg-primary-hover:hover {
  background-color: var(--color-primary-hover) !important;
}

/* Sidebar menu hover - make text and icons white when hovering */
.hover\:bg-primary:hover .text-primary,
.hover\:bg-primary:hover span,
.hover\:bg-primary-hover:hover .text-primary,
.hover\:bg-primary-hover:hover span {
  color: white !important;
}

/* Gradient utilities for primary color */
.from-primary {
  --tw-gradient-from: var(--color-primary);
  --tw-gradient-to: transparent;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.to-primary-hover {
  --tw-gradient-to: var(--color-primary-hover);
}
.hover\:from-primary-hover:hover {
  --tw-gradient-from: var(--color-primary-hover);
}
.hover\:to-primary:hover {
  --tw-gradient-to: var(--color-primary);
}

/* Font Family */
.font-sans {
  font-family: var(--font-sans);
}

/* Max Width Container */
.max-w-container {
  max-width: var(--max-width-container);
}

/* Cursor pointer for all clickable elements */
button,
a,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
label[for],
.cursor-pointer {
  cursor: pointer;
}

/* Banner images should not be clickable */
.banner-item img {
  cursor: default;
  pointer-events: none;
}

/* Font Display Optimization - Ensure text remains visible during font load */
@font-face {
  font-family: "bootstrap-icons";
  font-display: swap;
}

/* Horizontal Scrolling Lists - Mobile First Design */
.quiz-tournament-list,
.subscription-pack-list {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.quiz-tournament-list::-webkit-scrollbar,
.subscription-pack-list::-webkit-scrollbar {
  display: none;
}

/* Fixed width for horizontal scroll items */
.quiz-tournament-list > * {
  display: inline-block;
  width: 85%;
  margin-right: 1rem;
  vertical-align: top;
  flex-shrink: 0;
}

.quiz-tournament-list > *:last-child {
  margin-right: 0;
}

.subscription-pack-list > .subscription-card,
.subscription-pack-list > * {
  display: inline-block;
  width: 85%;
  margin-right: 1rem;
  vertical-align: top;
  flex-shrink: 0;
}

.subscription-pack-list > .subscription-card:last-child,
.subscription-pack-list > *:last-child {
  margin-right: 0;
}

/* Subscription packages — CB-style cards */
.subscription-pack-list.subscription-show-all {
  overflow: visible;
  white-space: normal;
}

.subscription-pack-list.subscription-show-all > * {
  display: block;
  width: 100%;
  margin-right: 0;
  margin-bottom: 1rem;
}

.subscription-pack-list.subscription-show-all > *:last-child {
  margin-bottom: 0;
}

.subscription-card {
  white-space: normal;
  border-radius: 14px;
  border: 1px solid rgba(26, 35, 126, 0.08);
  box-shadow: 0 4px 14px rgba(26, 35, 126, 0.08);
}

.subscription-card-body {
  padding: 1.25rem 1.25rem 1rem;
}

.subscription-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.subscription-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.subscription-card-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  background: var(--pack-accent, var(--color-primary));
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.subscription-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.subscription-card-price {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  color: var(--pack-accent, var(--color-primary));
}

.subscription-card-price .currency {
  font-size: 1.1rem;
  font-weight: 700;
}

.subscription-card-calendar {
  font-size: 1.35rem;
  opacity: 0.22;
  color: var(--pack-accent, var(--color-primary));
}

.subscription-card-caption {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin: 0 0 0.85rem;
  line-height: 1.45;
  min-height: 2.25rem;
}

.subscription-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--pack-accent, var(--color-primary));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.subscription-card-cta:hover {
  opacity: 0.92;
  color: #fff;
}

.subscription-card-cta:active {
  transform: scale(0.98);
}

.subscription-pack-theme-0 {
  --pack-accent: #e2136e;
  background: #fdf3f8;
}

.subscription-pack-theme-1 {
  --pack-accent: #1da34c;
  background: #f2fbf5;
}

.subscription-pack-theme-2 {
  --pack-accent: #b00e58;
  background: #fdf0f6;
}

.subscription-view-all-btn i {
  transition: transform 0.2s ease;
}

.subscription-view-all-btn[aria-expanded="true"] i {
  transform: rotate(90deg);
}

/* Site footer — compact two-column bar */
.site-footer-bar {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-footer-to) 100%
  );
}

.site-footer-col {
  position: relative;
}

/* Banner Carousel - Minimal CSS for transitions (Tailwind handles most styling) */
.banner-item {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-carousel .banner-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.banner-carousel .banner-item.active {
  position: absolute;
  opacity: 1;
  z-index: 2;
}

.banner-indicator.active {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  width: 8px !important;
  height: 8px !important;
  transform: none;
}

/* Category selection state */
.category-item.selected {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Loading spinner animation */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.bg-warning-muted {
  background-color: rgba(255, 145, 0, 0.12);
}

.accent-icon-tile {
  background: linear-gradient(
    135deg,
    rgba(21, 101, 192, 0.1),
    rgba(41, 182, 246, 0.12)
  );
}

/* Footer — brand gradient */
.bg-footer-gradient {
  background: linear-gradient(
    180deg,
    var(--color-primary) 0%,
    var(--color-footer-to) 100%
  );
}

/* Filter for primary color on images */
.filter-primary {
  filter: invert(24%) sepia(87%) saturate(1786%) hue-rotate(194deg)
    brightness(94%) contrast(92%);
}

/* Offcanvas menu open state */
.offcanvas-open {
  transform: translateX(0) !important;
}

.overlay-visible {
  display: block !important;
}

/* Ordered list styling for terms & conditions */
ol.list-decimal > li.list-item {
  list-style-position: inside;
  margin-left: 0;
  padding: 1rem;
}

ol.list-decimal > li.list-item::marker {
  font-weight: bold;
  color: var(--color-text);
}

ol.list-decimal > li.list-item > h6 {
  display: inline;
  margin-left: 0.5rem;
  margin-bottom: 0;
}

/* OTP input active state */
.otp-input.otp-active,
.otp-input:focus {
  border-width: 2px !important;
  border-color: var(--color-primary) !important;
}

/* Menu overlay - semi-transparent backdrop */
#menuOverlay {
  background-color: rgba(26, 35, 126, 0.35) !important;
}
