/* ============================================================
   WORLD OF GAMES — Portal Theme
   Design authority: https://ro.world-of-games.net/home
   Palette: dark navy rgb(9,20,49) · white · Poppins
   Editions: RO (msisdn), TR (user_password), AT (de/msisdn), PL (user_password)
   ============================================================ */

/* The portal loads the legacy Poppins font through next/font/google. */

/* ── Brand palette ─────────────────────────────────────────── */
:root {
  --wog-navy:           rgb(9, 20, 49);
  --wog-navy-surface:   rgb(14, 28, 66);    /* cards / nav bg */
  --wog-navy-elevated:  rgb(20, 38, 88);    /* dropdown bg    */
  --wog-white:          #ffffff;
  --wog-white-64:       rgba(255, 255, 255, 0.64);
  --wog-white-24:       rgba(255, 255, 255, 0.24);
  --wog-white-12:       rgba(255, 255, 255, 0.12);
  --wog-accent:         #c20a25;            /* legacy navigation and links */
  --wog-accent-hover:   #c20a25;
  --wog-red:            #c20a25;
  --wog-red-hover:      #c20a25;
  --wog-focus-ring:     rgba(194, 10, 37, 0.6);
}

/* ── Global resets for theme scope ──────────────────────────── */
body.theme-world-of-games {
  font-family: var(--font-poppins), "Poppins", sans-serif;
  background-color: var(--wog-navy) !important;
  color: var(--wog-white) !important;
}

/* ── Semantic token overrides ───────────────────────────────── */
.theme-world-of-games {
  /* Font */
  --font-family-base:    var(--font-poppins), "Poppins", sans-serif;
  --font-family-display: var(--font-poppins), "Poppins", sans-serif;

  /* Page */
  --background:          var(--wog-navy);
  --foreground:          var(--wog-white);
  --color-bg-base:       var(--wog-navy);
  --color-bg-card:       var(--wog-navy-surface);

  /* Text */
  --color-text-base:     var(--wog-white);
  --color-text-muted:    var(--wog-white-64);
  --color-text-inverse:  var(--wog-navy);

  /* Surface */
  --color-surface-base:       var(--wog-white);
  --color-surface-base-op-16: var(--wog-navy-surface);
  --color-surface-base-op-32: rgba(255, 255, 255, 0.32);

  /* Border */
  --color-border:        var(--wog-white-12);

  /* Primary / accent */
  --color-primary:       var(--wog-red);
  --primary-500:         var(--wog-red);
  --primary-400:         var(--wog-accent);
  --primary-300:         var(--wog-accent-hover);
  --secondary-600:       var(--wog-red-hover);

  /* Gradient (used by .btn-tertiary) */
  --gradient-primary-secondary: linear-gradient(
    112deg,
    var(--wog-accent)  0%,
    var(--wog-red)     100%
  );

  /* Focus outline */
  --color-focus-outline: var(--wog-accent);

  /* Input */
  --color-input-bg:     var(--wog-navy-surface);
  --color-input-border: var(--wog-white-24);

  /* Icon */
  --color-icon-default: var(--wog-white);

  /* ── Header tokens ── */
  --header-bg:          var(--wog-navy);
  --wog-search-button-bg: #214aae;
  --header-border:      var(--wog-white-12);
  --header-shadow:      0 2px 12px rgba(0, 0, 0, 0.5);
  --header-height:      64px;

  /* ── Nav tokens ── */
  --nav-link-color:          var(--wog-white);
  --nav-link-color-hover:    var(--wog-white);
  --nav-dropdown-bg:         var(--wog-navy-elevated);
  --nav-dropdown-border:     var(--wog-white-12);
  --nav-dropdown-shadow:     0 8px 32px rgba(0, 0, 0, 0.6);
  --nav-dropdown-item-hover: var(--wog-white-12);

  /* ── Footer tokens ── */
  --footer-bg:           var(--wog-navy);
  --footer-border:       var(--wog-white-12);
  --footer-text:         var(--wog-white-64);
  --footer-link-hover:   var(--wog-white);

  /* ── Dropdown / language selector ── */
  --color-dropdown-bg:            var(--wog-navy-elevated);
  --color-dropdown-border:        var(--wog-white-12);
  --color-dropdown-hover:         var(--wog-white-12);
  --color-dropdown-text:          var(--wog-white);
  --color-dropdown-text-selected: var(--wog-accent);
  --color-dropdown-item-selected: var(--wog-accent);
  --bg-dropdown-item-selected:    rgba(194, 10, 37, 0.15);
  --bg-dropdown-item-selected-hover: rgba(194, 10, 37, 0.25);

  /* Neutral overrides */
  --neutral-800: rgba(255, 255, 255, 0.2);
  --neutral-950: var(--wog-navy);
}

