/* 2D Text Generator: only the layout. Colors, type and every piece come from the FileFortress kit (ff-kit/), so the tool
   follows the visitor's site theme. */
[hidden] { display: none !important; }
.app { padding: 14px 16px 24px; }
.app-top { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; }
.app-logo { width: 28px; height: 28px; color: var(--ff-brand); flex: none; }
.app-top p { margin: 2px 0 0; }
/* three columns: text | the picture | the look. Narrower: both setting columns left; phones: one column, picture first */
/* wide screens: the middle is just the square preview, the two setting columns take the rest */
:root { --stage: clamp(320px, calc(100vh - 300px), 680px); }
.app-grid { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  grid-template-areas: "left main right"; }
.app-left { grid-area: left; } .app-main { grid-area: main; } .app-right { grid-area: right; }
@media (max-width: 1240px) { .app-grid { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); grid-template-areas: "left main" "right main"; } }
@media (max-width: 800px) { .app-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "left" "right"; } }
.app-col-title { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.app-col-title:not(:first-child) { margin-top: 6px; }
.app-hint-tight { margin-top: -8px; }
.app-two { grid-template-columns: 1fr 1fr; }
.app-tabs { display: flex; flex-wrap: wrap; }
.app-text { width: 100%; font-size: 15px; font-weight: 700; resize: vertical; }
.app-sub { display: grid; gap: 10px; padding: 2px 0 4px 14px; border-left: 2px solid var(--ff-line); margin-top: -6px; }
/* layers: one row each, the picked one marked */
.app-layers { display: grid; gap: 4px; }
.app-layer { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px 4px 10px; border-radius: 9px; border: 1px solid var(--ff-line);
  background: rgba(255, 255, 255, .03); cursor: pointer; }
.app-layer:hover { background: rgba(255, 255, 255, .06); }
.app-layer.is-on { border-color: var(--ff-brand); background: rgba(255, 255, 255, .07); }
.app-layer i { flex: none; width: 14px; height: 14px; border-radius: 4px; }
.app-layer span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.app-layer button { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: inherit; opacity: .6; cursor: pointer; }
.app-layer button:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.app-layer button .ff-icon { width: 14px; height: 14px; }
.app-layer .app-up { transform: rotate(180deg); }
/* fill presets: a gradient swatch each */
.app-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.app-presets button { height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.app-presets button:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .4); }
.app-presets button.is-on { outline: 2px solid var(--ff-brand); outline-offset: 1px; }
.app-view-bar { flex-wrap: nowrap; gap: 6px; }
.app-view-bar > .ff-muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-view-bar > label, .app-view-bar > .ff-btn { flex: none; white-space: nowrap; }
/* the picture over a checkerboard (or a color), sized to the window */
/* the stage: a square work area (the checkerboard all over); the picture is fitted inside it */
.app-stage { position: relative; width: min(100%, max(280px, calc(100vh - 300px))); aspect-ratio: 1; margin-inline: auto; border-radius: var(--ff-radius); border: 1px solid var(--ff-line);
  overflow: hidden; background-color: #1b1720; }
.app-stage.is-check { background-image: linear-gradient(45deg, #26212c 25%, transparent 25%), linear-gradient(-45deg, #26212c 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #26212c 75%), linear-gradient(-45deg, transparent 75%, #26212c 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.app-canvas { position: absolute; inset: 0; display: block; touch-action: none; }
/* the picture stays in view while the settings scroll (side by side only) */
@media (min-width: 801px) { .app-main { position: sticky; top: 14px; } }
.app-export { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.app-size { min-width: 170px; }
.app-trim { height: 38px; }
.app-drop { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; text-align: left; min-height: 0; }
.app-drop > .ff-icon { position: static; flex: none; }
.app-drop-text { display: grid; gap: 2px; min-width: 0; }
.app-drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-help { margin-top: 14px; }
.app-foot { margin-top: 10px; text-align: center; }
/* our color picker (js/color.js): a swatch button with the hex, and a panel under it */
.app-cp { position: relative; }
.app-cp-swatch { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 5px; cursor: pointer; text-align: left;
  font: 600 12px/1 var(--ff-mono); color: inherit; }
.app-cp-swatch i { flex: none; width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 0 1px rgba(0, 0, 0, .25); }
.app-cp-swatch span { overflow: hidden; text-overflow: ellipsis; }
.app-cp.is-open .app-cp-swatch { border-color: var(--ff-brand); }
.app-cp-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 244px; padding: 10px; border-radius: 12px;
  background: var(--ff-card-bg, #1d1520); border: 1px solid var(--ff-line-strong); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); }
.app-cp.to-left .app-cp-panel { left: auto; right: 0; }
.app-cp-sv { position: relative; height: 150px; border-radius: 9px; cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); }
.app-cp-hue { position: relative; height: 14px; margin-top: 10px; border-radius: 99px; cursor: pointer; touch-action: none;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.app-cp-sv b, .app-cp-hue b { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.app-cp-hue b { top: 50%; }
.app-cp-row { display: flex; gap: 6px; margin-top: 10px; }
.app-cp-hex { flex: 1; min-width: 0; height: 32px; font: 600 13px/1 var(--ff-mono); text-transform: lowercase; }
.app-cp-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.app-cp-presets button { aspect-ratio: 1; border-radius: 7px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.app-cp-presets button:hover { transform: scale(1.1); }

/* slider labels: the name on the left, the value on the right, on one line; pairs line up at the bottom */
.ff-field > .ff-label:has(> b[data-out]) { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; }
.ff-label > b[data-out] { font-variant-numeric: tabular-nums; }
.app-two:has(.ff-range) { align-items: end; }

/* section titles with their own Reset on the right */
.app-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-col-head:not(:first-child) { margin-top: 6px; }
.app-col-head .app-col-title { margin: 0; }
.app-reset { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 0; border-radius: 7px; background: none; color: inherit;
  font: 600 11.5px/1 var(--ff-font); opacity: .75; cursor: pointer; }
.app-reset .ff-icon { width: 13px; height: 13px; }
.app-reset:hover:not(:disabled) { opacity: 1; background: rgba(255, 255, 255, .07); }
.app-reset:disabled { opacity: .3; cursor: default; }

.app-custom { width: 120px; }
/* Keys and tips and the footer now close the right column */
.app-right .app-help { margin-top: 4px; }
.app-right .app-foot { margin-top: 0; text-align: left; }
@media (min-width: 1241px) { .app-main { width: calc(var(--stage) + 2.5rem + 2px); } .app-stage { width: var(--stage); } }

/* a slider's number can be clicked to type a value (js/value-edit.js) */
.ff-label b.ff-value { cursor: text; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.ff-label b.ff-value:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .35); }
.ff-value-edit { width: 6ch; height: 20px; padding: 0 4px; border: 1px solid var(--ff-brand); border-radius: 5px; background: rgba(0, 0, 0, .35);
  color: inherit; font: inherit; text-align: right; -moz-appearance: textfield; }
.ff-value-edit::-webkit-outer-spin-button, .ff-value-edit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ff-value-edit:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
