/* Centered explicitly: site CSS overrides the UA stylesheet's margin:auto. height:fit-content
   stops it stretching to fill inset:0. */
.idle-timeout-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: calc(100% - 2rem);
  max-width: 32rem;
  height: fit-content;
  max-height: calc(100% - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  background: #fff;
  color: #212529;
}

/* ::backdrop inherits nothing from the page. */
.idle-timeout-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.idle-timeout-dialog h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.idle-timeout-dialog p {
  margin: 0 0 0.75rem;
}

.idle-timeout-countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.idle-timeout-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* Assistive tech only. Not Bootstrap's .sr-only, which is renamed in Bootstrap 5. */
.idle-timeout-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
