/*
  Global reset + the handful of things Tailwind's utility classes
  don't cover well (see the comment in base.html). Everything else in
  the app -- including, as of this pass, the entire curator admin
  panel -- is styled with Tailwind utility classes directly in the
  templates, so this file is intentionally small.
*/

* {
    box-sizing: border-box;
}

img, svg {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fafafa;
    color: #111;
}

button {
    font-family: inherit;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* htmx loading-indicator boilerplate (Phase 28): htmx toggles the
   `htmx-request` class on the element that triggered a request (or on
   whatever `hx-indicator` points at) for the duration of that
   request. Any element with the .htmx-indicator class starts hidden
   and is only shown while that class is present -- this is standard
   htmx boilerplate CSS, not something a static Tailwind utility class
   can express, since it depends on a class htmx adds/removes at
   runtime rather than anything present in the initial markup. Used by
   the small search-loading spinners in artifacts.html/codes.html. */
.htmx-indicator {
    opacity: 0;
    transition: opacity 150ms ease-in;
}
.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
    opacity: 1;
}

input, select, textarea {
    font-family: inherit;
}

/* Visitor chat widget (chat.html) message list. A small, bespoke,
   JS-driven component -- chat.html's inline <script> streams message
   bubbles in and toggles their own Tailwind utility classes for
   color/alignment, so this only supplies the couple of structural
   rules (scrollable log height, bubble text wrapping) that aren't
   naturally expressed as utilities. */

.chat-log {
    height: 60vh;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message {
    white-space: pre-wrap;
    word-wrap: break-word;
}
