/**
 * Botones visuales para "Ver revista" y "Número actual"
 * Portal de Revistas – stylesheet del sitio (sin tocar el tema)
 */

.page_index_site .journals .links {
  margin-top: 0.75rem;
}

.page_index_site .journals .links li {
  display: inline-block;
  margin: 0 0.5rem 0.5rem 0;
}

.page_index_site .journals .links a {
  display: inline-block;
  padding: 0.4em 1em;
  border: 1px solid #1E6292;
  border-radius: 3px;
  background: #fff;
  color: #1E6292;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: none;
  transform: translateY(0);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Primario: "Ver revista" */
.page_index_site .journals .links .view a {
  background: #1E6292;
  color: #fff;
}

.page_index_site .journals .links .view a:hover,
.page_index_site .journals .links .view a:focus {
  background: #184f75;
  border-color: #184f75;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 98, 146, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
  outline: none;
}

/* Secundario: "Número actual" (outline) */
.page_index_site .journals .links .current a {
  background: #fff;
  color: #1E6292;
}

.page_index_site .journals .links .current a:hover,
.page_index_site .journals .links .current a:focus {
  background: #1E6292;
  border-color: #1E6292;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 98, 146, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
  outline: none;
}

/* Evitar desbordamiento de URLs largas en la vista de artículo */
.obj_article_details .references,
.obj_article_details .references a,
.obj_article_details .entry_details .item,
.obj_article_details .entry_details .item a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/**
 * Zona de cuenta (header): estilo unificado
 * - No logueado: Registrarse (enlace) + Entrar (outline)
 * - Logueado: nombre de usuario (mismo outline que Entrar)
 */
#navigationUser {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
}

#navigationUser > li.profile {
  position: relative;
  display: inline-block;
  margin: 0;
}

/* Outline compartido: Entrar + trigger del usuario logueado */
#navigationUser > li > a[href$="/login"],
#navigationUser > li > a[data-toggle="dropdown"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 !important;
  padding: 0.35em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  background: transparent;
  color: #fff !important;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

#navigationUser > li > a[href$="/login"]:hover,
#navigationUser > li > a[href$="/login"]:focus,
#navigationUser > li > a[data-toggle="dropdown"]:hover,
#navigationUser > li > a[data-toggle="dropdown"]:focus,
#navigationUser > li > a[data-toggle="dropdown"][aria-expanded="true"] {
  background: #fff;
  border-color: #fff;
  color: #1E6292 !important;
  text-decoration: none;
  outline: none;
}

/* Registrarse: tipográfico, más discreto */
#navigationUser > li > a[href*="/user/register"] {
  display: inline-block;
  margin: 0 !important;
  padding: 0.35em 0.15em;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

#navigationUser > li > a[href*="/user/register"]:hover,
#navigationUser > li > a[href*="/user/register"]:focus {
  background: transparent;
  color: #fff !important;
  text-decoration: underline;
  outline: none;
}

/*
 * Dropdown del usuario:
 * - sin hueco (evita cierre al pasar el cursor)
 * - hover de ítems como en el tema Default/Manuscript
 * - anula el translate3d inline de Popper/OJS
 */
#navigationUser > li.profile > ul.dropdown-menu,
#navigationUser > li.profile:hover > ul.dropdown-menu,
#navigationUser > li.profile > ul.dropdown-menu.show {
  top: 100% !important;
  left: auto !important;
  right: 0 !important;
  margin-top: 0 !important;
  transform: none !important;
  will-change: auto !important;
  padding-top: 0;
}

/* Puente invisible sobre cualquier separación residual */
#navigationUser > li.profile > ul.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
}

#navigationUser .dropdown-menu > li > a {
  display: block;
  box-shadow: none !important;
  transform: none !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-left: 0.357rem solid transparent !important;
  border-radius: 0;
  background-color: transparent;
  color: #4b7d92 !important;
  text-decoration: none;
}

#navigationUser .dropdown-menu > li > a:hover,
#navigationUser .dropdown-menu > li > a:focus {
  outline: 0;
  background-color: #ddd !important;
  border-left-color: #4b7d92 !important;
  color: #4b7d92 !important;
  text-decoration: none;
}

#navigationUser .dropdown-menu > li:first-child > a {
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

#navigationUser .dropdown-menu > li:last-child > a {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* Móvil: mismos controles dentro del menú hamburguesa (fondo del header) */
@media (max-width: 991px) {
  #navigationUser {
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  #navigationUser > li.profile > ul.dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    margin-top: 0.35rem !important;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: none;
    transform: none !important;
  }

  #navigationUser > li.profile > ul.dropdown-menu::before {
    display: none;
  }

  #navigationUser .dropdown-menu > li > a {
    color: #fff !important;
    border-left-color: transparent !important;
  }

  #navigationUser .dropdown-menu > li > a:hover,
  #navigationUser .dropdown-menu > li > a:focus {
    background-color: rgba(255, 255, 255, 0.14) !important;
    border-left-color: #fff !important;
    color: #fff !important;
  }
}