/* ui/MoreMenu — the menu's overflow. Contract: ./MoreMenu.spec.md
   menu: a dropdown under ui/CommandDeck's ☰; sheet: a phone's bottom sheet. */

.qc-more { position: fixed; inset: 0; z-index: 40; }
.qc-more__scrim { position: absolute; inset: 0; background: transparent; }
.qc-more[data-variant="sheet"] .qc-more__scrim {
  background: color-mix(in srgb, var(--qc-space-0) 70%, transparent);
  animation: qc-more-fade 220ms var(--qc-ease-out);
}

.qc-more__panel {
  position: absolute; display: flex; flex-direction: column; overflow: auto;
  background: var(--qc-glass); border: 1px solid var(--qc-line); backdrop-filter: blur(8px);
  color: var(--qc-text);
}
/* The dropdown: under the ☰ at the top right. */
.qc-more[data-variant="menu"] .qc-more__panel {
  top: calc(56px + 4px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right));
  min-width: 240px; max-height: calc(100vh - 76px); padding: 6px 0 0;
  border-radius: var(--qc-radius);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--qc-space-0) 60%, transparent);
  animation: qc-more-drop 160ms var(--qc-ease-out);
}
/* The bottom sheet. */
.qc-more[data-variant="sheet"] .qc-more__panel {
  left: 0; right: 0; bottom: 0; max-height: 85vh;
  padding: 8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  border-width: 1px 0 0; border-radius: var(--qc-radius) var(--qc-radius) 0 0;
  animation: qc-more-rise 220ms var(--qc-ease-out); transition: transform 160ms var(--qc-ease-out);
}

.qc-more__handle { display: flex; justify-content: center; padding: 6px 0 10px; touch-action: none; cursor: grab; }
.qc-more__handle i { width: 36px; height: 4px; border-radius: 2px; background: var(--qc-line-strong); }
.qc-more__close {
  position: absolute; top: 8px; right: calc(8px + env(safe-area-inset-right)); width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 0; background: none; color: var(--qc-text-dim); font-size: 16px; cursor: pointer;
}

.qc-more__items { display: flex; flex-direction: column; }
.qc-more__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 20px;
  border: 0; background: none; color: var(--qc-text-dim); cursor: pointer; text-align: left;
  font-family: var(--qc-font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.qc-more__item:hover, .qc-more__item:focus-visible { color: var(--qc-text); background: color-mix(in srgb, var(--qc-text) 6%, transparent); }
.qc-more[data-variant="sheet"] .qc-more__item { min-height: 48px; padding: 0 24px; font-size: 14px; }
.qc-more__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--qc-accent-2); box-shadow: 0 0 6px var(--qc-accent-2); }
/* The Factory Pass line: an item that is a link, the name and under it what the pass gives. */
.qc-more__pass {
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 44px;
  box-sizing: border-box; padding-top: 6px; padding-bottom: 6px; text-decoration: none;
}
.qc-more[data-variant="sheet"] .qc-more__pass { min-height: 48px; }
.qc-more__pass[data-state="member"] { color: var(--qc-quanta); }
.qc-more__pass-note {
  font-family: var(--qc-font-ui); font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none;
  color: var(--qc-text-faint);
}

.qc-more__footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  margin-top: 6px; padding: 10px 20px 12px; border-top: 1px solid var(--qc-line);
  font-size: 12px; color: var(--qc-text-faint);
}
.qc-more__legal { display: inline-flex; gap: 12px; }
.qc-more__legal-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--qc-text-dim); text-decoration: none; }
.qc-more__legal-link:hover, .qc-more__legal-link:focus-visible { color: var(--qc-text); text-decoration: underline; }

@keyframes qc-more-drop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qc-more-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes qc-more-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .qc-more__panel, .qc-more__scrim { animation: none !important; transition: none !important; }
}

/* Thumbs: a short link ("Terms") still takes a 44 px square (§1.11 rule 1). */
@media (pointer: coarse) {
  .qc-more__legal-link { min-width: 44px; justify-content: center; }
}
