/* Styles of the dialog title actions added by dialog-tools.js. */

/* The actions sit in the top right corner of the dialog, on the line of the
   title. This works in block and flex dialogs. */
.dialog-actions {
  position: absolute;
  top: 17px;
  right: 16px;
  display: flex;
  gap: 4px;
}

.dialog-actions + .consent-title {
  padding-right: 108px;
}

.dialog-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.dialog-action[hidden],
.dialog-command[hidden],
.dialog-command [hidden] {
  display: none;
}

.dialog-action:hover,
.dialog-action[aria-expanded="true"],
.dialog-action[aria-pressed="true"] {
  background: var(--bg-btn);
  color: var(--text);
}

.dialog-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dialog-action svg {
  width: 16px;
  height: 16px;
}

.dialog-command {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-raised);
}

.dialog-command-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dialog-command-head .btn {
  margin-left: auto;
}

.dialog-command-text {
  max-height: 240px;
  margin: 0;
  padding: 8px 10px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre;
}

.dialog-command-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.dialog-command-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* A maximized dialog leaves a small margin, so it still reads as a dialog. */
.consent-overlay .consent-dialog.dialog-maximized {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
}

.consent-dialog.dialog-maximized .dialog-command-text {
  max-height: 50vh;
}
