/**
 * css/hand-tracking/ht-nav-dropdown.css
 *
 * Fixed dropdown button in the header for Hand Tracking.
 */

/* ── Container in .brand header ───────────────────────────── */
.ht-header-dropdown {
  display: inline-flex;
  align-items: center;
  margin-inline-start: auto;
  margin-inline-end: 12px;
  position: relative;
  flex-shrink: 0;
}

/* Hide when NOT on exam tab */
body:not(.ht-exam-active) .ht-header-dropdown {
  display: none !important;
}

/* ── Top Dropdown Button ──────────────────────────────────── */
.ht-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  color: #0d8a74;
  background: rgba(13, 138, 116, 0.08);
  border: 1px solid rgba(13, 138, 116, 0.25);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ht-top-btn:hover {
  background: #ffffff;
  border-color: #0d8a74;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ht-top-btn:active {
  transform: scale(0.97);
}

.ht-top-btn[aria-expanded="true"] {
  background: #0d8a74;
  color: #ffffff;
  border-color: #0d8a74;
  box-shadow: 0 2px 8px rgba(13, 138, 116, 0.35);
}

.ht-top-btn[aria-expanded="true"] svg { stroke: #ffffff; }

.ht-top-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.ht-top-btn .ht-chevron {
  transition: transform 0.25s ease;
  width: 9px;
  height: 6px;
  margin-inline-start: 2px;
}

.ht-top-btn[aria-expanded="true"] .ht-chevron {
  transform: rotate(180deg);
}

/* ── The Dropdown Panel (#ht-panel overrides) ────────────── */
#ht-panel {
  position: fixed !important;
  top: 60px !important;
  z-index: 99999 !important;
  /* Width controlled in ht-panel.css */
}

/* Responsive adjustment for small screens */
@media (max-width: 640px) {
  .ht-top-btn span { display: none; }
  .ht-top-btn { padding: 6px 10px; }
  #ht-panel {
    top: 56px !important;
    width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: 12px !important;
  }
}

/* Prevent mode-toggle-wrap from splitting the group */
.ht-header-dropdown ~ .mode-toggle-wrap {
  margin-left: 0 !important;
  margin-inline-start: 0 !important;
}