/* Photo stamp settings panel (shared/watermark-settings.js) */
.pst-backdrop{
  position:fixed; inset:0; z-index:400; background:rgba(4,6,12,0.66); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; padding:16px;
  animation:pstIn .18s ease both;
}
@keyframes pstIn{ from{ opacity:0; } to{ opacity:1; } }
.pst-panel{
  width:100%; max-width:1080px; max-height:calc(100dvh - 32px); display:flex; flex-direction:column;
  background:var(--card, #121826); color:var(--text-primary, #e8edf4); border:1px solid var(--border, rgba(255,255,255,.1));
  border-radius:18px; box-shadow:0 30px 80px rgba(0,0,0,.5); overflow:hidden; font-family:'Inter',system-ui,sans-serif;
}
.pst-head{ display:flex; align-items:flex-start; gap:12px; padding:16px 18px 12px; border-bottom:1px solid var(--border, rgba(255,255,255,.1)); }
.pst-head > div{ flex:1; min-width:0; }
.pst-head h3{ font-size:16px; font-weight:700; margin:0 0 3px; }
.pst-head p{ font-size:12px; color:var(--text-secondary, #9aa6b8); margin:0; line-height:1.45; }
.pst-x{ width:34px; height:34px; border-radius:10px; border:1px solid var(--border, rgba(255,255,255,.12)); background:var(--hover, rgba(255,255,255,.05)); color:inherit; cursor:pointer; font-size:14px; flex:0 0 auto; }
.pst-body{ flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); }
.pst-preview{ padding:16px; background:var(--bg, #0b0f18); display:flex; flex-direction:column; gap:8px; min-height:0; }
.pst-canvas-wrap{ border-radius:12px; overflow:hidden; box-shadow:0 8px 24px rgba(0,0,0,.35); background:#222; }
.pst-canvas-wrap canvas{ display:block; width:100%; height:auto; }
.pst-cap{ font-size:11px; color:var(--text-secondary, #9aa6b8); text-align:center; }
.pst-controls{ overflow-y:auto; padding:6px 18px 18px; }
.pst-controls section{ padding:12px 0; border-bottom:1px solid var(--border, rgba(255,255,255,.08)); }
.pst-controls section:last-child{ border-bottom:none; }
.pst-controls h4{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-secondary, #9aa6b8); margin:0 0 10px; }
.pst-presets{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; position:relative; }
.pst-banners{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin-bottom:6px; }
.pst-presets button, .pst-banners button{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:9px 10px; border-radius:11px; cursor:pointer; text-align:left;
  border:1.5px solid var(--border, rgba(255,255,255,.12)); background:var(--hover, rgba(255,255,255,.04)); color:inherit;
}
.pst-presets button b, .pst-banners button b{ font-size:12.5px; }
.pst-presets button small, .pst-banners button small{ font-size:10.5px; color:var(--text-secondary, #9aa6b8); }
.pst-presets button.on, .pst-banners button.on{ border-color:var(--primary, #e4b04a); background:rgba(228,176,74,.12); }
.pst-themes button{ border:2px solid var(--border-strong, rgba(255,255,255,.25)); }
.pst-themes button.on{ border-color:var(--primary, #e4b04a); box-shadow:0 0 0 2px rgba(228,176,74,.4); }
.pst-custom-tag{ position:absolute; top:-26px; right:0; font-size:10.5px; font-weight:700; color:var(--primary, #e4b04a); background:rgba(228,176,74,.12); padding:2px 8px; border-radius:20px; }
.pst-toggles{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.pst-tog{ position:relative; cursor:pointer; }
.pst-tog input{ position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.pst-tog span{
  display:inline-flex; align-items:center; gap:6px; padding:7px 11px; border-radius:20px; font-size:12px;
  border:1px solid var(--border-strong, rgba(255,255,255,.18)); color:var(--text-secondary, #9aa6b8); background:transparent;
}
.pst-tog span::before{ content:''; width:8px; height:8px; border-radius:50%; border:1.5px solid currentColor; }
.pst-tog.on span{ background:rgba(228,176,74,.14); border-color:var(--primary, #e4b04a); color:var(--text-primary, #fff); font-weight:600; }
.pst-tog.on span::before{ background:var(--primary, #e4b04a); border-color:var(--primary, #e4b04a); }
.pst-tog input:focus-visible + span{ outline:2px solid var(--primary, #e4b04a); outline-offset:2px; }
.pst-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:8px; }
.pst-row > span:first-child{ width:84px; flex:0 0 auto; font-size:12px; color:var(--text-secondary, #9aa6b8); }
.pst-row input[type=text]{
  flex:1; min-width:160px; padding:9px 11px; border-radius:9px; font-size:13px;
  border:1px solid var(--border-strong, rgba(255,255,255,.18)); background:var(--hover, rgba(255,255,255,.04)); color:inherit; outline:none;
}
.pst-row input[type=text]:focus{ border-color:var(--primary, #e4b04a); }
.pst-row input[type=range]{ flex:1; min-width:120px; accent-color:var(--primary, #e4b04a); }
.pst-row output{ font-size:12px; font-family:'JetBrains Mono',monospace; width:40px; }
.pst-seg{ display:inline-flex; flex-wrap:wrap; gap:3px; padding:3px; border-radius:10px; background:var(--hover, rgba(255,255,255,.05)); border:1px solid var(--border, rgba(255,255,255,.08)); }
.pst-seg button{ border:none; background:transparent; color:var(--text-secondary, #9aa6b8); font-size:12px; padding:6px 10px; border-radius:7px; cursor:pointer; white-space:nowrap; }
.pst-seg button.on{ background:var(--primary, #e4b04a); color:#1a1103; font-weight:700; }
.pst-check{ display:inline-flex; align-items:center; gap:6px; font-size:12px; cursor:pointer; }
.pst-check input{ accent-color:var(--primary, #e4b04a); width:16px; height:16px; }
.pst-swatches{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.pst-swatches button{ width:28px; height:28px; border-radius:50%; cursor:pointer; background:var(--sw); border:2px solid var(--border-strong, rgba(255,255,255,.25)); padding:0; }
.pst-swatches button.auto{ width:auto; padding:0 10px; border-radius:14px; background:var(--hover, rgba(255,255,255,.05)); color:inherit; font-size:11.5px; }
.pst-swatches button.on{ border-color:var(--primary, #e4b04a); box-shadow:0 0 0 2px rgba(228,176,74,.4); }
.pst-swatches input[type=color]{ width:30px; height:30px; border:none; background:none; padding:0; cursor:pointer; }
.pst-foot{ display:flex; align-items:center; gap:8px; padding:12px 18px; border-top:1px solid var(--border, rgba(255,255,255,.1)); flex-wrap:wrap; }
.pst-grow{ flex:1; }
.pst-btn{ padding:10px 16px; border-radius:10px; border:1px solid var(--border-strong, rgba(255,255,255,.18)); background:var(--hover, rgba(255,255,255,.05)); color:inherit; font-size:13px; font-weight:600; cursor:pointer; min-height:40px; }
.pst-btn.primary{ background:var(--primary, #e4b04a); border-color:var(--primary, #e4b04a); color:#1a1103; }
.pst-btn.ghost{ border-color:transparent; background:transparent; color:var(--text-secondary, #9aa6b8); }
.pst-btn:disabled{ opacity:.6; }

@media (max-width: 760px){
  .pst-backdrop{ padding:0; align-items:stretch; }
  .pst-panel{ max-height:100dvh; height:100dvh; border-radius:0; border:none; }
  .pst-body{ display:flex; flex-direction:column; overflow-y:auto; }
  .pst-preview{ position:sticky; top:0; z-index:2; padding:10px 12px; flex:0 0 auto; box-shadow:0 8px 16px rgba(0,0,0,.25); }
  .pst-cap{ display:none; }
  .pst-controls{ overflow:visible; padding:4px 16px 16px; flex:0 0 auto; }
  .pst-presets, .pst-banners{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .pst-row > span:first-child{ width:100%; }
  .pst-seg{ max-width:100%; }
  .pst-head{ padding:12px 16px 10px; }
  .pst-foot{ padding:10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .pst-foot .ghost{ padding:10px 8px; }
  .pst-foot .ghost .long{ display:none; }
}