/* SDK feature panels use these surface tokens independently of the theme prop.
   Keep overrides inside For You so other portal surfaces retain their palette. */
.theme-world-of-games .wog-foryou-theme {
  --color-surface-base: var(--color-bg-card);
  --neutral-10: var(--color-bg-base);
}

/* The SDK carousel's white arrow buttons inherit white text from the portal.
   Set the SVG stroke explicitly so both chevrons stay visible on their discs. */
.theme-world-of-games .wog-foryou-theme .faceswap-col-left button.bg-white,
.theme-world-of-games .wog-foryou-theme .faceswap-col-left button.bg-white svg {
  color: var(--color-text-inverse);
}
.theme-world-of-games .wog-foryou-theme .faceswap-col-left button.bg-white svg {
  stroke: var(--color-text-inverse);
}

/* Consentimiento SDK: botones y separadores con colores del portal. */
/* En pantallas bajas el banner debe desplazarse dentro de la ventana para alcanzar sus botones. */
body.theme-world-of-games .cc-overlay {
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.theme-world-of-games .cc-btn-essential {
  background-color: var(--wog-red);
}

body.theme-world-of-games .cc-settings-sep,
body.theme-world-of-games .cc-settings-footer {
  border-color: var(--wog-white-24);
}

/* La banda de atención del raíz es gris, con enlaces del mismo tamaño que el texto. */
body.theme-world-of-games .customer-care {
  background-color: #eeeeee;
  color: #091431;
}

body.theme-world-of-games .customer-care p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.theme-world-of-games .customer-care a {
  color: #091431;
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
}

body.theme-world-of-games .customer-care a[href^="tel:"] {
  text-decoration: none;
}

body.theme-world-of-games .customer-care a:hover,
body.theme-world-of-games .customer-care a:focus-visible {
  text-decoration: underline;
}

body.theme-world-of-games .customer-care .customer-care-phone-icon {
  margin-left: 8px;
  vertical-align: middle;
}

body.theme-world-of-games .customer-care .customer-care-phone-icon img {
  width: 15px;
  height: 15px;
}

@media (max-width: 991px) {
  body.theme-world-of-games .customer-care {
    padding: 0;
  }

  body.theme-world-of-games .wog-customer-care-intro {
    display: block;
    height: 26px;
    font-size: 12px;
    font-weight: 600;
    line-height: 26px;
  }

  body.theme-world-of-games .wog-customer-care-actions {
    display: flex;
    height: 31px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
  }

  body.theme-world-of-games .wog-customer-care-intro a[href^="tel:"] {
    position: relative;
    top: 2px;
  }

  body.theme-world-of-games .wog-customer-care-actions a:not([href^="tel:"]) {
    position: relative;
    left: -4px;
    line-height: 23px;
  }

  body.theme-world-of-games .customer-care .customer-care-phone-icon {
    height: 26px;
    margin-left: 0;
    align-items: center;
  }
}

@media (min-width: 992px) {
  body.theme-world-of-games .customer-care {
    min-height: 36px;
  }

  body.theme-world-of-games .wog-customer-care-intro {
    font-size: 18px;
  }

  body.theme-world-of-games .customer-care a {
    font-size: 20px;
  }

  body.theme-world-of-games .customer-care .customer-care-phone-icon img {
    width: 18px;
    height: 18px;
  }

  /* Align the Romanian phone icon and cancellation link with the legacy banner. */
  body.theme-world-of-games .customer-care[data-website-id="ro-wog-dev-ro-v4"] .customer-care-phone-icon {
    margin-left: 9px;
    position: relative;
    left: -5px;
  }

  body.theme-world-of-games .customer-care[data-website-id="ro-wog-dev-ro-v4"] .wog-customer-care-actions a:not([href^="tel:"]) {
    position: relative;
    left: 4px;
  }
}

/* ── World of Games header ──────────────────────────────────── */

.wog-header {
  background-color: var(--header-bg);
  font-family: "Poppins", sans-serif;
}

@media (min-width: 992px) {
  .wog-header-main {
    position: relative;
    max-width: 960px;
    padding-inline: 0;
  }

  .wog-header-nav {
    position: absolute;
    z-index: 1;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
  }

  .wog-header-account {
    position: relative;
    top: 8px;
  }

  .wog-header-account > .btn-sm {
    position: relative;
    top: 15px;
  }
}

/* Nav links */
.wog-nav-link {
  color: var(--nav-link-color);
  font-weight: 600;
  font-size: 14px;
  line-height: 23px;
  letter-spacing: normal;
  transition: color 150ms ease;
  white-space: nowrap;
  padding-inline: 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.wog-nav-link:hover,
.wog-nav-link:focus-visible {
  color: var(--nav-link-color-hover);
  outline: none;
}

.wog-nav-link:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Legacy header exposes login as a plain text action, not a filled CTA. */
.wog-header-auth.btn-sm {
  position: relative;
  top: 16.5px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--wog-white);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 25px;
  font-weight: 600;
}

.wog-header-auth.btn-sm:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 992px) {
  .wog-header-account {
    gap: 28px;
  }

  .wog-header-account > a {
    position: relative;
    top: 13.5px;
  }

  html[lang="pl"] .wog-header-auth.btn-sm {
    position: relative;
    top: 16.5px;
    left: 10px;
    width: 109px;
    font-size: 16px;
    line-height: 25px;
    text-align: center;
    white-space: pre-line;
  }
}

