/* The Help launcher and panel (views/support.js), and the /support page. */

.nw-help {
  position: fixed;
  right: 18px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.nw-help-launcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px 0 11px;
  border: 0;
  border-radius: 16px;
  background: var(--nw-nav);
  color: var(--nw-nav-active);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgb(15 34 52 / 28%);
  cursor: pointer;
}

.nw-help-launcher:hover {
  background: var(--nw-nav-soft);
  color: var(--nw-nav-active);
  text-decoration: none;
}

.nw-help-launcher:focus-visible,
.nw-help-panel :focus-visible {
  outline: 2px solid var(--nw-accent-bright);
  outline-offset: 2px;
}

.nw-help-panel {
  display: flex;
  flex-direction: column;
  order: -1;
  width: 360px;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 100px);
  border: 1px solid var(--nw-line-strong);
  border-radius: 6px;
  background: var(--nw-surface);
  box-shadow: 0 10px 34px rgb(15 34 52 / 26%);
  overflow: hidden;
}

.nw-help-panel[hidden],
.nw-help [hidden] {
  display: none;
}

.nw-help-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 8px 0 14px;
  background: var(--nw-nav);
  color: var(--nw-nav-active);
}

.nw-help-head h2 {
  flex: 1;
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.nw-help-head h2:focus {
  outline: none;
}

.nw-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--nw-nav-text);
  font-size: 20px;
  cursor: pointer;
}

.nw-help-icon:hover {
  background: var(--nw-nav-soft);
  color: var(--nw-nav-active);
}

.nw-help-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
}

.nw-help-label {
  display: block;
  margin-bottom: 5px;
  color: var(--nw-muted);
  font-size: 12px;
}

.nw-help input,
.nw-help textarea,
.nw-support-page input,
.nw-support-page textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--nw-line-strong);
  border-radius: 3px;
  background: var(--nw-surface);
}

.nw-help textarea,
.nw-support-page textarea {
  resize: vertical;
}

.nw-help [aria-invalid="true"],
.nw-support-page [aria-invalid="true"] {
  border-color: var(--nw-danger);
}

.nw-help-articles {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.nw-help-articles li {
  border-bottom: 1px solid var(--nw-line);
}

.nw-help-articles summary {
  padding: 8px 2px;
  color: var(--nw-link);
  cursor: pointer;
}

.nw-help-articles p {
  margin: 0 0 10px;
  padding: 0 2px 0 14px;
  color: var(--nw-text);
}

.nw-help-empty {
  margin: 10px 0 0;
}

.nw-help-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--nw-head);
}

.nw-help-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nw-help-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.nw-help-hint {
  padding-top: 3px;
  color: var(--nw-muted);
  font-size: 12px;
}

.nw-help-attached {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--nw-line);
  border-radius: 3px;
  background: var(--nw-selected);
  color: var(--nw-open-text);
  font-size: 12.5px;
}

.nw-help-alert {
  padding: 7px 10px;
  border: 1px solid #f0bdb7;
  border-radius: 3px;
  background: var(--nw-overdue-bg);
  color: var(--nw-danger);
}

.nw-help-actions {
  display: flex;
  justify-content: flex-end;
}

.nw-help-actions .button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.nw-help-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 6px;
  text-align: center;
}

.nw-help-sent p {
  margin: 0;
}

.nw-help-sent-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--nw-ok-bg);
  color: var(--nw-ok-text);
}

.nw-help-sent-title {
  font-size: 15px;
  font-weight: 600;
}

.nw-help-sent .button {
  margin-top: 10px;
}

.nw-help-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.nw-support-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.nw-support-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.nw-support-section h2 {
  margin: 0;
  font-size: 14px;
}

@media print {
  .nw-help {
    display: none;
  }
}
