@import "tailwindcss";

/* Tailwind 4 source globs.
 *
 * Default scan picks up .html, .erb, .js, .jsx, .ts, .tsx. Phlex
 * components ARE Ruby files (.rb), so without this directive Tailwind
 * never sees the utility classes embedded inside `class:` attrs and
 * tree-shakes them out at build time. Result: classes like
 * `vd-md:flex` are missing from the compiled CSS even though they
 * appear all over the component source.
 */
@source "../../components/**/*.rb";
@source "../../views/**/*.rb";

/* Theme — Voodu CSS vars + Tailwind @theme mapping. */
@import "./voodu/theme.css";

/* ── Global resets / base ── */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--voodu-bg);
  color: var(--voodu-text);
  font-family: var(--voodu-font-sans);
  font-size: var(--voodu-font-size-base);
  line-height: var(--voodu-line-height);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; /* Geist character variants */
}

::selection {
  background: var(--voodu-accent-dim);
  color: var(--voodu-accent-2);
}

/* Scrollbars — hidden globally.
 *
 * Operator preference (consistent across the app): the scrollbar
 * track is dead pixels. Wheel/trackpad/keyboard scroll still work
 * — only the visual chrome is suppressed. Without this rule Safari
 * persistently shows the bar (macOS "always show" + iPadOS default),
 * which on tight surfaces like the pod-detail drawer or the chart
 * grid steals a few px of horizontal real estate and breaks the
 * grid's pixel rhythm.
 *
 * Coverage:
 *   WebKit (Safari, Chrome, Edge, iOS): ::-webkit-scrollbar display:none
 *   Firefox:                            scrollbar-width: none
 *   Legacy IE/Edge:                     -ms-overflow-style: none
 *
 * Applied on `*` so every nested scroll container inherits the
 * hidden state — no need to remember `class="scrollbar-hidden"` on
 * each drawer / modal / overflow-auto block.
 */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Utility: scrollbar-hidden — kept as an explicit opt-in (now
 * redundant with the global rule above) so existing call sites
 * referencing the class don't break. Safe to remove the
 * `class="scrollbar-hidden"` attributes in a follow-up sweep when
 * touching those files. */
@utility scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;

  &::-webkit-scrollbar {
    display: none;
  }
}
