/* Auth modal and search overlay — hand-built to match reference screenshots.
   The chat panel is built from the brand utility set inside
   `src/components/overlays/ChatPanel.vue`. */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(27, 29, 41, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.overlay-backdrop.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.overlay-backdrop .auth-modal {
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.overlay-backdrop.is-open .auth-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ---------- Auth modal ---------- */
.auth-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 600px;
  padding: 72px 48px 40px;
  border-radius: 48px;
  background: var(--color-base-11, #262c3e);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-modal__nav {
  position: absolute;
  top: 32px;
  left: 32px;
  display: flex;
  align-items: center;
}
.auth-modal__back {
  display: none;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: var(--font-oxanium);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
}
.auth-modal__step.is-active .auth-modal__back {
  display: inline-flex;
}
.auth-modal__close {
  position: absolute;
  top: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}
.auth-modal__logo {
  font-family: var(--font-oxanium);
  font-weight: 800;
  font-size: 44px;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 24px;
}
.auth-modal__step {
  display: none;
}
.auth-modal__step.is-active {
  display: block;
}
.auth-modal__label {
  color: var(--color-base-15, #a0acc7);
  font-size: 15px;
  margin-bottom: 24px;
}
.auth-modal__oauth-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}
.auth-modal__oauth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
}
.auth-modal__oauth-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-oxanium);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}
.auth-modal__field {
  display: block;
  width: 100%;
  max-width: 348px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid #8dfcc5;
  background: rgba(141, 252, 197, 0.05);
  box-shadow: 0 0 16px rgba(141, 252, 197, 0.25);
  color: #fff;
  font-size: 15px;
  padding: 0 22px;
  margin: 0 auto 12px;
  text-align: center;
  font-family: inherit;
}
.auth-modal__field::placeholder {
  color: var(--color-base-15, #a0acc7);
}
.auth-modal__field-wrap {
  position: relative;
  max-width: 348px;
  margin: 0 auto 12px;
}
.auth-modal__field-wrap .auth-modal__field {
  max-width: none;
  margin: 0;
  text-align: left;
  padding-right: 48px;
}
.auth-modal__eye {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-base-15, #a0acc7);
  cursor: pointer;
  display: flex;
}
.auth-modal__requirements {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 4px 0 20px;
}
.auth-modal__requirement {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-base-15, #a0acc7);
}
.auth-modal__requirement.met {
  color: #8dfcc5;
}
.auth-modal__requirement svg {
  width: 14px;
  height: 14px;
}
.auth-modal__submit {
  display: block;
  width: 100%;
  max-width: 348px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: #8dfcc5;
  color: #1b1d29;
  font-family: var(--font-oxanium);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin: 8px auto 0;
}
.auth-modal__submit:disabled {
  background: #4a6e6a;
  color: rgba(27, 29, 41, 0.6);
  cursor: default;
}
.auth-modal__forgot {
  display: block;
  margin-top: 18px;
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
}
.auth-modal__legal {
  margin-top: 18px;
  color: var(--color-base-15, #a0acc7);
  font-size: 12px;
  line-height: 1.5;
}
.auth-modal__legal a {
  color: #fff;
  text-decoration: underline;
}
.auth-modal__hint {
  margin-top: 10px;
  color: var(--color-base-15, #a0acc7);
  font-size: 12px;
}

/* ---------- Search overlay ---------- */
.search-panel {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 190;
  width: min(660px, calc(100vw - 48px));
  max-height: 80vh;
  border-radius: 32px;
  background: var(--color-base-13, #202433);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}
.search-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.search-panel__input-row {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.search-panel__input {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  font-family: inherit;
}
.search-panel__input::placeholder {
  color: var(--color-base-15, #a0acc7);
}
.search-panel__body {
  padding: 16px 24px;
  overflow-y: auto;
}
.search-panel__section-title {
  color: var(--color-base-15, #a0acc7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.search-panel__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.search-panel__tile {
  position: relative;
  aspect-ratio: 100 / 135;
}
.search-panel__tile-link {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-base-11, #262c3e);
}
.search-panel__tile:hover .thrill-fav {
  opacity: 1;
  pointer-events: auto;
}
.search-panel__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .search-panel__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Logged-in header ---------- */
#headerLoggedIn {
  display: none;
}
body.is-logged-in #headerLoggedOut {
  display: none;
}
body.is-logged-in #headerLoggedIn {
  display: flex;
}

/* ---------- Auth-only sidebar section (Recents / Favourites / My Bets) ---------- */
#authNavSection {
  display: none;
}
body.is-logged-in #authNavSection {
  display: flex;
}
#authNavSection [data-view].is-active-nav {
  background: var(--color-surface-selected-secondary, #2a3350);
}
#authNavSection [data-view].is-active-nav svg,
#authNavSection [data-view].is-active-nav p {
  color: var(--color-foreground-selected-secondary, #5cffc1);
}

/* ---------- View routing (Home / Recents / Favourites / My Bets / Account / Affiliate) ---------- */
#viewRecents,
#viewFavourites,
#viewMyBets,
#viewProfile,
#viewAccountDetails,
#viewPreferences,
#viewSecurity,
#viewVerification,
#viewAffiliateDashboard,
#viewAffiliateEarnings,
#viewAffiliateProgramDetails,
#viewAffiliateReferredUsers {
  display: none;
}
body[class*="route-"] #viewHome {
  display: none;
}
body.route-recents #viewRecents,
body.route-favourites #viewFavourites,
body.route-mybets #viewMyBets,
body.route-profile #viewProfile,
body.route-account-details #viewAccountDetails,
body.route-preferences #viewPreferences,
body.route-security #viewSecurity,
body.route-verification #viewVerification,
body.route-affiliate-dashboard #viewAffiliateDashboard,
body.route-affiliate-earnings #viewAffiliateEarnings,
body.route-affiliate-program-details #viewAffiliateProgramDetails,
body.route-affiliate-referred-users #viewAffiliateReferredUsers {
  display: block;
}
.user-header__chevron {
  color: var(--color-base-15, #a0acc7);
  font-size: 12px;
  pointer-events: none;
}
.user-header__avatar-wrap {
  position: relative;
  align-items: center;
}
.user-header__chevron--menu {
  transition: transform 0.2s ease;
}
.user-header__avatar-wrap.is-open .user-header__chevron--menu {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 210;
  width: max-content;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}
.user-menu:not(.is-open):not(.is-positioning) {
  display: none;
}
.user-menu.is-positioning > [data-dropdown-menu-content]::before {
  animation-play-state: paused;
}
.user-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* Preserve the menu hover state while moving across the submenu gap. */
.user-menu::after {
  position: absolute;
  top: 0;
  left: 100%;
  width: 12px;
  height: 100%;
  content: "";
}
/* The plate and its rows are styled from the markup, on the same utilities the
   reference uses. Only the two states Tailwind cannot see live here: the
   trigger whose submenu is open, which App.vue marks with `is-active` and the
   reference paints like a hovered row, and the rows that lead nowhere yet. */
.user-menu__item.is-active {
  background: var(--color-surface-5);
  color: var(--color-foreground-primary);
}
.user-menu__item--disabled,
.user-menu__item--disabled:hover {
  background: none;
  color: var(--color-foreground-muted-3);
  cursor: default;
  opacity: 0.5;
  transform: none;
}
.user-menu__submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  z-index: 211;
  width: max-content;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}
/* Hidden positioned elements still expand the document's scrollable area.
   Keep nested panels out of layout until their parent row opens them. */
.user-menu__submenu:not(.is-open) {
  display: none;
}
/* Preserve the visual gap while keeping the pointer within #userMenu. `::after`,
   not `::before`: the plate's blur layer is the `before:` pseudo-element. */
.user-menu__submenu::after {
  position: absolute;
  top: 0;
  right: 100%;
  bottom: 0;
  width: 12px;
  content: "";
}
.user-menu__submenu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.user-menu__submenu.opens-left {
  right: calc(100% + 12px);
  left: auto;
}
@media (max-width: 900px) {
  .user-menu__submenu,
  .user-menu__submenu.opens-left {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
  }
}

/* ---------- FAQ accordion (closed by default) ---------- */
[data-accordion-content][data-state="closed"] {
  display: none;
}
