/* =============================================================================
   Navigation Context Switcher — estilos base
   Sobreescribibles desde el tema usando las mismas clases.
   ============================================================================= */

/* Contenedor principal */
.context-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  line-height: 1;
}

.context-switcher__label {
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
}

/* Track: la pastilla que agrupa los dos botones */
.context-switcher__track {
  display: inline-flex;
  border-radius: 2rem;
  background: rgba(0, 0, 0, 0.1);
  padding: 3px;
  gap: 2px;
}

/* Botones individuales */
.context-switcher__btn {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
  color: inherit;
  background: transparent;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.context-switcher__btn:hover:not(.is-active) {
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.08);
}

/* Estado activo: pastilla blanca elevada sobre el track */
.context-switcher__btn.is-active {
  background: #fff;
  color: #1a1a1a;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

/* =============================================================================
   Context Menu Block — menú filtrado por contexto
   ============================================================================= */

.context-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

.context-menu li {
  margin: 0;
  padding: 0;
}

.context-menu__link {
  display: block;
  padding: 0.4rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.context-menu__link:hover {
  opacity: 0.75;
}

/* Submenú */
.context-menu__submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
}

/* =============================================================================
   Ocultación de nodos por perfil objetivo
   Las clases perfil-nodo-* las añade hook_preprocess_node del módulo.
   ============================================================================= */

body.context-empresa:not(.is-admin) .perfil-nodo-gestordestino {
  display: none;
}

body.context-gestordestino:not(.is-admin) .perfil-nodo-empresa {
  display: none;
}

/* perfil-nodo-ambos → siempre visible, no necesita regla */
