/* OysKasir account dropdown. Kept separate from the main navigation styles. */
.topbar,
.topbar-actions,
.account {
  overflow: visible;
}

.topbar { z-index: 80; }
.account { position: relative; z-index: 4; }

.account-btn[aria-expanded="true"] {
  color: #5147c8;
  border-color: rgba(99, 102, 241, .22);
  background: #f7f5ff;
  box-shadow: 0 7px 20px rgba(99, 102, 241, .12);
}

.account-btn[aria-expanded="true"] > .icon {
  transform: rotate(180deg);
}

.account-btn > .icon {
  transition: transform 180ms ease;
}

.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 120;
  width: 280px;
  max-width: calc(100vw - 28px);
  padding: 10px;
  overflow: visible;
  isolation: isolate;
  border: 1px solid #e8e7f3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(31, 36, 67, .20), 0 3px 12px rgba(31, 36, 67, .08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-menu[hidden] { display: none; }

.account-menu:not([hidden]) {
  animation: account-menu-in 160ms ease-out both;
}

.account-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 22px;
  z-index: -1;
  width: 12px;
  height: 12px;
  border-top: 1px solid #e8e7f3;
  border-left: 1px solid #e8e7f3;
  background: #fff;
  transform: rotate(45deg);
}

.account-menu-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 9px 9px 13px;
  border-bottom: 1px solid #efeff6;
}

.account-menu-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #6670f4, #8b5cf6);
  box-shadow: 0 8px 18px rgba(99, 102, 241, .24);
}

.account-menu-header p,
.account-menu-header small {
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-header p {
  margin: 0 0 3px;
  color: #202a3e;
  font-size: 13px;
  font-weight: 800;
}

.account-menu-header small {
  display: block;
  color: #8b94a6;
  font-size: 10px;
}

.account-role {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #6558cf;
  background: #f1efff;
  font-size: 9px;
  font-weight: 800;
}

.account-menu-actions {
  display: grid;
  gap: 4px;
  padding-top: 7px;
}

.account-menu .account-menu-actions .btn {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border: 0;
  border-radius: 11px;
  color: #596277;
  background: #fff;
  box-shadow: none;
  font-size: 11px;
}

.account-menu .account-menu-actions .btn:hover {
  color: #5548c8;
  background: #f5f3ff;
}

.account-menu .account-menu-actions [data-action="logout"] {
  color: #b14958;
}

.account-menu .account-menu-actions [data-action="logout"]:hover {
  color: #a33748;
  background: #fff1f3;
}

@keyframes account-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  .account-menu {
    position: fixed;
    top: 80px;
    right: 10px;
    width: min(280px, calc(100vw - 20px));
  }

  .account-menu::before { right: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu:not([hidden]) { animation: none; }
  .account-btn > .icon { transition: none; }
}
