/* 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 {
  --color-primary: #4a4a6b;
  --color-secondary: #ff9f41;
  --color-primary-hover: #3a3a5b;
  --color-text: #000000;
  --color-text-light: #666666;
  --color-background: #ffffff;
  --color-background-alt: #f5f5f5;
  --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);
}

.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 {
  color: white !important;
}

/* All buttons - make text black on hover (except sidebar links) */
button:hover,
button:hover span,
button:hover .text-white,
.btn-quiz-play:hover,
.btn-quiz-play:hover span,
.btn-quiz-unsubscribe:hover,
.start-quiz-btn:hover {
  color: #000000 !important;
}

/* Primary gradient buttons - make text black on hover */
button.bg-gradient-to-r:hover,
button.bg-gradient-to-r:hover span,
button.hover\:from-primary-hover:hover,
button.hover\:from-primary-hover:hover span,
button.hover\:to-primary:hover,
button.hover\:to-primary:hover span {
  color: #000000 !important;
}

/* Buttons with primary background on hover - make text black */
button.hover\:bg-primary:hover,
button.hover\:bg-primary:hover span,
button.hover\:bg-primary-hover:hover,
button.hover\:bg-primary-hover:hover span {
  color: #000000 !important;
}

/* Override for buttons with hover:text-white class - change to black */
button.hover\:text-white:hover,
button.hover\:text-white:hover span {
  color: #000000 !important;
}

/* Buttons with text-white class - make text black on hover */
button.text-white:hover,
button.text-white:hover span {
  color: #000000 !important;
}

/* Links styled as buttons - make text black on hover */
a.btn-quiz-play:hover,
a.btn-quiz-unsubscribe:hover,
a.btn-quiz-play:hover span,
a.btn-quiz-unsubscribe:hover span {
  color: #000000 !important;
}

/* Subscription pack buttons (links) - make text black on hover */
a.subscription-pack-btn:hover,
a.subscription-pack-btn:hover span,
a.subscription-pack-btn:hover .text-white,
a.text-white.subscription-pack-btn:hover,
a.text-white.subscription-pack-btn:hover span {
  color: #000000 !important;
}

/* Links with text-white class - make text black on hover */
a.text-white:hover,
a.text-white:hover span {
  color: #000000 !important;
}

/* Links with gradient backgrounds - make text black on hover */
a.bg-gradient-to-r:hover,
a.bg-gradient-to-r:hover span,
a.hover\:from-primary-hover:hover,
a.hover\:from-primary-hover:hover span,
a.hover\:to-primary:hover,
a.hover\:to-primary:hover span {
  color: #000000 !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;
}

/* Quiz Winner Section Styling */
.quiz-winner-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.quiz-winner-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.quiz-winner-item.first-place {
  justify-content: center;
}

.quiz-winner-item .badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.quiz-winner-item img {
  border-radius: 50%;
  border: 2px solid #e5e7eb;
}

/* Tournament Card Styling */
.tournament-card {
  position: relative;
  min-height: 145px;
}

.tournament-front-img {
  max-width: 80px;
  max-height: 60px;
  object-fit: contain;
}

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

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

/* 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;
  }
}

/* Filter for primary color on images */
.filter-primary {
  filter: brightness(0) saturate(100%) invert(28%) sepia(8%) saturate(800%)
    hue-rotate(220deg) brightness(90%) contrast(95%);
}

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

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

/* Menu overlay - semi-transparent backdrop */
#menuOverlay {
  background-color: rgba(0, 0, 0, 0.25) !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: black;
}

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;
}

/* Phone number input placeholder color - blackish */
#phoneInput::placeholder {
  color: #333333 !important;
  opacity: 1;
}

#phoneInput::-webkit-input-placeholder {
  color: #333333 !important;
  opacity: 1;
}

#phoneInput::-moz-placeholder {
  color: #333333 !important;
  opacity: 1;
}

#phoneInput:-ms-input-placeholder {
  color: #333333 !important;
  opacity: 1;
}
