/* Symbols tool — fonts and the plain-CSS bits CSS/Symbols/app.js depends on.
   ---------------------------------------------------------------------------
   The tool's prebuilt symbols.tw.css is not loaded on the redesigned page (this
   page already has Tailwind, and that build carries the old blue palette).
   rd_tool_palette() remaps the token names the script emits — bg, container,
   container-light, accent, muted — onto the brand colours instead.

   Everything below is scoped to #symbolsApp so nothing reaches the site chrome.
   The accent-coloured affordances were hard-coded to the tool's old blue
   (#83b7f9); they now read from the brand token. */

@font-face { font-family: 'Minecraft';        src: url('/CSS/Symbols/fonts/minecraft.otf') format('opentype');                font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'MinecraftDefault'; src: url('/CSS/Symbols/fonts/MinecraftDefault-Regular.ttf') format('truetype'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'MinecraftDefault'; src: url('/CSS/Symbols/fonts/MinecraftDefault-Bold.ttf') format('truetype');    font-weight: bold;   font-style: normal; font-display: swap; }
@font-face { font-family: 'MinecraftDefault'; src: url('/CSS/Symbols/fonts/MinecraftDefault-Italic.ttf') format('truetype');  font-weight: normal; font-style: italic; font-display: swap; }
@font-face { font-family: 'MinecraftDefault'; src: url('/CSS/Symbols/fonts/MinecraftDefault-BoldItalic.ttf') format('truetype'); font-weight: bold; font-style: italic; font-display: swap; }
@font-face { font-family: 'Unifont';          src: url('/CSS/Symbols/fonts/unifont.otf') format('opentype');                  font-weight: normal; font-style: normal; font-display: swap; }

#symbolsApp, #symbolsApp * { box-sizing: border-box; }

/* Tailwind preflight is off site-wide (it would reset the site chrome), so
   restore only the button reset the tool assumes. :where() keeps specificity at
   0 so utility classes still win. */
:where(#symbolsApp) button {
  font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit;
  color: inherit; margin: 0; padding: 0; background-color: transparent;
  background-image: none; text-transform: none; -webkit-appearance: button; cursor: pointer;
}

#symbolsApp { color: var(--text-head); }
#symbolsApp ::-webkit-scrollbar { width: 8px; }
#symbolsApp ::-webkit-scrollbar-track { background: var(--splash-black); }
#symbolsApp ::-webkit-scrollbar-thumb { background: var(--feature-border); border-radius: 4px; }
#symbolsApp ::-webkit-scrollbar-thumb:hover { background: #4A5264; }

.categories-scroll::-webkit-scrollbar { height: 4px; }
.categories-scroll::-webkit-scrollbar-track { background: transparent; }
.categories-scroll::-webkit-scrollbar-thumb { background: var(--feature-border); border-radius: 2px; }
.cat-arrow:disabled { opacity: .3; cursor: default; }
.cat-arrow:disabled:hover { background: var(--feature); color: var(--text-subtle); }

/* Cap the symbol grid to a few rows and scroll inside it, so the tool doesn't
   stretch to fill the whole page. */
.symbol-grid-scroll { max-height: 310px; overflow-y: auto; overscroll-behavior: contain; }
#grid-wrap { position: relative; }
.grid-scroll-hint {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-size: 12px; color: var(--text-subtle);
  background: linear-gradient(to bottom, rgba(23, 26, 34, 0), rgba(23, 26, 34, .96));
  pointer-events: none; opacity: 0; transition: opacity .2s ease;
}
.grid-scroll-hint.visible { opacity: 1; }

@keyframes flash-green { 0% { background: #46DF3133; border-color: var(--splash-green); } 100% { background: transparent; border-color: var(--feature-border); } }
.flash { animation: flash-green .6s ease-out; }

@keyframes toast-in  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(20px); opacity: 0; } }
.toast-enter { animation: toast-in .2s ease-out; }
.toast-exit  { animation: toast-out .2s ease-in forwards; }

@keyframes fade-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fade-in .2s ease-out; }

.mc-shadow { text-shadow: 2px 2px 0 rgba(63, 63, 63, 1); }

.format-body { max-height: 600px; overflow: hidden; transition: max-height .3s ease, opacity .3s ease; opacity: 1; }
.format-body.collapsed { max-height: 0; opacity: 0; }

.symbol-card { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.symbol-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 4px 12px rgba(226, 77, 102, .18); }
.symbol-card:active { transform: translateY(0); }

.recent-chip:hover { background: var(--feature-border); }

/* The colour-swatch buttons in the chat formatter. */
#symbolsApp .color-btn {
  width: 28px; height: 28px; border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; transition: transform .1s ease, border-color .15s ease;
}
#symbolsApp .color-btn:hover { transform: scale(1.15); border-color: rgba(255, 255, 255, .4); }

/* The scale slider. Overrides the generic .rd-tool range rule for this tool's
   thinner track. */
#symbolsApp input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: var(--feature-border); height: 4px; border-radius: 2px; outline: none;
  min-height: 0; padding: 0; border: 0;
}
#symbolsApp input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  background: var(--accent); border-radius: 50%; cursor: pointer;
}
#symbolsApp input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; background: var(--accent);
  border: 0; border-radius: 50%; cursor: pointer;
}

/* The native colour input is hidden; #color-picker-btn opens it. */
#symbolsApp input[type="color"] {
  -webkit-appearance: none; border: none; width: 0; height: 0; padding: 0;
  position: absolute; opacity: 0; pointer-events: none; min-height: 0;
}

/* This tool styles every one of its own controls with utility classes, so its
   page carries .rd-tool but NOT .rd-form — see the note above the .rd-form
   block in app.css. Only the padding the search icon needs is set here. */
#symbolsApp #search { padding-left: 40px; padding-right: 40px; }
