/* The dialog: a native modal dialog over a scrim, a heading with its close button, and what the app puts in it. An
   answer dialog (data-answers) has the answer whole as its body, its heading and close button in it, styled the same.
   Shared tokens and layout words only, on the root of the dialog (packages/components/src/styles.ts). No rule gives
   the dialog a display of its own: closed, the rule of the browser hides it. */
.dialog {
  inline-size: var(--nw-size-panel-width);
  padding: 0;
  color: var(--nw-color-text);
  background: var(--nw-color-surface-raised);
  border: var(--nw-border-width-1) solid var(--nw-color-border-strong);
  border-radius: var(--nw-radius-m);
  box-shadow: var(--nw-shadow-dialog);
}

.dialog::backdrop {
  background: var(--nw-color-scrim);
}

.dialog > header,
.dialog[data-answers] > div > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nw-space-12);
  padding-block: var(--nw-space-8);
  padding-inline: var(--nw-space-16);
  background: var(--nw-color-surface-sunken);
}

.dialog h2 {
  margin: 0;
  font-size: var(--nw-font-size-title);
  font-weight: var(--nw-font-weight-semibold);
  line-height: var(--nw-line-height-tight);
}

.dialog > header button,
.dialog[data-answers] > div > header button {
  min-block-size: var(--nw-size-control-compact);
  padding-inline: var(--nw-space-12);
  font: inherit;
  color: var(--nw-color-accent-text);
  background: inherit;
  border: var(--nw-border-width-1) solid var(--nw-color-border-strong);
  border-radius: var(--nw-radius-m);
  cursor: pointer;
}

.dialog > header button:hover,
.dialog[data-answers] > div > header button:hover {
  background: var(--nw-color-surface-hover);
}

.dialog > div {
  padding: var(--nw-space-16);
}

.dialog[data-answers] > div {
  padding: 0;
}

.dialog[data-answers] > div > div {
  padding: var(--nw-space-16);
}
