/*
 * App theme overrides for Bulma. Loaded AFTER bulma.min.css so these win.
 * Re-themes Bulma to the White Cell brand blues and adds the few app-specific
 * bits Bulma doesn't provide (the HTMX loading affordance).
 *
 * Brand palette:
 *   #327BB0  medium blue  = hsl(205.2, 55.8%, 44.3%)  -> primary
 *   #AFD6F2  light blue   = hsl(205.1, 72%,   81.8%)  -> light accent / page bg
 */

:root {
  /* Primary = brand medium blue #327BB0. Drives the navbar (is-primary),
     primary buttons, links, and derived shades. */
  --bulma-primary-h: 205.2deg;
  --bulma-primary-s: 55.8%;
  --bulma-primary-l: 44.3%;
  /* White text on the primary — Bulma's default invert is dark, which would be
     low-contrast on this mid blue. Drives navbar text + is-primary labels. */
  --bulma-primary-invert-l: 100%;

  /* Primary "light" variant pinned to the exact brand light blue #AFD6F2
     (used by is-light components, tags, notifications). */
  --bulma-primary-light: #AFD6F2;

  /* Links in the brand blue, slightly darkened for readable body text. */
  --bulma-link-h: 205.2deg;
  --bulma-link-s: 55.8%;
  --bulma-link-l: 38%;

  /* Brand light blue as the page background; white cards sit on top of it. */
  --bulma-body-background-color: #AFD6F2;
}

/* Brand accent: a primary top edge on cards ties them to the palette. */
.card {
  border-top: 3px solid var(--bulma-primary);
}

/* The horizontal logo is the COLOR (on-light) variant with a blue wordmark,
   which blends into the brand-blue navbar. Sit it on a white pill so it stays
   legible. The hover overrides stop Bulma darkening the pill on hover. */
.navbar.is-primary .brand-logo {
  background: #fff;
  border-radius: 6px;
  margin: 0.4rem 0.5rem;
  padding: 0 0.75rem;
}
.navbar.is-primary .brand-logo:hover,
.navbar.is-primary .brand-logo:focus {
  background: #fff;
}

/* HTMX loading indicator: hidden until the triggering element is mid-request. */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Small inline spinner used inside the Refresh button. */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
