/* Role context switcher and page-entry transition. */

.context-label {
  display: block;
  margin: 0 8px 6px;
  color: #59677e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.director-context-switcher {
  position: relative;
  margin-bottom: 18px;
}

.director-context-switcher summary {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  list-style: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.director-context-switcher summary::-webkit-details-marker {
  display: none;
}

.director-context-switcher summary:hover,
.director-context-switcher[open] summary {
  border-color: rgba(96, 165, 250, .35);
  background: rgba(255, 255, 255, .07);
}

.director-context-switcher summary > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.director-context-switcher summary strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-context-switcher summary small {
  margin-top: 3px;
  color: #8190a7;
  font-size: 7px;
}

.director-context-switcher summary > svg {
  width: 15px;
  fill: #708097;
  transition: transform .2s ease;
}

.director-context-switcher[open] summary > svg {
  transform: rotate(180deg);
}

.director-context-menu {
  display: grid;
  max-height: min(58vh, 440px);
  margin-top: 6px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: #18243a;
  box-shadow: 0 18px 35px rgba(2, 8, 23, .35);
  transform-origin: top;
  animation: context-menu-enter .18s ease both;
}

.director-context-menu > span {
  padding: 9px 8px 4px;
  color: #66758c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.director-context-menu a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 1px 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  color: #a9b5c8;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.director-context-menu a:hover,
.director-context-menu a.selected {
  color: white;
  background: rgba(59, 130, 246, .12);
  transform: translateX(2px);
}

.director-context-menu a i {
  grid-row: 1 / 3;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: #334155;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.director-context-menu a b {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-context-menu a small {
  overflow: hidden;
  color: #718097;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-context-menu a.selected i {
  background: #2563eb;
}

.director-preview-return {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 12px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #93c5fd;
  background: rgba(37, 99, 235, .1);
  font-size: 8px;
  font-weight: 700;
}

@keyframes context-menu-enter {
  from { opacity: 0; transform: translateY(-7px) scaleY(.96); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

.director-main,
.advisor-main,
.zone-page-main {
  animation: crm-page-enter .32s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes crm-page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