/* Dropdown trigger button */
.wog-dropdown-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--nav-link-color);
  font-weight: 600;
  font-size: 14px;
  line-height: 23px;
  letter-spacing: normal;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  white-space: nowrap;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.wog-dropdown-trigger:hover,
.wog-dropdown-trigger:focus-visible {
  color: var(--nav-link-color-hover);
  outline: none;
}

.wog-dropdown-trigger:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (min-width: 992px) {
  .wog-dropdown-trigger { height: 51px; }
}

.wog-dropdown-trigger .wog-dropdown-label {
  position: relative;
  top: 1px;
}

.wog-dropdown-trigger[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 5%;
  right: 5%;
  height: 1px;
  background-color: #fc5555;
}

/* Chevron del raíz: mantiene orientación al abrir el menú. */
.wog-dropdown-trigger .wog-chevron {
  position: relative;
  top: 2px;
  filter: brightness(0) invert(1);
}

/* Dropdown panel */
.wog-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 153px;
  background-color: #262c37;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  z-index: 200;
  /* Animations via tw-animate-css / Tailwind data attribute */
}

.wog-dropdown-panel[data-state="open"] {
  animation: wog-dropdown-in 160ms ease forwards;
}

.wog-dropdown-panel[data-state="closed"] {
  animation: wog-dropdown-out 120ms ease forwards;
}

@keyframes wog-dropdown-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes wog-dropdown-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .wog-dropdown-panel[data-state="open"],
  .wog-dropdown-panel[data-state="closed"] {
    animation: none;
  }
}

/* Dropdown items */
.wog-dropdown-item {
  display: block;
  padding: 6px 12px;
  line-height: 24px;
  color: var(--wog-white);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}

.wog-dropdown-item:hover,
.wog-dropdown-item:focus-visible {
  background-color: var(--nav-dropdown-item-hover);
  color: var(--wog-white);
  outline: none;
}

.wog-dropdown-item:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: -2px;
}

/* ── World of Games footer ──────────────────────────────────── */

.wog-footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  font-family: "Poppins", sans-serif;
}

.wog-footer-link {
  color: var(--footer-text);
  font-size: 0.8125rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1.5;
}

.wog-footer-link:hover,
.wog-footer-link:focus-visible {
  color: var(--footer-link-hover);
  outline: none;
  text-decoration: underline;
}

.wog-footer-link:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Password Reset overrides ───────────────────────────────── */

.pr-page {
  background-color: var(--wog-navy);
  font-family: "Poppins", sans-serif;
  color: var(--wog-white);
}

.pr-card {
  background-color: var(--wog-navy-surface);
  border-color: var(--wog-white-12);
  border-radius: 16px;
  max-width: 480px;
}

.pr-title  { color: var(--wog-white); font-size: 28px; font-weight: 700; }
.pr-subtitle { color: var(--wog-white-64); }
.pr-label  { color: var(--wog-white); font-size: 18px; }

.pr-input {
  background-color: var(--wog-navy-elevated);
  border-color: var(--wog-white-12);
  color: var(--wog-white);
  border-radius: 999px;
}

.pr-input:focus {
  border-color: var(--wog-accent);
  outline: none;
}

.pr-btn {
  background-color: var(--wog-red) !important;
  color: #ffffff !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
}

.pr-btn:hover:not(:disabled) { opacity: 0.9; }
.pr-error-msg  { color: #fc8181; }
.pr-success-text { color: var(--wog-white); }
.pr-logo { max-height: 56px; }
