/* ATLAS FC · V38.19.7 — ÚNICO COMPONENTE DE REGRESO PARA TODO EL PORTAL
   Este archivo se carga al final del sistema, sustituyendo los estilos históricos
   de navegación sin intervenir en el destino o los eventos de cada botón. */

/* El :is() deliberadamente alcanza la especificidad de formularios heredados
   con dos ID y garantiza el mismo componente en vistas y diálogos. */
:is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]) {
  box-sizing: border-box !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: flex-start !important;
  gap: 10px !important;
  width: max-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: auto !important;
  margin: 0 0 12px 0 !important;
  padding: 3px 7px 3px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #70502e !important;
  font-family: 'Glacial Indifference', Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .045em !important;
  line-height: 1.25 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  white-space: normal !important;
  cursor: pointer !important;
  transition: color .15s ease !important;
}
:is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden])::before {
  content: '←' !important;
  display: inline-flex !important;
  flex: 0 0 32px !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid #bb9975 !important;
  border-radius: 50% !important;
  background: #fffdfb !important;
  color: #70502e !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  transition: border-color .15s ease, color .15s ease, background .15s ease !important;
}
:is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible) {
  color: #e30613 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
:is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible)::before {
  color: #e30613 !important;
  border-color: #e30613 !important;
  background: #fff0f1 !important;
}
:is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]):focus-visible {
  outline: 2px solid #e30613 !important;
  outline-offset: 3px !important;
}
html[data-theme="dark"] :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]) {
  color: #e6c39a !important;
}
html[data-theme="dark"] :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden])::before {
  color: #e6c39a !important;
  background: #211e1c !important;
  border-color: #a98b68 !important;
}
html[data-theme="dark"] :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible) {
  color: #ff4c59 !important;
}
html[data-theme="dark"] :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
:is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible)::before {
  color: #ff5965 !important;
  background: #3e1e21 !important;
  border-color: #ff5965 !important;
}
/* Oculta únicamente los iconos heredados, no el texto ni el botón. */
#view-matches button.atlas-universal-back .atlas-match-back-icon,
#view-calendar button.atlas-universal-back > span[aria-hidden="true"],
body.software-page .atlas-universal-back > .atlas-legacy-back-icon {display:none!important}
#view-matches button.atlas-universal-back .atlas-match-return-text {
  display:inline!important; color:inherit!important; font:inherit!important;
  letter-spacing:inherit!important; line-height:inherit!important;
}
body.software-page .atlas-universal-back[hidden] {display:none!important}
body.software-page .atlas-universal-back:disabled {opacity:.55!important;cursor:not-allowed!important}
/* Evitar que las cabeceras de formularios con rejilla fuercen un botón exagerado. */
body.software-page .training-form-top:has(>.atlas-universal-back){grid-template-columns:max-content minmax(0,1fr)}
@media(max-width:680px){
  :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
  :is(button,a).atlas-universal-back:not([hidden]){font-size:11px!important;gap:8px!important;max-width:100%!important;min-height:40px!important}
  :is(#view-matches #matchFormPage,#view-matches #matchDetailPage,#view-calendar #calendarConnectBackBtn,body.software-page,body.login-page,body.invite-page)
  :is(button,a).atlas-universal-back:not([hidden])::before{flex-basis:30px!important;width:30px!important;height:30px!important;min-height:30px!important}
  body.software-page .training-form-top:has(>.atlas-universal-back){grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){
 :is(button,a).atlas-universal-back:not([hidden]),
 :is(button,a).atlas-universal-back:not([hidden])::before{transition:none!important}
}
/* Acceso y registro tienen fondos oscuros incluso sin el selector de tema. */
body:is(.login-page,.invite-page) :is(button,a).atlas-universal-back:not([hidden]) {color:#e6c39a!important}
body:is(.login-page,.invite-page) :is(button,a).atlas-universal-back:not([hidden])::before {
 color:#e6c39a!important;background:#211e1c!important;border-color:#a98b68!important;
}
body:is(.login-page,.invite-page) :is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible){color:#ff5965!important}
body:is(.login-page,.invite-page) :is(button,a).atlas-universal-back:not([hidden]):is(:hover,:focus-visible)::before{
 color:#ff5965!important;background:#3e1e21!important;border-color:#ff5965!important;
}
body.login-page .login-card .back-home.atlas-universal-back{margin-top:22px!important}
