/* BsUi - dialogs, confirm, toast, popover. Everything is prefixed `bsui-` and inert until bs-ui.js creates it,
   so it is inert on any page that does not use it. Colours fall back to the brand values. */

.bsui-dialog { width: calc(100% - 32px); max-width: 420px; padding: 0; border: 0; border-radius: 14px; background: #fff; color: #14181a; font: 400 14px/1.43 'Public Sans', system-ui, -apple-system, sans-serif; letter-spacing: -.224px; max-height: calc(100vh - 48px); overflow: auto; }
.bsui-dialog::backdrop { background: rgba(0,0,0,.28); }
.bsui-dialog form { margin: 0; }
.bsui-body { padding: 24px; }
.bsui-title { margin: 0; font: 700 19px/1.2 'Bricolage Grotesque', system-ui, sans-serif; letter-spacing: -.02em; text-transform: uppercase; }
.bsui-text { margin-top: 8px; color: rgba(20,24,26,.6); line-height: 1.5; }
.bsui-text:first-child { margin-top: 0; }
.bsui-error { margin-top: 12px; color: #c81e2c; font-size: 13px; line-height: 1.4; }
.bsui-field { display: block; margin-top: 16px; font-weight: 600; }
.bsui-field input, .bsui-field textarea, .bsui-field select { display: block; width: 100%; margin-top: 6px; padding: 10px 14px; border: 1.5px solid rgba(20,24,26,.3); border-radius: 10px; font: 400 15px 'Public Sans', system-ui, sans-serif; color: #14181a; outline: none; }
.bsui-field input:focus, .bsui-field textarea:focus, .bsui-field select:focus { border-color: #14181a; }
.bsui-danger .bsui-body { display: flex; gap: 14px; }
.bsui-danger .bsui-body::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 9999px; background: #c81e2c; }
.bsui-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid rgba(20,24,26,.1); background: #eef0e9; }
.bsui-btn { min-height: 40px; padding: 0 20px; border: 1.5px solid #14181a; border-radius: 10px; background: #fff; color: #14181a; font: inherit; cursor: pointer; white-space: nowrap; }
.bsui-btn:active { transform: scale(.96); }
.bsui-btn-primary { padding: 0 22px; background: #ffc93c; font: 700 14px 'Bricolage Grotesque', system-ui, sans-serif; box-shadow: 3px 3px 0 #14181a; }
.bsui-btn-danger { padding: 0 22px; background: #c81e2c; border-color: #c81e2c; border-radius: 9999px; color: #fff; font-weight: 600; }

#bsui-toasts { position: fixed; z-index: 2147483000; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.bsui-toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1.5px solid #14181a; border-radius: 10px; box-shadow: 3px 3px 0 rgba(20,24,26,.15); font: 400 14px/1.43 'Public Sans', system-ui, sans-serif; color: #14181a; cursor: pointer; animation: bsui-in .18s ease-out; }
.bsui-toast::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 9999px; background: #14181a; }
.bsui-toast.bsui-success::before { background: #00695c; }
.bsui-toast.bsui-error::before { background: #c81e2c; }
@keyframes bsui-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) { #bsui-toasts { right: 16px; left: 16px; bottom: 84px; width: auto; } }

.bsui-popover { position: absolute; z-index: 2147482000; min-width: 180px; padding: 6px; background: #fff; border: 1.5px solid rgba(20,24,26,.3); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.14); font: 400 14px/1.43 'Public Sans', system-ui, sans-serif; color: #14181a; }
.bsui-popover button, .bsui-popover a { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
.bsui-popover button:hover, .bsui-popover a:hover { background: #f4f5f0; color: inherit; }
.bsui-popover .bsui-bad { color: #c81e2c; }

@media (prefers-reduced-motion: reduce) { .bsui-toast { animation: none; } .bsui-btn:active { transform: none; } }

.bsui-dialog .hint { margin: 0; font-size: 13px; color: rgba(20,24,26,.6); line-height: 1.5; }
