/* =========================================================================
 * Botones de acceso de la barra (template-parts/header/site-header-nuevo.php).
 * Copia de los botones sin sesión de la barra de servicios (estilos-cabecera-perfil.css).
 * Todo va bajo #header-primary para ganarle a estilos.css y a los botones de Twenty Twenty-One.
 * ====================================================================== */

/* Paleta oficial: el tema de WordPress no la define */
#header-primary .su-acceso {
  --amarillo_oficial: #ffff00;
  --azul_noche: #001e6e;

  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#header-primary .su-acceso__botones {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Botones: amarillo (Iniciar sesión) y blanco (Registrarse) ---- */

#header-primary a.su-nav__ingresar,
#header-primary a.su-nav__ingresar:visited,
#header-primary a.su-nav__registro,
#header-primary a.su-nav__registro:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border: 2px solid var(--amarillo_oficial);
  border-radius: 999px;
  background-color: var(--amarillo_oficial);
  color: var(--azul_noche);
  /* 'bold' es la Futura condensada del tema (assets/css/fonts.css), la misma de "MENÚ" */
  font-family: 'bold', "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

#header-primary a.su-nav__registro,
#header-primary a.su-nav__registro:visited {
  border-color: #fff;
  background-color: #fff;
}

/* Sin el subrayado punteado que Twenty Twenty-One pone a los enlaces con foco */
#header-primary a.su-nav__ingresar:hover,
#header-primary a.su-nav__ingresar:focus,
#header-primary a.su-nav__registro:hover,
#header-primary a.su-nav__registro:focus {
  color: var(--azul_noche);
  text-decoration: none;
  outline: none;
}

#header-primary a.su-nav__ingresar:hover,
#header-primary a.su-nav__ingresar:focus-visible,
#header-primary a.su-nav__registro:hover,
#header-primary a.su-nav__registro:focus-visible {
  transform: scale(1.05);
}

#header-primary a.su-nav__ingresar:focus-visible,
#header-primary a.su-nav__registro:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- Celular: conejo con flecha y desplegable ---- */

#header-primary .su-nav__usuario {
  display: none;
}

/* Fondo transparente también al pasar el mouse y con foco (Twenty Twenty-One los pinta) */
#header-primary .su-nav__usuario-boton,
#header-primary .su-nav__usuario-boton:hover,
#header-primary .su-nav__usuario-boton:focus,
#header-primary .su-nav__usuario-boton:active {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  color: #fff;
  line-height: 1;
  outline: none;
  box-shadow: none;
}

#header-primary .su-nav__usuario-boton:focus-visible {
  outline: 2px solid var(--amarillo_oficial);
  outline-offset: 2px;
}

#header-primary .su-nav__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.2s ease;
}

#header-primary .su-nav__usuario-boton:hover .su-nav__avatar {
  transform: scale(1.06);
}

/* El Lucky completo, sin recortes ni acercamiento */
#header-primary .su-nav__avatar img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

#header-primary .su-nav__flecha {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

#header-primary .su-nav__usuario.open .su-nav__flecha {
  transform: rotate(180deg);
}

/* El desplegable lleva el mismo azul de la barra (estilos.css del tema) para que los botones
   se vean igual que en escritorio */
#header-primary .su-nav__menu.dropdown-menu {
  left: auto;
  right: 0;
  min-width: 200px;
  margin-top: 10px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--primary_color_bg, #0136ce);
  box-shadow: 0 12px 30px rgba(0, 30, 110, 0.35);
}

#header-primary .su-nav__menu > li + li {
  margin-top: 10px;
}

/* ---- Tamaños ---- */

/* Entre 992 y 1199 px la columna es angosta: botones más pequeños */
@media (max-width: 1199px) {
  #header-primary .su-acceso__botones {
    gap: 8px;
  }

  #header-primary .su-acceso__botones a.su-nav__ingresar,
  #header-primary .su-acceso__botones a.su-nav__registro {
    padding: 6px 14px;
    font-size: 16px;
    line-height: 18px;
  }
}

/* Celular y tablet: la silueta reemplaza a los botones */
@media (max-width: 991px) {
  #header-primary .su-acceso__botones {
    display: none;
  }

  #header-primary .su-nav__usuario {
    display: block;
  }
}

@media (max-width: 479px) {
  #header-primary .su-nav__avatar {
    width: 36px;
    height: 36px;
  }

  #header-primary .su-nav__flecha {
    width: 16px;
    height: 16px;
  }
}
