/* HMS-1904 — shared in-app confirmation modal. The structure is built by
   app/javascript/utils/app_confirm.js so Turbo confirmations and one-off
   controller flows render the same dialog everywhere. */
.app-confirm-dialog {
  border: 0;
  border-radius: var(--wa-border-radius-l);
  padding: 1.5rem;
  width: min(26rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  align-items: stretch;
  background: var(--wa-color-surface-raised);
  color: var(--wa-color-text-normal);
  box-shadow: 0 1.5rem 3rem rgb(15 23 42 / 0.25);
}

.app-confirm-dialog::backdrop {
  background: rgb(15 23 42 / 0.6);
}

.app-confirm-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-confirm-dialog__title {
  margin: 0;
  color: var(--wa-color-text-normal);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.app-confirm-dialog__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--wa-border-radius-m);
  background: transparent;
  color: var(--wa-color-text-quiet);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.app-confirm-dialog__close:hover {
  color: var(--wa-color-text-normal);
  background: var(--wa-color-surface-lowered);
}

.app-confirm-dialog__message {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
}

.app-confirm-dialog__message[hidden] {
  display: none;
}

.app-confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.app-confirm-dialog__cancel,
.app-confirm-dialog__ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: var(--wa-border-radius-m);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
}

.app-confirm-dialog__cancel {
  border: 1px solid var(--wa-color-neutral-border-quiet);
  background: var(--wa-color-surface-raised);
  color: var(--wa-color-text-normal);
}

.app-confirm-dialog__ok {
  border: 0;
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
}

.app-confirm-dialog__ok--danger {
  background: var(--wa-color-danger-fill-loud);
  color: var(--wa-color-danger-on-loud);
}

.app-confirm-dialog__cancel:focus-visible,
.app-confirm-dialog__ok:focus-visible,
.app-confirm-dialog__close:focus-visible {
  outline: 2px solid var(--wa-color-brand-fill-loud);
  outline-offset: 2px;
}
