/* Shared spacing applies to every alert in the product and component library. */
.alert { align-items: center; margin-block: 20px; }
.alert > svg { flex: 0 0 18px; margin: 0; align-self: center; }
.alert > div { min-width: 0; }
.alert:first-child { margin-block-start: 0; }
.alert:last-child { margin-block-end: 0; }
:where(.stack, .auth-card form, .op-module) > .alert { margin-block: 0; }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  display: inline-block; vertical-align: middle; flex-shrink: 0;
  width: 20px; height: 20px; min-width: 20px; padding: 0; margin: 0;
  border: 1.5px solid #a9bbd5; border-radius: 6px;
  background-color: #fff; background-position: center; background-repeat: no-repeat; background-size: 15px;
  box-shadow: 0 1px 3px #1233600a; cursor: pointer;
  transition: background-color .18s, border-color .18s, box-shadow .18s;
}
input[type="checkbox"]:checked {
  border-color: var(--brand); background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m4 10 4 4 8-8' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
input[type="checkbox"]:indeterminate {
  border-color: var(--brand); background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
input[type="checkbox"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 3px; }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
.choice:has(input[type="checkbox"]) { align-items: center; }
.choice input[type="checkbox"], .permission-table input[type="checkbox"], .op-permission-table input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.choice:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 45%, white); background: color-mix(in srgb, var(--brand) 6%, white); }
.field-label { display: flex; align-items: center; gap: 6px; min-height: 17px; }
.field-tooltip-trigger { display: inline-grid; place-items: center; padding: 2px; width: 23px; height: 23px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: help; }
.field-tooltip-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.field-tooltip { position: fixed; inset: auto; margin: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; max-width: min(270px, calc(100vw - 24px)); background: #fff; color: var(--ink); font-size: 12px; font-weight: 400; line-height: 1.6; box-shadow: 0 10px 30px #17385b22; }
.field-tooltip::backdrop { background: transparent; }
@media (hover: hover) and (pointer: fine) {
  input[type="checkbox"]:hover:not(:disabled) { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 9%, transparent); }
  .choice:hover:has(input:not(:disabled)) { border-color: color-mix(in srgb, var(--brand) 45%, white); }
  .field-tooltip-trigger:hover { color: var(--brand); background: var(--brand-soft); }
}
@media (forced-colors: active) { input[type="checkbox"] { appearance: auto; } }
