/* Thumbly additions on top of the shared Grabbit/Shortcut look (style.css). */
@font-face { font-family: "Anton"; src: url("/instagram-auto-generate-thumbnails/fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("/instagram-auto-generate-thumbnails/fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

.logo-mark path { stroke-width: 2.2; }

/* Hero + tool switch */
.hero { max-width: 820px; }
.hero.compact { padding: 20px 20px 8px; }
.hero.compact .hero-text, .hero.compact .hero-foot { display: none; }
.toolswitch {
  display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 22px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--subtle);
}
.hero.compact .toolswitch { margin: 0; }
.toolswitch button {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.toolswitch button:hover { color: var(--fg); }
.toolswitch button[aria-selected="true"] { background: var(--canvas); color: var(--fg); box-shadow: var(--shadow); }
.toolswitch button[aria-selected="true"] .icon { color: var(--accent); }
.intake[hidden] { display: none; }
.grab-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-ghost.big { height: 46px; padding: 0 18px; font-size: 14px; border-radius: 999px; }
.btn-ghost.tall { height: 46px; padding: 0 16px; font-size: 14px; }
.btn-ghost:disabled { opacity: .6; cursor: progress; }
.wide { width: 100%; }
.center { text-align: center; justify-content: center; }
.tight { margin: 6px 0 10px !important; }

/* Frame grabber */
.source video { cursor: pointer; }
.scrub { margin: 10px 0 12px; }
.scrub input[type=range] { width: 100%; accent-color: var(--accent); }
.scrub-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.scrub-row .time { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.icon-btn.small-txt { width: auto; padding: 0 9px; font: inherit; font-size: 12px; font-weight: 700; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 .icon { width: 16px; height: 16px; color: var(--accent); }
.grabbed-title { margin-top: 22px !important; }
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.frame { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--canvas); display: flex; flex-direction: column; }
.frame.top { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
.frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #0b0b0f; cursor: pointer; }
.frame figcaption { padding: 8px 10px 0; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.frame figcaption small { color: var(--muted); text-align: right; }
.frame-btns { display: flex; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
.frame-btns .opt { flex: 1; min-height: 36px; padding: 6px 10px; font-size: 13px; justify-content: center; }
.frame-btns .opt .icon { width: 15px; height: 15px; }
.frame-btns .opt.dl { flex: 0 0 40px; padding: 6px 0; }

/* Cover maker */
.cover-ws { max-width: 1180px; margin: 0 auto; padding: 0 20px 8px; display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.stage-card { padding: 16px; position: sticky; top: 80px; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dims { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cover-stage {
  display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 14px; border-radius: 12px;
  background: repeating-conic-gradient(#f1f1f4 0% 25%, #fafafa 0% 50%) 50% / 20px 20px;
}
.cover-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 64vh; border-radius: 6px; box-shadow: 0 6px 24px rgba(16, 24, 40, .18); touch-action: none; outline: none; }
.cover-stage canvas:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.stage-card .hint { margin: 10px 0 12px; font-size: 13px; color: var(--muted); }
.controls { padding: 6px 16px; }
.ctl { border-bottom: 1px solid var(--border); }
.ctl:last-of-type { border-bottom: 0; }
.ctl summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 0; font-weight: 700; font-size: 14px;
}
.ctl summary::-webkit-details-marker { display: none; }
.ctl summary .icon { width: 16px; height: 16px; color: var(--accent); }
.ctl summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.ctl[open] summary .chev { transform: rotate(180deg); }
.ctl > :not(summary) { margin-bottom: 14px; }
.templates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tpl { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--muted); }
.tpl small { font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.tpl-art {
  position: relative; display: flex; align-items: flex-end; justify-content: center; height: 46px; padding-bottom: 6px;
  border-radius: 8px; border: 1px solid var(--border); background: linear-gradient(160deg, #94a3b8, #334155); overflow: hidden;
}
.tpl-art b { position: relative; font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 17px; color: #fff; letter-spacing: .02em; }
.tpl-bold .tpl-art b { -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.tpl-bar .tpl-art b { background: #e5262a; padding: 0 6px; }
.tpl-tag .tpl-art { justify-content: flex-start; padding-left: 6px; }
.tpl-tag .tpl-art b { background: #ffd400; color: #111; padding: 0 5px; }
.tpl-clean .tpl-art { align-items: center; padding: 0; }
.tpl-clean .tpl-art b { font-family: Inter, sans-serif; font-weight: 800; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.tpl[aria-pressed="true"] .tpl-art { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl[aria-pressed="true"] { color: var(--fg); }
.area {
  width: 100%; resize: vertical; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--fg);
}
.area:focus, .sel:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lbl.inline { flex-direction: row; align-items: center; gap: 8px; }
.sel { height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--canvas); font: inherit; font-size: 14px; color: var(--fg); }
input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--canvas); cursor: pointer; }
.sliders.two { grid-template-columns: 1fr 1fr; margin: 12px 0; }
.swatches { display: flex; gap: 14px; margin: 0 0 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checks .check { margin: 0; font-size: 13px; }
.stickers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stk {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 10px;
  background: var(--subtle); font-size: 26px; cursor: pointer; padding: 4px;
}
.stk:hover { border-color: var(--accent); background: var(--accent-soft); }
.stk canvas { width: 100%; height: 100%; }
#sticker-edit { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); margin-top: 10px; }

/* Watermark stamper */
.wm-preview { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; border-radius: 10px; background: var(--subtle); }
.source h2 { margin-top: 4px; }
.file-list { list-style: none; padding: 0; margin: 8px 0 12px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.file-list li > .icon { width: 16px; height: 16px; color: var(--accent); }
.file-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li small { color: var(--muted); white-space: nowrap; }
.file-list .icon-btn { width: 28px; height: 28px; }
.text.wide { width: 100%; }
.posgrid { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.posgrid button { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--subtle); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.posgrid button i { width: 8px; height: 8px; border-radius: 99px; background: #c4c4cc; }
.posgrid button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.posgrid button[aria-checked="true"] i { background: var(--accent); width: 12px; height: 12px; }
.out img { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; background: var(--subtle); }
.out.zip { border-color: var(--accent); background: var(--accent-soft); }
.zip-art { display: flex; align-items: center; justify-content: center; height: 120px; border-radius: 8px; background: var(--canvas); }
.zip-art .icon { width: 40px; height: 40px; color: var(--accent); }

@media (max-width: 980px) {
  .cover-ws { grid-template-columns: 1fr; }
  .stage-card { position: static; }
  .cover-stage canvas { max-height: 56vh; }
}
@media (max-width: 420px) {
  .toolswitch .icon { display: none; }
}
@media (max-width: 600px) {
  .toolswitch { display: flex; width: 100%; }
  .toolswitch button { flex: 1; padding: 0 6px; gap: 5px; font-size: 12.5px; justify-content: center; white-space: nowrap; }
  .toolswitch .icon { width: 15px; height: 15px; }
  .templates { grid-template-columns: repeat(2, 1fr); }
  .stickers { grid-template-columns: repeat(5, 1fr); }
  .sliders.two { grid-template-columns: 1fr 1fr; }
  .frame-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cover-stage { padding: 8px; min-height: 0; }
  .cover-ws { padding: 0 12px 8px; }
}
