/* Shared across all pages: htmx request indicator, disabled-button state, the
   top-of-page loading bar shown during htmx requests (including hx-boost navigation),
   and the app-wide font-size scale. */

:root {
  --nt93-font-size-xs: 0.7rem;    /* 11.2px — hints, timestamps, small badges */
  --nt93-font-size-sm: 0.85rem;   /* 13.6px — table rows, form/panel body text */
  --nt93-font-size-md: 1rem;      /* 16px   — default body text */
  --nt93-font-size-lg: 1.125rem;  /* 18px   — subheadings */
  --nt93-font-size-xl: 1.5rem;    /* 24px   — headings */
}

.htmx-indicator { display: none; }
.htmx-request.htmx-indicator, .htmx-request .htmx-indicator { display: inline-block; }
button[disabled] { cursor: not-allowed; opacity: 0.7; }

/* Bootstrap's .badge defaults to font-size: .75em (relative to its context, so it
   shrinks along with the smaller table/panel font-size). Use an absolute size from
   the scale instead so badges stay legible everywhere. */
.badge { font-size: var(--nt93-font-size-sm); }

/* Small uppercase page-label/status chip (header page name, "BETA" tag, etc.) */
.nt93-badge { font-size: var(--nt93-font-size-xs); text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid #333; color: #9ca3af; padding: 2px 6px; border-radius: 2px; }

#nt93-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 2000;
  pointer-events: none;
}
#nt93-loading-bar .bar {
  height: 100%;
  width: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  transform-origin: left;
}
#nt93-loading-bar.is-loading .bar {
  opacity: 1;
  width: 85%;
  transition: width 6s cubic-bezier(0.1, 0.7, 1, 0.1);
}
#nt93-loading-bar.is-done .bar {
  width: 100%;
  opacity: 0;
  transition: width 200ms ease-out, opacity 300ms ease-out 150ms;
}

/* Shared confirm dialog (partials/ui/confirm-modal.ejs), replacing the native
   window.confirm() that hx-confirm="..." would otherwise trigger — see
   app.js's htmx:confirm listener for the JS side. */
.nt93-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.nt93-modal {
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
body.nt93-modal-open {
  overflow: hidden;
}
