/* Dialogs that only exist after a click: log in, register, reset, cookie preferences.
   Loaded asynchronously — see includes/head.php. */

/* Overlays: auth modals, age gate, cookie preferences.
   Geometry from millennialbet-login-modal / -registration-modal / -age-gate. */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 16, .82);
  backdrop-filter: blur(2px);
  animation: fade-in var(--t) ease both;
}
.modal__panel {
  position: relative;
  display: flex;
  width: 980px;
  max-width: 100%;
  border-radius: var(--r-40);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .6);
  animation: modal-in var(--t-slow) cubic-bezier(.16, 1, .3, 1) both;
}
.modal__panel--register { width: 1100px; border-radius: var(--r-36); }
.modal__panel--slim { width: 560px; }
.modal__panel--prefs { width: 720px; border-radius: var(--r-24); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

.modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #3a3a3a;
  border-radius: var(--r-10);
  color: var(--bone);
  font-size: 20px;
  line-height: 1;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.modal__close:hover { border-color: var(--red); color: var(--red); }

/* ---- red side panel ---- */
.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  width: 392px;
  flex: none;
  padding: 44px;
  background: var(--red);
  color: var(--bone);
}
.modal__panel--register .auth-side { width: 374px; padding: 40px; }
.auth-side__top { display: flex; flex-direction: column; gap: 32px; }
.auth-side__brand { display: flex; flex-direction: column; gap: 4px; }
.auth-side__word {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 28.29px;
  letter-spacing: 3px;
  color: var(--bone);
}
.auth-side__kicker {
  font-size: 11px;
  font-weight: 800;
  line-height: 14.3px;
  letter-spacing: 2px;
  opacity: .65;
}
.auth-side__kicker--solid { opacity: 1; }
.auth-side__copy { display: flex; flex-direction: column; gap: 16px; }
/* The mockup sets 64px inside a 304px column, so Figma itself breaks "WELCOME"
   mid-word. 52/49 is the display size the registration panel uses in the same file,
   and at that size the word fits the column whole. */
.auth-side__title { font-family: var(--font-display); font-size: 52px; line-height: 49px; }
.auth-side__title--sm { font-size: 52px; line-height: 49px; }
.auth-side__lede { font-size: 14px; line-height: 22px; opacity: .75; }
.auth-side__foot { display: flex; flex-direction: column; gap: 2px; }
.auth-side__foot-title { font-size: 12px; font-weight: 800; line-height: 16px; letter-spacing: 1px; opacity: .7; }
.auth-side__foot-line { font-size: 12px; line-height: 16px; opacity: .45; }
.auth-side__foot-line--faint { font-size: 11px; line-height: 14.3px; opacity: .35; }

/* ---- dark form panel ---- */
.auth-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 0;
  padding: 44px;
  background: #111111;
  color: var(--bone);
}
.auth-main--wide { gap: 20px; padding: 40px 48px; background: #0f1015; }
.modal__panel--slim .auth-main,
.modal__panel--prefs .auth-main { gap: 24px; }
.auth-main__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.auth-main__kicker {
  font-size: 11px;
  font-weight: 800;
  line-height: 14.3px;
  letter-spacing: 2.5px;
  color: var(--red-text);
}
.auth-main__title { font-family: var(--font-display); font-size: 44px; line-height: 48px; color: var(--bone); margin-top: 4px; }
.auth-main__title--sm { font-size: 32px; line-height: 35px; }
.auth-main__sub { font-size: 15px; line-height: 20px; color: var(--slate); margin-top: 4px; }

/* ---- checkboxes ---- */
.check { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { position: absolute; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.check__box {
  pointer-events: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid #4b5563;
  border-radius: var(--r-4);
  background: var(--surface-2);
  transition: background var(--t), border-color var(--t);
  position: relative;
}
.check__box::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--white);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.check input:checked + .check__box { background: var(--red); border-color: var(--red); }
.check input:checked + .check__box::after { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--red); outline-offset: 2px; }
.check__text { font-size: 12px; line-height: 18px; color: var(--slate); }
.check__text a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* ---- reset success ---- */
.auth-done { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.auth-done__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 255, 136, .12);
  color: var(--green-bright);
  font-size: 24px;
}
.auth-done__title { font-family: var(--font-display); font-size: 28px; line-height: 30.5px; color: var(--bone); }
.auth-done__body { font-size: 14px; line-height: 22px; color: var(--slate); }
.auth-done__body + .auth-fine a,
.auth-done a { color: var(--red); }

.prefs { display: flex; flex-direction: column; gap: 12px; }
.pref {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid #2a2a2f;
  border-radius: var(--r-12);
}
.pref__title { font-size: 15px; font-weight: 700; color: var(--bone); }
.pref__body { font-size: 13px; line-height: 19px; color: var(--slate); margin-top: 4px; }
.prefs__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

.switch { position: relative; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch__track {
  pointer-events: none;
  display: block;
  width: 48px;
  height: 28px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: #333338;
  transition: background var(--t);
}
.switch__knob {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bone);
  transition: transform var(--t);
}
.switch input:checked + .switch__track { background: var(--red); }
.switch input:checked + .switch__track .switch__knob { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--red); outline-offset: 3px; }
.switch--locked { opacity: .6; cursor: not-allowed; }


@media (max-width: 1199px) {

  .modal { padding: 0; place-items: stretch; }
  .modal__panel,
  .modal__panel--register,
  .modal__panel--slim,
  .modal__panel--prefs {
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    border-radius: 0;
  }
  .auth-side,
  .modal__panel--register .auth-side {
    width: auto;
    padding: 24px 16px;
    gap: 16px;
  }
  .auth-side__title { font-size: 36px; line-height: 39px; }
  .auth-side__title--sm { font-size: 28px; line-height: 30.5px; }
  .auth-side__copy { gap: 8px; }
  .auth-side__foot { display: none; }
  .auth-main,
  .auth-main--wide { padding: 24px 16px 40px; gap: 20px; }
  .auth-main__title { font-size: 32px; line-height: 35px; }
  .auth-main__title--sm { font-size: 26px; line-height: 29px; }
  .btn-auth { min-height: 52px; font-size: 15px; }

}
