/* Portal menú de rol — misma línea visual que el antiguo BIM float (~36px junto al texto) */
.rum-nav-dropdown__trigger--portal,
.rum-nav-dropdown__split-primary--portal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rum-nav-dropdown__trigger-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.rum-nav-dropdown__trigger-text {
  position: relative;
  z-index: 1;
  line-height: 1.15;
}

/* Escala del portal BIM original (90px → 40px) */
.rum-nav-role-portal {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  isolation: isolate;
  filter: drop-shadow(0 0 12px rgba(79, 163, 255, 0.48));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.rum-nav-role-portal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(79, 163, 255, 0.22) 0%,
    rgba(79, 163, 255, 0.08) 52%,
    transparent 72%
  );
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.rum-nav-dropdown__trigger--portal:hover .rum-nav-role-portal,
.rum-nav-dropdown__split-primary--portal:hover .rum-nav-role-portal,
.rum-nav-dropdown.is-open .rum-nav-role-portal {
  transform: scale(1.05);
  filter: drop-shadow(0 0 18px rgba(79, 163, 255, 0.62));
}

.rum-nav-role-portal__warp {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  pointer-events: none;
}

.rum-nav-role-portal__warp::before,
.rum-nav-role-portal__warp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(79, 163, 255, 0.72);
  animation: rumNavRolePortalWarp 1.8s linear infinite;
}

.rum-nav-role-portal__warp::after {
  border-color: rgba(246, 168, 104, 0.78);
  animation-delay: 0.6s;
}

.rum-nav-role-portal__core {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff 0%,
    #8bc5ff 28%,
    #4fa3ff 52%,
    rgba(79, 163, 255, 0.18) 100%
  );
  box-shadow:
    0 0 12px rgba(79, 163, 255, 0.9),
    0 0 22px rgba(79, 163, 255, 0.42),
    inset 0 0 8px rgba(255, 255, 255, 0.55);
  animation: rumNavRolePortalPulse 1.2s ease-in-out infinite;
  z-index: 1;
}

.rum-nav-role-portal__spark {
  position: absolute;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.9);
  box-shadow: 0 0 6px currentColor;
  z-index: 0;
}

.rum-nav-role-portal__spark--1 {
  top: 7px;
  left: 6px;
  width: 5px;
  height: 5px;
  color: rgba(125, 211, 252, 0.92);
  animation: rumNavRolePortalSpark 2.4s ease-in-out infinite;
}

.rum-nav-role-portal__spark--2 {
  top: 26px;
  right: 5px;
  width: 4px;
  height: 4px;
  color: rgba(246, 168, 104, 0.95);
  animation: rumNavRolePortalSpark 2.1s ease-in-out infinite 0.4s;
}

.rum-nav-role-portal__spark--3 {
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  color: rgba(191, 219, 254, 0.9);
  transform: translateX(-50%);
  animation: rumNavRolePortalSpark 2.8s ease-in-out infinite 0.8s;
}

@keyframes rumNavRolePortalWarp {
  0% {
    transform: scale(0.42);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}

@keyframes rumNavRolePortalPulse {
  0%,
  100% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes rumNavRolePortalSpark {
  0%,
  100% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translate3d(0, -3px, 0) scale(1.25);
  }
}

.rum-nav-role-portal__spark--3 {
  animation-name: rumNavRolePortalSparkCenter;
}

@keyframes rumNavRolePortalSparkCenter {
  0%,
  100% {
    opacity: 0.3;
    transform: translateX(-50%) translate3d(0, 0, 0) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translate3d(0, -3px, 0) scale(1.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rum-nav-role-portal__warp::before,
  .rum-nav-role-portal__warp::after,
  .rum-nav-role-portal__core,
  .rum-nav-role-portal__spark {
    animation: none !important;
  }
  .rum-nav-role-portal {
    filter: drop-shadow(0 0 8px rgba(79, 163, 255, 0.4));
  }
}

@media (max-width: 900px) {
  .rum-nav-dropdown__trigger--portal,
  .rum-nav-dropdown__split-primary--portal {
    width: 100%;
    justify-content: space-between;
  }
}
