/* Cutout-only styles, on top of the shared Grabbit look in style.css. */
.toolswitch {
  display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 22px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--subtle);
}
.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); }
.hero.compact { padding-top: 32px; padding-bottom: 20px; }
.hero.compact .hero-text, .hero.compact .hero-foot { display: none; }
.hero.compact .drop { padding: 18px 20px; flex-direction: row; justify-content: center; gap: 10px; }
.hero.compact .drop .icon { width: 22px; height: 22px; }
.hero.compact .drop span { display: none; }
.tight { margin: 6px 0 0 !important; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel.foot { border-top: 1px solid var(--border); background: var(--subtle); }
.panel.foot .seg { background: var(--canvas); }
.choices.two { grid-template-columns: repeat(2, 1fr); }

/* Batch thumbnails */
.thumbs { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 420px; overflow: auto; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--subtle); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs small {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumbs button {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .92); color: var(--fg); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.thumbs button .icon { width: 13px; height: 13px; }
.add-more { width: 100%; justify-content: center; }

/* Background choices */
.bgs { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-opt { position: relative; }
.bg-opt input { position: absolute; opacity: 0; }
.bg-opt span {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.bg-opt input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.bg-opt input:focus-visible + span { outline: 2px solid var(--accent); }
.sw { width: 24px; height: 24px; border-radius: 99px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; background: var(--accent); }
.sw .icon { width: 14px; height: 14px; color: var(--muted); }
.sw-white { background: #fff; }
.sw-image { background: var(--subtle); }
.sw-blur { background: radial-gradient(circle at 35% 35%, #fbcfe8, #93c5fd 60%, #a7f3d0); filter: blur(.4px); }
.sw-checker, .checker {
  background-color: #fff;
  background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.bg-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.lbl.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lbl input[type="color"] { width: 40px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.brand { display: flex; gap: 6px; }
.brand button { width: 26px; height: 26px; border-radius: 99px; border: 1px solid var(--border); cursor: pointer; }
.sliders.one { grid-template-columns: minmax(0, 320px); margin: 0 0 12px 24px; }

/* Results */
.job .outs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.out .ba { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: var(--ar, 1); user-select: none; touch-action: pan-y; cursor: ew-resize; }
.out .ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.out .ba .before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.out .ba.upscale .before { image-rendering: auto; }
.out .ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none; }
.out .ba .handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 99px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18-6-6 6-6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: var(--shadow);
}
.out .ba .tag { position: absolute; top: 6px; padding: 1px 8px; border-radius: 99px; background: rgba(24, 24, 27, .7); color: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }
.out .ba .tag.l { left: 6px; }
.out .ba .tag.r { right: 6px; }
.out .ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.out.failed { border-color: #fecaca; background: #fef2f2; }
.out.failed p { color: var(--danger); }
.out .pending { aspect-ratio: 1; border-radius: 8px; background: var(--subtle); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.out .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 820px) {
  .toolswitch .icon { display: none; }
}
@media (max-width: 600px) {
  .toolswitch { display: flex; width: 100%; }
  .toolswitch button { flex: 1; padding: 0 6px; font-size: 13px; justify-content: center; white-space: nowrap; }
  .choices.two { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(4, 1fr); max-height: 220px; }
  .sliders.one { margin-left: 0; }
  .bg-opt span { height: 36px; font-size: 13px; padding-right: 12px; }
  .job .outs { grid-template-columns: 1fr; }
}
.logo-mark circle { fill: none; stroke: #fff; stroke-width: 2.6; }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }
