/* Application styles on top of Bulma. Keep this small: prefer Bulma classes
   in the templates. No inline styles anywhere; the CSP forbids them. */

/* htmx request indicator (htmx's own injected styles are disabled for the CSP). */
.htmx-indicator { opacity: 0; transition: opacity 150ms ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Toast messages, bottom right. */
#toasts {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 100;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: min(28rem, calc(100vw - 2rem));
}
#toasts .notification { margin: 0; box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.2); }

/* Keep text clear of the dismiss button. */
.notification:has(> .delete) { padding-right: 3rem; }

/* Confirmation dialog: a native <dialog>, dressed as a Bulma box. */
#confirm-dialog {
  border: 0; padding: 0; background: transparent;
  width: min(30rem, calc(100vw - 2rem));
}
#confirm-dialog::backdrop { background: rgba(10, 10, 10, 0.6); }

/* The hidden attribute must win over Bulma's display rules (.column, .field
   and others set display themselves and would show a hidden element). */
[hidden] { display: none !important; }

/* The navbar burger is a <button> for keyboard access. */
button.navbar-burger { border: 0; background: transparent; }

/* Sticky footer on short pages. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* Long unbroken values (fingerprints, keys, codes) wrap inside their box. */
.wrap-anywhere { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }

/* A secret shown once: monospace, selectable in one click. */
.secret { font-family: var(--bulma-family-code, monospace); user-select: all; overflow-wrap: anywhere; }
