/* America Music | Identidad visual compartida (ES / EN)
   Editar esta hoja para cambiar los colores y botones en TODO el sitio.
   Se carga al final de <head> para unificar las plantillas antiguas sin
   modificar sus formularios, reproductores ni enlaces.
*/

:root {
  --am-bg: #050806;
  --am-surface: #101712;
  --am-accent: #a8ed5d;
  --am-accent-hover: #c9fa91;
  --am-heading: #ffed72;
  --am-text: #ffffff;
  --am-muted: #d2d8d2;
  --am-ink: #091108;
  --am-outline: #a8ed5d;
  --am-radius: 8px;

  /* Compatibilidad con los módulos del catálogo en español. */
  --gam-bg: var(--am-bg);
  --gam-surface: var(--am-surface);
  --gam-accent: var(--am-accent);
  --gam-yellow: var(--am-heading);
  --gam-text: var(--am-text);
  --gam-muted: var(--am-muted);
}

/* Una capa de reglas importantes permite superar los estilos !important
   incrustados en las distintas generaciones de plantillas. */
@layer america-music-ui {
  html body {
    background-color: var(--am-bg) !important;
  }

  /* Títulos amarillos y acentos verdes con los mismos tonos en todo el sitio. */
  html body :is(.page-title, .gam-section-title, .gam-song-count,
    .bradcam_area .bradcam_text h3, .lic-page h1, .lic-page h2,
    .lyrics-unavailable-notice h3) {
    color: var(--am-heading) !important;
  }

  html body :is(.highlight-text, .main-link-title, .gam-index,
    .gam-kicker, .landing-green, .landing-eyebrow, .lic-green,
    .lic-eyebrow, .lic-promo-title, .gam-song-count + a:not(.am-btn)) {
    color: var(--am-accent) !important;
  }

  html body :is(.main-links, .footer-links, .footer-contact,
    .lyrics-quick-links) a:not(.am-btn),
  html body .lic-page a:not(.boxed-btn):not(.am-btn):not([class^="ql-"]) {
    color: var(--am-accent) !important;
  }

  html body :is(.main-links, .footer-links, .footer-contact,
    .lyrics-quick-links) a:not(.am-btn):hover,
  html body .lic-page a:not(.boxed-btn):not(.am-btn):not([class^="ql-"]):hover {
    color: var(--am-heading) !important;
  }

  html body #navigation :is(a:hover, a.active, .current-language),
  html body #navigation .language-selector .current-language {
    color: var(--am-accent) !important;
  }

  /* El menú móvil conserva estilos antiguos rojos en algunas páginas. */
  html body .slicknav_nav :is(a:hover, a:focus-visible,
    a.current-language, a.active),
  html body .slicknav_nav li.mobile-language-item > a:is(:hover, :focus-visible),
  html body .slicknav_nav li.mobile-language-item > a.current-language {
    color: var(--am-accent) !important;
    -webkit-text-fill-color: var(--am-accent) !important;
    background: var(--am-surface) !important;
  }

  /* Conserva la apariencia de los títulos que ahora son h1 semánticos. */
  html body .bradcam_area h1 {
    font-size: 60px !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase !important;
    color: var(--am-heading) !important;
  }

  html body .whole-wrap .section-top-border h1.page-title {
    margin-top: 5px !important;
    margin-bottom: 10px !important;
  }

  /* Tarjetas del índice de licencias: una sola señal cromática. */
  html body .lic-page .lic-quick-links :is(.ql-talent, .ql-types,
    .ql-files, .ql-creative, .ql-fees, .ql-prior, .ql-request,
    .ql-faq, .ql-catalog) {
    --ql-accent: var(--am-accent) !important;
  }

  /* Todos los controles de acción llevan am-btn; el ancho depende del
     contenedor para mantener filas y columnas responsive de cada página. */
  html body :is(a, button, input).am-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 50px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    margin-top: 0;
    border: 1px solid var(--am-accent) !important;
    border-radius: var(--am-radius) !important;
    background: var(--am-accent) !important;
    color: var(--am-ink) !important;
    -webkit-text-fill-color: var(--am-ink) !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-align: center !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    cursor: pointer !important;
    transition: background-color .18s ease, color .18s ease,
      border-color .18s ease, box-shadow .18s ease !important;
    filter: none !important;
  }

  html body :is(a, button, input).am-btn::before {
    /* El botón no recibe decoraciones del tema heredado. */
    box-shadow: none !important;
  }

  html body :is(a, button, input).am-btn:not(.am-btn--secondary):is(:hover, :focus-visible, :active) {
    background: var(--am-accent-hover) !important;
    border-color: var(--am-accent-hover) !important;
    color: var(--am-ink) !important;
    -webkit-text-fill-color: var(--am-ink) !important;
    filter: none !important;
  }

  /* Variación de igual tamaño para volver, comparar, WhatsApp y consultar. */
  html body :is(a, button, input).am-btn.am-btn--secondary {
    background: transparent !important;
    border-color: var(--am-outline) !important;
    color: var(--am-accent) !important;
    -webkit-text-fill-color: var(--am-accent) !important;
    filter: none !important;
  }

  html body :is(a, button, input).am-btn.am-btn--secondary:is(:hover, :focus-visible, :active) {
    background: var(--am-accent) !important;
    border-color: var(--am-accent) !important;
    color: var(--am-ink) !important;
    -webkit-text-fill-color: var(--am-ink) !important;
    filter: none !important;
  }

  html body :is(a, button, input).am-btn:focus-visible,
  html body a:not(.am-btn):focus-visible {
    outline: 3px solid var(--am-heading) !important;
    outline-offset: 3px !important;
  }

  html body :is(a, button, input).am-btn:disabled,
  html body :is(a, button, input).am-btn[aria-disabled="true"] {
    opacity: .55 !important;
    cursor: not-allowed !important;
  }

  /* Mantener botones emparejados iguales, incluso en pantallas pequeñas. */
  html body :is(.landing-dual-actions, .landing-hero-cta-row,
    .song-action-pair) .am-btn {
    width: 100% !important;
    height: 100% !important;
  }

  html body .lyrics-unavailable-notice .am-btn {
    margin: 14px 0 8px !important;
  }

  @media (max-width: 767px) {
    html body .bradcam_area h1 {
      font-size: 30px !important;
    }
    html body :is(a, button, input).am-btn {
      min-height: 52px !important;
      padding: 12px 14px !important;
      font-size: 15px !important;
    }
    html body :is(.landing-dual-actions, .landing-hero-cta-row,
      .song-action-pair) .am-btn {
      padding: 11px 8px !important;
      font-size: 14px !important;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html body .am-btn { transition: none !important; }
  }
}
