/*
 * kebab-menu.css — styles for the ONE shared overflow-menu component
 * (site/js/lib/kebab-menu.js). Vertical kebab (⋮) only.
 *
 * Uses dashboard theme vars WHERE present (so it matches once the dashboard rows
 * migrate onto it) with light-mode fallbacks so it renders correctly on the
 * always-light public verify page too.
 */

.kebab {
  position: relative;
  display: inline-flex;
}

.kebab__trigger {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 6px);
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  /* 44px minimum touch target (WCAG 2.5.5) */
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.1s, border-color 0.1s;
}

@media (pointer: coarse) {
  .kebab__trigger {
    min-width: 44px;
    min-height: 44px;
  }
}

.kebab__trigger:hover {
  background: var(--color-surface-3, #f1f5f9);
  border-color: var(--color-border, #e2e8f0);
}

.kebab__trigger:focus-visible {
  outline: 2px solid var(--color-accent, #2563eb);
  outline-offset: 1px;
}

.kebab__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 200px;
  background: var(--color-surface-2, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  z-index: var(--z-dropdown, 1000);
  padding: 4px 0;
}

.kebab__menu--start {
  right: auto;
  left: 0;
}

.kebab__menu[hidden] {
  display: none;
}

.kebab__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  color: var(--color-text-secondary, #334155);
  font-size: 0.8125rem;
  font-family: var(--font-sans, inherit);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.1s;
}

.kebab__item:hover,
.kebab__item:focus-visible {
  background: var(--color-hover, rgba(37, 99, 235, 0.07));
  outline: none;
}

.kebab__item--danger {
  color: var(--color-error, #dc2626);
}

.kebab__item--danger:hover,
.kebab__item--danger:focus-visible {
  background: rgba(220, 38, 38, 0.08);
}

.kebab__item-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.kebab__item-icon svg {
  width: 14px;
  height: 14px;
}

.kebab__item-label {
  flex: 1;
}

.kebab__copied {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-success, #16a34a);
  opacity: 0;
  transition: opacity 0.1s;
}

.kebab__copied--show {
  opacity: 1;
}

.kebab__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* RTL: menu opens from the left edge under the trigger */
[dir="rtl"] .kebab__menu {
  right: auto;
  left: 0;
}
[dir="rtl"] .kebab__menu--start {
  left: auto;
  right: 0;
}
[dir="rtl"] .kebab__item {
  text-align: right;
}
