.nav-elevation {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.nav-elevation:empty,
.nav-elevation:not(:has(button:not([hidden]))) {
  display: none;
}

.nav-elevate-btn,
.nav-elevation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 4px 11px;
  white-space: nowrap;
}

.nav-elevate-btn[hidden],
.nav-elevation-pill[hidden] {
  display: none;
}

.nav-elevate-btn {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.nav-elevate-btn:hover {
  background: rgba(245, 158, 11, 0.2);
}

.nav-elevation-pill {
  border: 1px solid rgba(224, 108, 117, 0.7);
  background: rgba(224, 108, 117, 0.16);
  color: #ff9aa2;
}

.nav-elevation-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 10px rgba(224, 108, 117, 0.8);
}

.nav-elevation-short {
  display: none;
}

.elevation-panel {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 130;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  border: 1px solid rgba(224, 108, 117, 0.5);
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.98);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  padding: 14px;
}

.elevation-panel strong {
  color: #ff9aa2;
  letter-spacing: 0.04em;
}

.elevation-panel > div {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.elevation-panel .is-danger,
.elevation-actions button {
  border: 1px solid rgba(127, 132, 142, 0.36);
  border-radius: 7px;
  background: rgba(45, 45, 45, 0.9);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  min-height: 38px;
  padding: 8px 12px;
}

.elevation-panel .is-danger {
  border-color: rgba(224, 108, 117, 0.62);
  background: rgba(224, 108, 117, 0.18);
  color: #e06c75;
  font-weight: 700;
}

.elevation-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 18px;
}

.elevation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.elevation-dialog {
  position: relative;
  display: grid;
  gap: 6px;
  width: min(520px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.98);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
  padding: 22px;
}

.elevation-kicker {
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.elevation-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}

.elevation-dialog p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.elevation-dialog label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.elevation-dialog label span {
  color: var(--faint);
  font-weight: 500;
}

.elevation-dialog select,
.elevation-dialog input,
.elevation-dialog textarea {
  width: 100%;
  border: 1px solid rgba(127, 132, 142, 0.4);
  border-radius: 7px;
  background: rgba(9, 9, 9, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  min-height: 40px;
  padding: 9px 11px;
}

.elevation-dialog textarea {
  resize: vertical;
}

.elevation-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
}

.elevation-error {
  color: #e06c75;
  font-size: 12px;
}

.elevation-status {
  min-height: 18px;
  color: #e5c07b;
  font-size: 13px;
  line-height: 1.45;
}

.elevation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.elevation-actions button[hidden] {
  display: none;
}

.elevation-actions .is-primary {
  border-color: rgba(152, 195, 121, 0.62);
  background: rgba(152, 195, 121, 0.18);
  color: var(--green);
  font-weight: 700;
}

.elevation-actions button:disabled,
.elevation-panel .is-danger:disabled {
  cursor: progress;
  opacity: 0.65;
}

@media (max-width: 640px) {
  .nav-elevation-full {
    display: none;
  }

  .nav-elevation-short {
    display: inline;
  }

  .nav-elevate-btn span {
    display: none;
  }

  .elevation-panel {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
  }

  .elevation-actions button {
    flex: 1 1 auto;
  }
}
