/* Toasts and modal dialogs. */

/* ===== TOASTS ===== */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 6px 10px 12px;
  background: var(--fg);
  color: var(--bg);
  border-left: 4px solid var(--fg);
}
.toast--error {
  border-left-color: var(--accent);
}
.toast--success {
  border-left-color: var(--accent);
}
.toast > .icon {
  flex: none;
  margin-top: 2px;
}
.toast__msg {
  flex: 1;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.toast__close {
  width: 26px;
  height: 26px;
  color: var(--bg);
}
.toast__close:hover {
  border-color: var(--bg);
}
.toast :focus-visible {
  outline-color: var(--accent);
}

/* ===== DIALOGS ===== */
.modal {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--fg);
}
.modal--wide {
  width: min(760px, calc(100vw - 24px));
}
.modal::backdrop {
  background: rgba(20, 20, 20, 0.5);
}
.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.modal__title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 750;
}
.modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 18px;
}
.modal__text {
  overflow-wrap: anywhere;
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
