/* ──────────────────────────────────────────────────────────────
   application.css — MANIFEST

   Propshaft serves each file as-is, so the stylesheets are linked
   individually from app/views/layouts/application.html.erb in this
   order. Load order is the cascade; do not reorder.

     1. tailwind.css      compiled from app/assets/tailwind/application.css
                          (`bin/rails tailwindcss:build`) — holds the
                          @theme tokens for the LIGHT palette
     2. tokens.css        semantic aliases + the dark palette + the ground
     3. typography.css    type scale, display face, links, focus rings
     4. material.css      the one material: surfaces, buttons, fields
     5. components.css    tabs, chips, badges, notices, monograms
     6. chrome.css        header, footer, page shell, the home cross
     7. motion.css        the single page entrance + reduced motion
     8. new_group_form.css  layout for the zig-zag new-group form only
     9. guided_assistant.css  bead frame + prayer card, that page only
    10. application.css   this file: page-level odds and ends

   Rules of the system live in docs/design_system.md.
   ────────────────────────────────────────────────────────────── */

/* Rails' own flash/error scaffolding, aligned to the palette. */
.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
  border-color: var(--color-rubric);
}

/* Flatpickr sits on the ground, so it gets the material too. */
.flatpickr-calendar {
  border-radius: var(--radius-md) !important;
  border: 0.5px solid var(--hairline) !important;
  box-shadow: var(--shadow-float) !important;
  font-family: var(--font-body) !important;
}

/* Hide a scrollbar without hiding the overflow. */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ──────────────────────────────────────────────────────────────
   Display utilities, re-asserted.

   The component stylesheets load after tailwind.css, so a class
   like .glass-button { display: inline-flex } would otherwise beat
   Tailwind's .hidden / .md:hidden at equal specificity. Redeclaring
   just the display utilities here — last file, no !important —
   restores the expected "utility wins" behaviour without breaking
   combinations such as `hidden md:flex`.
   ────────────────────────────────────────────────────────────── */
.hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .md\:hidden {
    display: none;
  }
  .md\:block {
    display: block;
  }
  .md\:flex {
    display: flex;
  }
  .md\:inline-flex {
    display: inline-flex;
  }
  .md\:grid {
    display: grid;
  }
}
