/* Hand-written extras on top of Tailwind (built to app/assets/builds). */

/* Native selects ignore most utility styling; give them the same pill shape
   as the rest of the filter bar plus our own chevron. */
.field {
  appearance: none;
  background-color: var(--color-ink-800, #16161c);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 9999px;
  color: #e7e5e4;
  font-size: 0.8125rem;
  padding: 0.4rem 0.85rem;
  line-height: 1.25rem;
}

select.field {
  padding-right: 1.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a8a29e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
}

.field::placeholder { color: #6b6b76; }

.field:focus {
  outline: none;
  border-color: var(--color-gold-400, #e0ac43);
  box-shadow: 0 0 0 3px rgb(224 172 67 / 18%);
}

/* Trix is built for light backgrounds; repaint it rather than leaving a white
   slab in the middle of a black page. */
trix-editor {
  background: var(--color-ink-950, #08080a);
  color: #e7e5e4;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 0.75rem;
  min-height: 10rem;
  padding: 0.75rem;
}

trix-editor:empty::before { color: #6b6b76; }

trix-toolbar .trix-button-group {
  background: var(--color-ink-800, #16161c);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 0.5rem;
  overflow: hidden;
}

trix-toolbar .trix-button {
  background: transparent;
  border-bottom: none;
  border-color: rgb(255 255 255 / 8%);
  color: #d6d3d1;
}

trix-toolbar .trix-button:not(:disabled):hover { background: rgb(255 255 255 / 8%); }
trix-toolbar .trix-button.trix-active { background: var(--color-gold-400, #e0ac43); color: #0a0a0a; }
trix-toolbar .trix-button--icon::before { filter: invert(1) opacity(0.75); }

/* Rendered description HTML (legacy Summernote + new Trix output). Tailwind's
   preflight strips list markers and heading sizes, so put them back here —
   imported descriptions are plain HTML with no classes to hook onto. */
.rich-content a { color: var(--color-gold-300, #ecc571); text-decoration: underline; }
.rich-content img { max-width: 100%; height: auto; border-radius: 0.5rem; }
.rich-content p { margin: 0 0 0.75rem; }
.rich-content h1, .rich-content h2, .rich-content h3 {
  margin: 1rem 0 0.5rem;
  font-weight: 600;
  color: #e7e5e4;
}
.rich-content h1 { font-size: 1.25rem; }
.rich-content h2 { font-size: 1.125rem; }
.rich-content h3 { font-size: 1rem; }
.rich-content ul, .rich-content ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content blockquote {
  margin: 0 0 0.75rem;
  border-left: 3px solid rgb(255 255 255 / 20%);
  padding-left: 0.75rem;
  color: #a8a29e;
}
.rich-content pre { overflow-x: auto; }
.rich-content table { display: block; overflow-x: auto; }

/* Cards are covers first: the caption rides in on hover. It stays put on
   anything that cannot hover, and on narrow screens regardless — a phone
   that reports hover support still has no pointer to reveal it with. */
@media (hover: hover) and (min-width: 640px) {
  .card__caption { opacity: 0; transform: translateY(0.5rem); }
  .card:hover .card__caption,
  .card:focus-within .card__caption { opacity: 1; transform: none; }
}
