/* ============================================================
   PSG THEME — Paris Saint-Germain (psg-mobile.com)
   Skin heredado del portal andromeda legacy (sin Figma).
   Medido sobre el legacy: body #fff, acento #ff1541, azul de barra #03508a,
   texto #1a2434, fuentes Switzer + Epilogue servidas por la CDN de la compañía.
   ============================================================ */

/* El legacy usa SIEMPRE la familia "Switzer-Medium" (un único fichero) para todo el texto base: los pesos 300-600 se
   sirven con ese mismo Medium (si se enlazara Switzer-Regular el texto saldría más fino que el raíz). */
@font-face {
  font-family: "Switzer";
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/PSG/Tipograf%C3%ADa/Switzer-Medium.otf") format("opentype");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Epilogue";
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/PSG/Tipograf%C3%ADa/Epilogue-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Epilogue";
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/PSG/Tipograf%C3%ADa/Epilogue-Bold.otf") format("opentype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

.theme-psg {
  --psg-red: #ff1541;
  --psg-red-dark: #d90f35;
  --psg-blue: #03508a;
  --psg-navy: #1a2434;
  --psg-grey: #eeeeee;

  --font-family-base: "Switzer", Arial, sans-serif;
  --font-family-display: "Epilogue", "Switzer", Arial, sans-serif;

  /* Tokens shadcn / globals.css (portal CLARO: el template nace oscuro) */
  --background: #ffffff;
  --foreground: var(--psg-navy);
  --card: #ffffff;
  --card-foreground: var(--psg-navy);
  --popover: #ffffff;
  --popover-foreground: var(--psg-navy);
  --primary: var(--psg-red);
  --primary-300: #ff6d88;
  --primary-400: var(--psg-red);
  --primary-500: var(--psg-red);
  --primary-600: var(--psg-red-dark);
  --secondary-600: var(--psg-red-dark);
  --primary-foreground: #ffffff;
  --secondary: #f3f4f6;
  --secondary-foreground: var(--psg-navy);
  --muted: #f3f4f6;
  --muted-foreground: #5b6575;
  --accent: #f3f4f6;
  --accent-foreground: var(--psg-navy);
  --destructive: #c8102e;
  --border: #d9dde3;
  --input: #d9dde3;
  --ring: var(--psg-red);

  /* Tokens semánticos del template */
  --color-bg-base: #ffffff;
  --color-bg-card: #ffffff;
  --color-text-base: var(--psg-navy);
  --color-text-base-op-64: rgba(26, 36, 52, 0.64);
  --color-text-base-op-88: rgba(26, 36, 52, 0.88);
  --color-text-muted: #5b6575;
  --color-text-inverse: #ffffff;
  --color-on-accent: #ffffff;
  --color-surface-base: #ffffff;
  --color-surface-base-op-16: #f3f4f6;
  --color-surface-elevated: #f3f4f6;
  --color-icon-default: var(--psg-navy);
  --color-input-bg: #ffffff;
  --color-input-border: #d9dde3;
  --color-border: #d9dde3;
  --color-error: #c8102e;
  --gradient-primary: linear-gradient(112deg, var(--psg-red) 0%, var(--psg-red-dark) 100%);
  --gradient-primary-secondary: var(--gradient-primary);
  --color-dropdown-bg: #ffffff;
  --color-dropdown-border: #d9dde3;
  --color-dropdown-hover: #f3f4f6;
  --color-dropdown-text: var(--psg-navy);
  --color-dropdown-text-selected: var(--psg-red);
  --radius-card: 12px;

  /* Cabecera / pie */
  --header-bg: #ffffff;
  --header-shadow: 0 0 12px rgba(0, 0, 0, 0.5); /* legacy: sombra de la barra azul */
  --footer-bg: var(--psg-blue);
  --footer-border: var(--psg-blue);
  --psg-nav-bg: var(--psg-blue);
  --psg-nav-text: #ffffff;
  --psg-nav-active: #bec1c5; /* legacy .nav-item.active */
}

/* El <body> del layout lleva clases fijas del template: se fuerza el skin claro. */
body.theme-psg {
  background-color: #ffffff !important;
  color: var(--psg-navy) !important;
  font-family: var(--font-family-base);
}

.theme-psg h1,
.theme-psg h2,
.theme-psg h3 {
  font-family: var(--font-family-display);
}

/* Barra superior de atención al cliente (banner legal): gris claro, texto negro, como el legacy. */
.theme-psg .customer-care {
  background-color: var(--psg-grey);
  color: #000000;
}
.theme-psg .customer-care a {
  color: var(--psg-red);
}

/* Banner de cookies: botones y enlaces con el rojo PSG */
.theme-psg .psg-btn,
.theme-psg [data-slot="button"][data-variant="default"] {
  background: var(--psg-red);
  color: #ffffff;
}
.theme-psg .psg-btn:hover,
.theme-psg [data-slot="button"][data-variant="default"]:hover {
  background: var(--psg-red-dark);
}

.theme-psg a:focus-visible,
.theme-psg button:focus-visible {
  outline: 2px solid var(--psg-red);
  outline-offset: 2px;
}

.theme-psg .no-scrollbar { scrollbar-width: none; }
.theme-psg .no-scrollbar::-webkit-scrollbar { display: none; }
.theme-psg .font-display { font-family: var(--font-family-display); }

/* ============================================================
   Banner de cookies (CookieConsent de webs-sdk) — como el legacy:
   sin título, enlaces rojos subrayados en el texto, y en móvil una
   tarjeta a ancho completo con los botones rojos apilados al 100%.
   ============================================================ */
.theme-psg .cc-title:empty { display: none; }
.theme-psg .cc-config-link { display: none; }
/* Orden como el legacy: "Refuser cookies" a la izquierda, "Accepter les cookies" a la derecha (escritorio). */
.theme-psg .cc-actions { flex-direction: row-reverse; }
.theme-psg .cc-inline-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--psg-red);
  text-decoration: underline; /* legacy: enlaces en negrita roja subrayados */
  cursor: pointer;
}
/* Escritorio: popup del legacy (`.cmp-popup-cookies`): 1024px centrado a 24px del borde inferior, texto arriba y los
   dos botones rojos de 33px a la derecha; borde 1px #808080, sin radios y sombra 0 0 5px. */
