/*
  Dropdown 09 — Context Menu — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --dropdown-accent: #39ff14;
  --dropdown-fg: oklch(0.145 0 0);
  --dropdown-muted: oklch(0.5 0 0);
  --dropdown-border: oklch(0.88 0 0);
  --dropdown-border-hover: oklch(0.72 0 0);
  --dropdown-hover: oklch(0.96 0 0);
  --dropdown-danger: oklch(0.55 0.22 27);
}

.dropdown09 {
  position: relative;
  display: flex;
  width: 100%;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.dropdown09__surface {
  display: flex;
  height: 6rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--dropdown-border);
  border-radius: 0.75rem;
  background: none;
  padding: 0 1rem;
  text-align: center;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--dropdown-muted);
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease-out;
}

.dropdown09__surface:hover {
  border-color: var(--dropdown-border-hover);
}

.dropdown09__surface:focus-visible {
  outline: 2px solid var(--dropdown-fg);
  outline-offset: 2px;
}

.dropdown09__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 20;
  margin-top: 0.375rem;
  width: 12rem;
  max-width: calc(100vw - 1rem);
  transform: translateX(-50%);
  border-radius: 0.5rem;
  border: 1px solid var(--dropdown-border);
  background-color: #ffffff;
  padding: 0.25rem;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.35);
  animation: dropdown09-in 120ms ease-out both;
}

.dropdown09__menu[data-open-upward="true"] {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 0.375rem;
}

.dropdown09__menu[hidden] {
  display: none;
}

@keyframes dropdown09-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.dropdown09__item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  padding: 0.375rem 0.625rem;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--dropdown-fg);
  text-align: left;
  cursor: pointer;
  outline: none;
}

.dropdown09__item:hover,
.dropdown09__item:focus-visible {
  background-color: var(--dropdown-hover);
}

.dropdown09__item--danger {
  color: var(--dropdown-danger);
}

.dropdown09__keys {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.125rem;
}

.dropdown09__keys kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.02em;
  color: var(--dropdown-muted);
}

.dropdown09__divider {
  height: 1px;
  margin: 0.25rem 0;
  background-color: var(--dropdown-border);
}

@media (prefers-reduced-motion: reduce) {
  .dropdown09__menu {
    animation: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.dropdown09-layout {
  display: flex;
  min-height: 25rem;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 2.5rem 4rem;
}
.dropdown09-layout__panel {
  width: 100%;
  max-width: 30rem;
  border: 1px solid oklch(0.9 0 0);
  border-radius: 1rem;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
