/*!
 * hcg-context-menu - styles
 * HTML Code Generator (https://www.html-code-generator.com/javascript/context-menu)
 */

.hcg-context-menu {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}

.hcg-context-menu-panel {
  position: fixed;
  margin: 0;
  padding: 4px;
  min-width: 180px;
  max-width: min(360px, 90vw);
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1f2329;
  pointer-events: auto;
  user-select: none;
}

.hcg-context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
}

.hcg-context-menu-item:hover,
.hcg-context-menu-item:focus {
  background: #2563eb;
  color: #ffffff;
}

.hcg-context-menu-icon {
  width: 18px;
  text-align: center;
  flex: 0 0 auto;
}

.hcg-context-menu-label {
  flex: 1 1 auto;
  min-width: 0;            /* allow the label to shrink so ellipsis can apply */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcg-context-menu-arrow {
  margin-left: 16px;
  flex: 0 0 auto;
  opacity: 0.6;
}

.hcg-context-menu-item:hover .hcg-context-menu-arrow,
.hcg-context-menu-item:focus .hcg-context-menu-arrow {
  opacity: 1;
}

.hcg-context-menu-disabled {
  color: #9aa0a6;
  cursor: default;
  pointer-events: none;
}

.hcg-context-menu-separator {
  height: 1px;
  margin: 5px 8px;
  background: rgba(0, 0, 0, 0.1);
}

.hcg-context-menu-header {
  padding: 6px 12px 5px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7177;
  cursor: default;
  pointer-events: none;
}

.hcg-context-menu-animate .hcg-context-menu-panel {
  animation: hcg-context-menu-in 0.12s ease-out;
  transform-origin: top left;
}

@keyframes hcg-context-menu-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hcg-context-menu-animate .hcg-context-menu-panel {
    animation: none;
  }
}

@media (prefers-color-scheme: dark) {
  .hcg-context-menu-panel {
    background: #23262b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6e8ea;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  }
  .hcg-context-menu-separator {
    background: rgba(255, 255, 255, 0.12);
  }
  .hcg-context-menu-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }
  .hcg-context-menu-disabled {
    color: #6b7177;
  }
}
