/* Fancy Text Generator — this tool's own styles. Shared styles (colours, buttons, menu, toast…) are in /assets/style.css */

/* section headings are a little smaller and stacked on this page */
.narrow .head { display: block; margin-bottom: 26px; }
.narrow .head h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.04; }
.narrow .head .section-lede { margin-top: 14px; font-size: 16px; }

.panel { max-width: 760px; margin: 38px auto 0; padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; justify-items: center; }
.field { position: relative; width: 100%; }
#input { width: 100%; font: 500 18px/1.2 var(--font-body); color: var(--text); padding: 17px 56px 17px 22px;
  border-radius: 999px; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  outline: none; transition: box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
#input::placeholder { color: var(--text-2); font-weight: 400; }
#input:focus { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1.5px var(--accent-bright), 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }
.clear { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0;
  cursor: pointer; display: none; place-items: center; background: rgba(255,255,255,.1); color: var(--text-2); transition: background .2s, color .2s; padding: 0; }
.clear:hover { background: rgba(255,255,255,.18); color: var(--text); }
.clear svg { width: 18px; height: 18px; }
.field.has-text .clear { display: grid; }

.list { display: grid; gap: 12px; }
.item { border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  overflow: hidden; scroll-margin-top: 96px; transition: box-shadow .25s; }
.item.open { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-bright) 55%, transparent); }
.row { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 0; }
.txt { flex: 1; min-width: 0; font: 500 18px/1.3 var(--font-body); color: var(--text); background: transparent; border: 0; outline: none;
  padding: 13px 8px 13px 20px; text-overflow: ellipsis; -webkit-appearance: none; appearance: none; }
.list > .item > .row .txt { cursor: pointer; }
.tog { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: transparent; color: var(--text-2); transition: background .2s, color .2s; padding: 0; }
.tog:hover { background: rgba(255,255,255,.08); color: var(--text); }
.tog svg { width: 20px; height: 20px; transition: transform .25s ease; }
.item.open > .row .tog svg { transform: rotate(180deg); }
.copy { min-width: 108px; }
.more { display: none; flex-direction: column; gap: 8px; padding: 12px 10px 14px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.18); }
.item.open > .more { display: flex; }
.more .item { background: rgba(255,255,255,.05); border-radius: 14px; box-shadow: none; }
.more .txt { font-size: 16px; padding: 10px 8px 10px 16px; }
.more .copy { min-width: 96px; padding: 9px 14px; font-size: 14px; }

.symbols { display: flex; flex-wrap: wrap; gap: 8px; }
.sym { font: 600 20px/1 var(--font-body); color: var(--text); cursor: pointer; padding: 11px 15px; border-radius: 12px; border: 0;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: background .2s, transform .2s; }
.sym:hover { background: color-mix(in srgb, var(--accent) 80%, transparent); transform: translateY(-2px); }

@media (max-width: 640px) {
  #input { font-size: 16px; }
  .txt { font-size: 16px; padding-left: 16px; }
  .copy { min-width: 92px; }
  .more .copy { min-width: 84px; }
}

/* favourite star on each style */
.fav { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: transparent; color: var(--text-2); transition: background .2s, color .2s; padding: 0; }
.fav:hover { background: rgba(255,255,255,.08); color: var(--text); }
.fav svg { width: 19px; height: 19px; }
.fav[aria-pressed="true"] { color: #fcd34d; --star-fill: #fcd34d; }
.item.is-fav { box-shadow: inset 0 0 0 1px rgba(252,211,77,.35); }
.list-label { font: 500 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); margin: 10px 0 0 6px; }
.list-label:first-child { margin-top: 0; }

/* recently copied */
.recent { width: 100%; display: grid; gap: 10px; }
.recent-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recent-label { font: 500 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); padding-left: 6px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.2 var(--font-body); color: var(--text);
  cursor: pointer; padding: 10px 14px; border-radius: 12px; border: 0; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.recent-chip:hover { background: color-mix(in srgb, var(--accent) 35%, transparent); }
