/* ============================================================
   Rouge Play Theme — rouge-play.css
   Covers: rougeplayfrv4, rougeplaybev4, rouge-play-be-nl-be-v4
   Background: LIGHT (#ffffff white)
   Primary: #D9252E (red)
   Header: black
   Footer: black
   ============================================================ */

/* ── Avenir_Medium font (exact legacy source) ────────────── */
@font-face {
  font-family: Avenir_Book;
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/rouge-play/font/Avenir-Book.ttf")
    format("truetype");
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: Avenir_Heavy;
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/rouge-play/font/Avenir-Heavy.ttf")
    format("truetype");
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: Avenir_Roman;
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/rouge-play/font/Avenir-Roman.ttf")
    format("truetype");
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: Avenir_Medium;
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/rouge-play/font/Avenir-Medium.ttf")
    format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root,
.theme-rouge-play {
  /* ── Surfaces ─────────────────────────────────────── */
  --color-bg-base: #ffffff;
  --color-bg-card: #f5f5f5;
  --color-bg-elevated: #eeeeee;
  --color-bg-header: #000000;
  --color-bg-footer: #000000;
  --footer-bg: #000000;
  --footer-border: #222222;

  /* ── Text ─────────────────────────────────────────── */
  --color-text-base: #111111;
  --color-text-muted: #666666;
  --color-text-inverse: #ffffff;
  --color-on-accent: #ffffff;

  /* ── Brand ────────────────────────────────────────── */
  --color-primary: #d9252e;
  --color-primary-accessible: #df2933;
  --color-primary-hover: #b51e26;
  --color-primary-light: rgba(217, 37, 46, 0.12);
  --primary-300: #e97b81;
  --primary-400: #d9252e;
  --primary-500: #d9252e;
  --primary-600: #b51e26;
  --primary: #d9252e;
  --ring: #d9252e;
  --color-brand-accent-500: #d9252e;
  --color-brand-accent-600: #b51e26;

  /* ── Tokens del CredentialsPopup de next_template ─────────────────────────
     El popup pinta un degradado primary-500 → secondary-500 con círculos accent,
     una caja translúcida oscura (base-dark-op-80) y los campos sobre
     surface-soft-op-90 con texto text-inverse (blanco). Se definen con la paleta de
     Rouge Play (rojo de marca → negro) para que el componente salga legible en este
     tema claro. */
  --color-brand-primary-500: #d9252e;
  --color-brand-secondary-500: #000000;
  --color-base-dark-op-80: rgba(0, 0, 0, 0.8);
  --color-base-light-op-64: rgba(255, 255, 255, 0.64);
  --color-surface-soft-op-90: rgba(0, 0, 0, 0.9);
  --color-icon-base: #ffffff;

  /* ── Button text (override globals.css dark default) ── */
  --primary-foreground: #ffffff;

  /* ── Input ────────────────────────────────────────── */
  --color-input-bg: #f5f5f5;
  --color-input-border: #dddddd;

  /* ── Border ───────────────────────────────────────── */
  --color-border: #e0e0e0;
  --color-border-muted: #eeeeee;

  /* ── State ────────────────────────────────────────── */
  --color-error: #e53e3e;
  --color-success: #38a169;

  /* ── Radius ───────────────────────────────────────── */
  --radius-card: 8px;
  --radius-btn: 4px;
  --radius-input: 2px;

  /* ── Gradient ─────────────────────────────────────── */
  --gradient-primary: linear-gradient(135deg, #d9252e 0%, #b51e26 100%);
  --gradient-primary-secondary: linear-gradient(135deg, #d9252e 0%, #b51e26 100%);
  --gradient-hero-overlay: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );

  /* ── Shadows ──────────────────────────────────────── */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.16);

  /* ── Typography (Avenir_Medium — exact legacy font) ── */
  --font-family-base: Avenir_Medium, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-family-display: Avenir_Medium, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* shadcn/webs-sdk semantic aliases */
  --background: #ffffff;
  --foreground: #111111;
  --card: #f5f5f5;
  --card-foreground: #111111;
  --popover: #ffffff;
  --popover-foreground: #111111;
  --border: #e0e0e0;
  --input: #dddddd;
  --color-text-primary: #111111;
  --color-text-secondary: #666666;
  --color-border-divider: #e0e0e0;
}

/* Override the template's dark body defaults for this LIGHT portal */
body.theme-rouge-play,
.theme-rouge-play body {
  background-color: var(--color-bg-base) !important;
  color: var(--color-text-base) !important;
  font-family: var(--font-family-base);
  --background: #ffffff;
  --foreground: #111111;
  --primary-foreground: #ffffff;
  --gradient-primary-secondary: linear-gradient(135deg, #d9252e 0%, #b51e26 100%);
}

.theme-rouge-play .font-avenir-book {
  font-family: Avenir_Book, sans-serif;
}

.theme-rouge-play .font-avenir-heavy {
  font-family: Avenir_Heavy, sans-serif;
}

.theme-rouge-play .font-avenir-medium {
  font-family: Avenir_Medium, sans-serif;
}

.theme-rouge-play .font-avenir-roman {
  font-family: Avenir_Roman, sans-serif;
}

.theme-rouge-play .signup-desktop-overlay {
  display: none;
}

/* Login follows legacy's flat, compact layout instead of template modal UI. */
.theme-rouge-play .signup-container {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  min-height: 0;
  overflow: visible;
}

.theme-rouge-play .login-content {
  display: flex;
  flex: none;
  justify-content: flex-start;
  padding: 18px 12px 30px !important;
  gap: 0;
}

.theme-rouge-play .login-content > div {
  max-width: 420px;
}

.theme-rouge-play .login-content [data-slot="card"] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.theme-rouge-play .login-content [data-slot="card-header"] {
  margin-bottom: 31px;
}

.theme-rouge-play .login-content [data-slot="card-title"] {
  font-family: Avenir_Heavy, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 41px;
}

.theme-rouge-play .login-content [data-slot="field-label"] {
  padding-left: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
}

.theme-rouge-play .login-content [data-slot="field"] {
  gap: 12px;
}

.theme-rouge-play .login-content [data-slot="input-group"] {
  min-height: 42px;
  height: 42px;
}

.theme-rouge-play .login-content [data-slot="input-group-addon"]:first-child {
  display: none;
}

.theme-rouge-play .login-content [data-slot="input-group-control"] {
  min-height: 40px;
  padding-left: 12px;
  font-size: 12px;
}

.theme-rouge-play .login-content .btn-tertiary,
.theme-rouge-play .login-content .btn-tertiary:disabled {
  color: #ffffff;
}

.theme-rouge-play .login-content .btn-tertiary:disabled {
  background: #e97b81 !important;
}

.theme-rouge-play .login-content .btn-lg {
  min-height: 42px;
  height: 42px;
  margin-top: 14px;
}

.theme-rouge-play .login-content .login-no-account {
  margin-top: -4px;
  line-height: 26px;
}

@media (min-width: 768px) {
  .theme-rouge-play .login-content [data-slot="field-label"] {
    font-size: 16px;
    line-height: 1.3;
  }

  .theme-rouge-play .login-content .btn-lg {
    min-height: 54px;
    height: 54px;
    margin-top: 6px;
  }

  .theme-rouge-play .login-content .login-no-account {
    margin-top: -12px;
  }
}

/* Legacy login action is a pill; do not apply this to unrelated buttons. */
.theme-rouge-play .login-content .btn-base {
  border-radius: 100px;
}

/* ── Footer: black background, #f5f5f5 uniform links ────── */
.theme-rouge-play footer {
  background-color: #000000;
  border-top-color: #222222;
  color: #f5f5f5;
}

/* All footer links: same #f5f5f5 — no red exceptions */
.theme-rouge-play footer a,
.theme-rouge-play footer nav a,
.theme-rouge-play footer [role="button"] {
  color: #f5f5f5 !important;
  text-decoration-color: #f5f5f5;
}

.theme-rouge-play footer a:hover,
.theme-rouge-play footer nav a:hover,
.theme-rouge-play footer [role="button"]:hover {
  color: #ffffff !important;
  opacity: 0.85;
}

/* Match the legacy footer separator and text rasterization exactly. */
.theme-rouge-play footer nav[aria-label="Legal"] {
  border-top-color: rgba(215, 215, 215, 0.15);
}

.theme-rouge-play footer .footer-legacy-offset,
.theme-rouge-play footer .footer-legacy-offset-mobile {
  transform: translateY(1px);
}

@media (min-width: 1024px) {
  .theme-rouge-play footer .footer-legacy-offset-mobile {
    transform: none;
  }
}

.theme-rouge-play footer .footer-nav-link {
  display: inline-flex;
  height: 26px;
  align-items: center;
  padding: 0 8px;
  border-radius: 0;
  color: #f5f5f5 !important;
  font-family: Avenir_Medium, sans-serif;
  font-size: 12px;
  font-weight: 300;
  line-height: 26px;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  transition: color 160ms ease;
}

@media (max-width: 1023px) {
  .theme-rouge-play footer a,
  .theme-rouge-play footer nav a,
  .theme-rouge-play footer .footer-nav-link {
    color: #ffffff !important;
  }
}

.theme-rouge-play footer .footer-nav-link:hover {
  background-color: transparent;
  color: #ffffff !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  opacity: 1;
}

.theme-rouge-play footer .footer-nav-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ── Cookie Consent: exact BE-NL legacy banner geometry ───── */
.theme-rouge-play .cc-overlay {
  bottom: 24px;
  z-index: 9999999 !important;
  padding: 0;
}

.theme-rouge-play .cc-banner {
  width: 80%;
  max-width: none;
  margin-inline: auto;
  padding: 18px 72px;
  background-color: #ffffff;
  color: #323232;
  border: 1px solid #808080 !important;
  border-radius: 0 !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.36) !important;
  display: block;
}

.theme-rouge-play .cc-title {
  color: #111111;
}

.theme-rouge-play .cc-content {
  display: flex;
  min-height: 58px;
  align-items: center;
}

.theme-rouge-play .cc-description {
  color: #323232;
  font-size: 16px;
  line-height: 1.5;
  opacity: 1;
}

.theme-rouge-play .cc-inline-config,
.theme-rouge-play .cc-inline-policy {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.theme-rouge-play .cc-link {
  color: #d9252e;
}

/* Actions occupy their own row below the legal copy. */
.theme-rouge-play .cc-actions {
  display: flex;
  width: 100%;
  height: 58px;
  margin-top: 0;
  padding: 24px 6px 0;
  box-sizing: border-box;
  gap: 12px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.theme-rouge-play .cc-btn-accept,
.theme-rouge-play .cc-btn-essential {
  min-height: 34px;
  padding: 6px 24px;
  border-radius: 3px;
  background: #d9252e !important;
  color: #ffffff !important;
  border: 0 !important;
  font-family: Avenir_Medium, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.theme-rouge-play .cc-btn-essential {
  order: 1;
}

.theme-rouge-play .cc-btn-accept {
  order: 2;
}

/* Settings is linked inline in the legal sentence. */
.theme-rouge-play .cc-banner:has(.cc-inline-config) .cc-config-link {
  display: none;
}

@media (max-width: 639px) {
  .theme-rouge-play .cc-overlay {
    bottom: 3px;
  }

  .theme-rouge-play .cc-banner {
    width: 98%;
    padding: 18px 5vw;
  }

  .theme-rouge-play .cc-content {
    min-height: 130px;
  }

  .theme-rouge-play .cc-description {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 200;
    line-height: 26px;
  }

  .theme-rouge-play .cc-actions {
    height: 86px;
    padding: 12px 0 0;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .theme-rouge-play .cc-btn-accept,
  .theme-rouge-play .cc-btn-essential {
    width: 100%;
    min-height: 31px;
    height: 31px;
    padding-block: 4.5px;
    font-size: 14px;
  }
}

/* Settings panel: exact legacy layout and typography */
.theme-rouge-play .cc-title:empty {
  display: none;
}

.theme-rouge-play .cc-banner.cc-settings-mode {
  display: block;
}

.theme-rouge-play .cc-settings-title {
  height: 22px;
  margin: 0 0 19px;
  color: #323232;
  font-family: Avenir_Medium, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.theme-rouge-play .cc-settings-sep {
  display: none;
}

.theme-rouge-play .cc-category {
  position: relative;
  display: block;
  min-height: 58px;
  margin: 0 0 12px;
  padding-top: 5px;
  box-sizing: border-box;
}

.theme-rouge-play .cc-category:nth-last-child(2) {
  margin-bottom: 0;
}

.theme-rouge-play .cc-category-row {
  position: relative;
  display: block;
  height: 22px;
}

.theme-rouge-play .cc-category-label,
.theme-rouge-play .cc-category-label.cc-mandatory {
  display: block;
  color: #323232;
  font-family: Avenir_Medium, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  opacity: 1;
}

.theme-rouge-play .cc-category-desc {
  min-height: 20px;
  margin: 7px 0 0;
  padding-left: 25px;
  color: #323232;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 200;
  line-height: 20px;
  opacity: 1;
}

.theme-rouge-play .cc-checkbox {
  position: absolute;
  top: 32px;
  left: 0;
  width: 13px;
  height: 13px;
  margin: 0;
}

.theme-rouge-play .cc-settings-footer {
  display: flex;
  width: 100%;
  height: 58px;
  margin: 0;
  padding: 24px 6px 0;
  box-sizing: border-box;
  justify-content: flex-end;
  border: 0;
}

.theme-rouge-play .cc-settings-footer .cc-btn {
  min-height: 34px;
  padding: 6px 24px;
  border: 0;
  border-radius: 3px;
  background: #d9252e !important;
  color: #ffffff !important;
  font-family: Avenir_Medium, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

@media (max-width: 639px) {
  .theme-rouge-play .cc-settings-title {
    height: 19px;
    font-size: 14px;
    line-height: 19px;
  }

  .theme-rouge-play .cc-category {
    min-height: 85px;
  }

  .theme-rouge-play .cc-category-row {
    height: 19px;
  }

  .theme-rouge-play .cc-category-label,
  .theme-rouge-play .cc-category-label.cc-mandatory {
    font-size: 14px;
    line-height: 19px;
  }

  .theme-rouge-play .cc-category-desc {
    min-height: 54px;
    font-size: 14px;
    line-height: 18px;
  }

  .theme-rouge-play .cc-checkbox {
    top: 27px;
  }

  .theme-rouge-play .cc-settings-footer {
    height: 43px;
    padding: 12px 0 0;
  }

  .theme-rouge-play .cc-settings-footer .cc-btn {
    width: 100%;
    min-height: 31px;
    height: 31px;
    padding: 4.5px 24px;
    font-size: 14px;
  }
}
