/* ---------- Resize presets / crop / watermark / favicon (image.bolttoolkit.com) ---------- */

/* Preset chips */
.preset-row{display:flex;flex-wrap:wrap;gap:8px}
.preset-btn{
  appearance:none;border:1px solid var(--line-2);background:#fff;color:var(--ink-2);font:inherit;
  font-size:.82rem;font-weight:650;border-radius:999px;padding:7px 12px;cursor:pointer;line-height:1.3;
}
.preset-btn:hover{border-color:#b9c4d8;background:#f8faff}
.preset-btn.is-active{background:var(--brand-soft);border-color:#c7cfff;color:var(--brand-2)}

/* Crop stage */
.crop-wrap{display:grid;gap:14px;margin-top:4px}
.crop-stage{position:relative;justify-self:center;max-width:100%;line-height:0;user-select:none;touch-action:none;overflow:hidden;border-radius:10px}
.crop-stage img{display:block;max-width:100%;max-height:min(62vh,620px);width:auto;height:auto;border-radius:10px;-webkit-user-drag:none}
.crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(8,14,28,.55);cursor:move;touch-action:none;border-radius:2px}
.crop-box::before,.crop-box::after{content:"";position:absolute;pointer-events:none;background:rgba(255,255,255,.35)}
.crop-box::before{left:33.33%;right:33.33%;top:0;bottom:0;border-left:1px solid rgba(255,255,255,.35);border-right:1px solid rgba(255,255,255,.35);background:none}
.crop-box::after{top:33.33%;bottom:33.33%;left:0;right:0;border-top:1px solid rgba(255,255,255,.35);border-bottom:1px solid rgba(255,255,255,.35);background:none}
.crop-box .h{position:absolute;width:16px;height:16px;border-radius:4px;background:#fff;border:1px solid #a9b6cc;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.crop-box .h.nw{left:-1px;top:-1px;cursor:nwse-resize}
.crop-box .h.ne{right:-1px;top:-1px;cursor:nesw-resize}
.crop-box .h.sw{left:-1px;bottom:-1px;cursor:nesw-resize}
.crop-box .h.se{right:-1px;bottom:-1px;cursor:nwse-resize}
.crop-size{
  display:inline-block;background:var(--brand-soft);color:var(--brand-2);
  font-size:.78rem;font-weight:800;padding:2px 8px;border-radius:6px;white-space:nowrap;letter-spacing:.02em;
}
.crop-hint{font-size:.82rem;color:var(--muted);text-align:center}

/* Watermark */
.wm-stage{display:grid;place-items:center;background:repeating-conic-gradient(#e7ecf4 0% 25%,#f9fbfe 0% 50%) 50%/18px 18px;border:1px solid var(--line);border-radius:12px;padding:8px}
.wm-stage canvas{display:block;max-width:100%;max-height:min(58vh,560px);width:auto;height:auto;border-radius:4px}
.pos-grid{display:grid;grid-template-columns:repeat(3,38px);gap:4px}
.pos-grid button{
  appearance:none;border:1px solid var(--line-2);background:#fff;border-radius:8px;width:38px;height:32px;
  cursor:pointer;display:grid;place-items:center;padding:0;
}
.pos-grid button span{display:block;width:7px;height:7px;border-radius:2px;background:#c3cde0}
.pos-grid button:hover{border-color:#b9c4d8;background:#f8faff}
.pos-grid button.is-active{border-color:var(--brand);background:var(--brand-soft)}
.pos-grid button.is-active span{background:var(--brand-2)}
.logo-name{font-size:.8rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}

/* Favicon */
.fv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;margin-top:6px}
.fv-item{background:#fbfcfe;border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.fv-item .im{width:72px;height:72px;display:grid;place-items:center;background:repeating-conic-gradient(#eef2f8 0% 25%,#f8fafd 0% 50%) 50%/12px 12px;border-radius:8px;overflow:hidden}
.fv-item img{max-width:64px;max-height:64px;image-rendering:auto}
.fv-item small{font-size:.72rem;color:var(--muted);font-weight:650}
.fv-item .btn{margin-top:auto}
.browser-preview{display:flex;align-items:center;gap:8px;background:#eef1f7;border-radius:10px 10px 0 0;padding:8px 10px;font-size:.8rem;color:#41506b;font-weight:650}
.browser-preview img{width:16px;height:16px;border-radius:3px}
.snippet{width:100%;min-height:120px;font-family:var(--mono);font-size:.78rem;background:#0b1220;color:#e6edf8;border:0;border-radius:0 0 10px 10px}