@media (min-width: 640px) {
  .theme-psg .cc-overlay { padding: 0 0 24px; }
  .theme-psg .cc-banner {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 24px;
    width: 1024px;
    max-width: calc(100vw - 32px);
    padding: 18px 64px;
    border: 1px solid #808080;
    border-radius: 0 !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.36) !important;
  }
  .theme-psg .cc-description { margin: 6px 0 2px; font-size: 16px; line-height: 23px; font-weight: 400; color: #323232 !important; opacity: 1; }
  .theme-psg .cc-actions { justify-content: flex-start; gap: 12px; } /* row-reverse: flex-start = borde derecho */
  .theme-psg .cc-actions .cc-btn {
    height: 33px;
    padding: 6px 24px;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 400;
    line-height: 21px;
    background: var(--psg-red) !important;
    color: #ffffff !important;
    border: 0 !important;
  }
}
@media (max-width: 639px) {
  .theme-psg .cc-overlay { padding: 4px; }
  .theme-psg .cc-banner {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    padding: 18px 19.5px;
    border: 1px solid #808080;
    border-radius: 0 !important;
    max-width: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.36) !important;
  }
  .theme-psg .cc-description { margin: 6px 0 2px; font-size: 14px; line-height: 24.2px; font-weight: 400; color: #323232 !important; opacity: 1; }
  .theme-psg .cc-actions { flex-direction: column-reverse; align-items: stretch; width: 100%; gap: 12px; }
  .theme-psg .cc-actions .cc-btn {
    width: 100%;
    padding: 6px 24px;
    height: 31px;
    line-height: 19px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 400;
    background: var(--psg-red) !important;
    color: #ffffff !important;
    border: 0 !important;
  }
}

/* Sin scroll horizontal por contenedores w-screen (100vw incluye la barra de scroll en escritorio) */
html:has(body.theme-psg),
body.theme-psg { overflow-x: clip; }

/* El texto del popup de cookies del legacy va en Helvetica (no en Switzer): se mide con font-family computado. */
.theme-psg .cc-description,
.theme-psg .cc-description .cc-inline-link { font-family: Helvetica, Arial, sans-serif; }

/* Textos legales: columna centrada de lectura (el legacy iba a ancho completo), línea de 20px y 17px entre párrafos. */
.theme-psg .legal-page-container .max-w-5xl { max-width: 960px; margin-inline: auto; }
.theme-psg .legal-page-container .px-4 { padding-left: 24px; padding-right: 24px; }
.theme-psg .legal-page-container .py-2 { padding-top: 36px; }
.theme-psg .legal-page-container .legal-content { line-height: 20px !important; }
.theme-psg .legal-page-container .legal-content p { margin-top: 17px; margin-bottom: 17px; }


/* Barra de progreso del podcast como el legacy: 6 px, sin thumb visible (ROAD-374914). */
.psg-podcast-progress { -webkit-appearance: none; appearance: none; border-radius: 0; outline: none; }
.psg-podcast-progress::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 0; height: 6px; border: 0; background: transparent; }
.psg-podcast-progress::-moz-range-thumb { width: 0; height: 6px; border: 0; background: transparent; }
