/* SWGColor presets, rev 5: Save / Presets sit in each tool's own button row, slide-in drawer, no save dialog. */
/* Rev 5 button rows. Every row: equal-width buttons, every label on ONE line (never wraps, never cut: swg-presets.js
   picks the largest --swgp-fit at which all labels fit), one button height per tool. HEX top row splits 3 + 2 below
   600px; the gradient button row is always one line (rev 6). */
.swgp-L .swg-page-hex .hex-primary-actions,.swgp-L .swg-page-hex .swgp-actions,.swgp-L .swg-page-gradient .group:has(#copyBtn){display:grid !important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--swgp-gap,8px) !important;align-items:stretch !important;overflow:visible !important;white-space:nowrap !important;width:100%;box-sizing:border-box;}
.swgp-L .swg-page-hex .swgp-actions{margin:6px 0 14px;}
.swgp-L .swg-page-hex .hex-primary-actions button,.swgp-L .swg-page-hex .swgp-actions button,.swgp-L .swg-page-gradient .group button{width:100% !important;min-width:0 !important;margin:0 !important;padding:0 calc(var(--swgp-fit,14px) * var(--swgp-padk,.7)) !important;font-size:var(--swgp-fit,14px) !important;letter-spacing:var(--swgp-ls,.06em) !important;line-height:1 !important;
  white-space:nowrap !important;overflow:hidden !important;text-overflow:clip !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;box-sizing:border-box !important;}
.swgp-L .swg-page-hex .hex-primary-actions button,.swgp-L .swg-page-hex .swgp-actions button{height:36px !important;min-height:36px !important;}
.swgp-L .swg-page-gradient .group button{height:46px !important;min-height:46px !important;}
/* phones: tighter gaps, padding and tracking so the text stays as large as possible on one line */
@media (max-width:600px){html.swgp-L{--swgp-gap:4px;--swgp-padk:.4;--swgp-ls:.02em;}}
@media (max-width:359px){html.swgp-L{--swgp-gap:3px;--swgp-padk:.2;--swgp-ls:0em;}}
/* HEX top row below 600px: two equal rows, ADD PHRASE / REMOVE PHRASE / CLEAR FIELDS, then ADD COLOR / RANDOMIZE
   (on one line its labels would drop under 9px below ~560px with wider fonts) */
@media (max-width:599px){
  .swgp-L .swg-page-hex .hex-primary-actions{grid-auto-flow:row;grid-template-columns:repeat(6,minmax(0,1fr));}
  .swgp-L .swg-page-hex .hex-primary-actions > button{grid-column:span 2;}
  .swgp-L .swg-page-hex .hex-primary-actions > button:nth-of-type(n+4){grid-column:span 3;}
}
.swgp-L .swg-page-shell button:focus-visible{outline:3px solid #fff !important;outline-offset:2px !important;}
/* SPACE+ / SPACE−: the tool still writes "Spaces Added" / "Space Removed" into the button (kept as aria-label and
   title); the visible short label comes from data-label, set by swg-presets.js whenever the tool changes the text. */
.swgp-L .swg-page-hex #toggleSpace[data-label]{font-size:0 !important;letter-spacing:0 !important;}
.swgp-L .swg-page-hex #toggleSpace[data-label]::after{content:attr(data-label);font-size:var(--swgp-fit,14px);letter-spacing:var(--swgp-ls,.06em);}
/* Gradient (rev 6): button row = Add Color | Remove Color | Enforce 127 | Less - | More +, equal widths, one line at
   every width. Under it, the colours as one full-width bar split into equal segments (each segment is the tool's own
   colour box, so a click opens the same picker). Step text under the bar, right-aligned. */
.swgp-L .swg-page-gradient .group{flex-wrap:nowrap !important;}
.swgp-L .swg-page-gradient .swgp-gctl{display:grid !important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--swgp-gap,8px) !important;align-items:stretch !important;width:100%;box-sizing:border-box;margin-bottom:8px;}
.swgp-L .swg-page-gradient .swgp-gctl > .group{display:contents !important;}
@media (min-width:601px){.swgp-L .swg-page-gradient .swgp-gctl button{padding:0 calc(var(--swgp-fit,14px) * .4) !important;letter-spacing:.02em !important;}}
/* Enforce: the tool still writes "Enforce: ON (127)" / "Enforce: OFF (127)" (kept as title and aria-label, with
   aria-pressed); the button shows "Enforce 127" and its on/off state by style: filled = ON, outline = OFF. */
.swgp-L .swg-page-gradient .swgp-gctl #limitBtn{border:0 !important;box-shadow:inset 0 0 0 2px #FFDB1A !important;}
.swgp-L .swg-page-gradient #limitBtn[data-label]{font-size:0 !important;letter-spacing:0 !important;}
.swgp-L .swg-page-gradient #limitBtn[data-label]::after{content:attr(data-label);font-size:var(--swgp-fit,14px);letter-spacing:var(--swgp-ls,.06em);}
@media (min-width:601px){.swgp-L .swg-page-gradient #limitBtn[data-label]::after{letter-spacing:.02em;}}
.swgp-L .swg-page-gradient .swgp-gbar{width:100%;margin:0 0 6px;}
.swgp-L .swg-page-gradient .swgp-gbar #colorPickers{display:flex !important;flex-wrap:nowrap !important;gap:2px !important;width:100%;align-items:stretch !important;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker{flex:1 1 0 !important;min-width:0 !important;width:auto !important;height:40px !important;margin:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;cursor:pointer;-webkit-appearance:none;appearance:none;position:relative;box-sizing:border-box;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker:first-child{border-radius:5px 0 0 5px !important;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker:last-child{border-radius:0 5px 5px 0 !important;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker:only-child{border-radius:5px !important;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker::-webkit-color-swatch-wrapper{padding:0;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker::-webkit-color-swatch{border:0;border-radius:inherit;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker::-moz-color-swatch{border:0;border-radius:inherit;}
/* selected segment (the one Add Color / the palette would act on): white ring outside + black line inside, visible on any colour */
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker.swgp-sel{z-index:1;box-shadow:0 0 0 3px #fff !important;outline:2px solid #000;outline-offset:-2px;}
.swgp-L .swg-page-gradient .swgp-gbar .colorPicker:focus-visible{z-index:2;outline:3px solid #FFDB1A !important;outline-offset:3px !important;}
.swgp-L .swg-page-gradient .swgp-gstep{display:flex;justify-content:flex-end;margin:0 0 12px;line-height:1.2;}
/* Gradient below 600px: short visible labels on the button row (Add, Remove, Enforce, Less −, More +), full text in
   title/aria-label; each gradient row sizes its own text (swg-presets.js sets --swgp-fit per row). */
@media (max-width:599px){
  .swgp-L .swg-page-gradient .swgp-gctl button[data-short]{font-size:0 !important;letter-spacing:0 !important;}
  .swgp-L .swg-page-gradient .swgp-gctl button[data-short]::after,.swgp-L .swg-page-gradient .swgp-gctl #limitBtn[data-short]::after{content:attr(data-short);font-size:var(--swgp-fit,14px);letter-spacing:var(--swgp-ls,.02em);}
}
/* Palette row hidden (rev 6); markup and code kept, delete this rule to bring it back */
.swg-page-gradient .row:has(> #paletteWrap){display:none !important;}
html.swgp-lock{overflow:hidden;}
#swgp-overlay{position:fixed;inset:0;z-index:100001;background:rgba(0,0,0,.6);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility 0s linear .2s;}
#swgp-overlay.swgp-on{opacity:1;visibility:visible;transition:opacity .2s ease,visibility 0s;}
.swgp-layer{box-sizing:border-box;position:fixed;z-index:100002;background:#0b0b0b;color:#fff;font-family:Arial,Helvetica,sans-serif;text-align:left;visibility:hidden;}
.swgp-layer *{box-sizing:border-box;}
.swgp-layer.swgp-open{visibility:visible;}
#swgp-drawer{top:0;right:0;bottom:0;width:400px;max-width:100vw;padding:16px;overflow-y:auto;overscroll-behavior:contain;border-left:2px solid #FFDB1A;box-shadow:-8px 0 24px rgba(0,0,0,.6);transform:translateX(100%);transition:transform .25s ease,visibility 0s linear .25s;}
#swgp-drawer.swgp-open{transform:none;transition:transform .25s ease,visibility 0s;}
/* Desktop: drawer fits its widest preset output, at least 260px and capped at 340px (long output wraps);
   other blocks don't widen it. Phones: full-width sheet. */
@media (min-width:481px){
  #swgp-drawer{width:max-content;min-width:260px;max-width:min(340px,90vw);overflow-x:hidden;}
  #swgp-drawer > :not(.swgp-list){width:0;min-width:100%;}
  #swgp-drawer .swgp-list li.swgp-empty{width:0;min-width:100%;}
}
@media (max-width:480px){#swgp-drawer{width:100vw;max-width:100vw;border-left:0;}}
.swgp-layer h2{margin:0 !important;font-size:18px;text-transform:uppercase;letter-spacing:1px;color:#FFDB1A;}
.swgp-layer h3{margin:0 0 8px;font-size:14px;text-transform:uppercase;letter-spacing:1px;color:#FFDB1A;}
.swgp-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px;}
.swgp-count{color:#9aa4ad;font-weight:400;}
.swgp-layer .swgp-note{margin:6px 0 10px;font-size:13px;color:#9aa4ad;}
.swgp-layer button{margin:0;padding:9px 14px;min-height:40px;font:900 13px Arial,Helvetica,sans-serif;letter-spacing:1px;text-transform:uppercase;background:#FFDB1A;color:#000;border:0;border-radius:3px;cursor:pointer;}
.swgp-layer button:hover{background:#b99f00;color:#fff;}
.swgp-layer button.swgp-secondary{background:transparent !important;color:#FFDB1A !important;border:1px solid rgba(255,219,26,.65) !important;font-weight:700 !important;}
.swgp-layer button.swgp-secondary:hover,.swgp-layer button.swgp-secondary:focus-visible{background:rgba(255,219,26,.16) !important;color:#fff !important;border-color:#FFDB1A !important;}
.swgp-layer button:disabled{opacity:.45;cursor:not-allowed;}
.swgp-layer button:focus-visible,.swgp-layer input:focus-visible,.swgp-layer summary:focus-visible,.swgp-confirm:focus-visible,#swgp-open-save:focus-visible,#swgp-open-drawer:focus-visible{outline:3px solid #fff;outline-offset:2px;}
.swgp-close{min-width:40px;padding:4px 12px !important;font-size:20px !important;line-height:1;}
.swgp-act{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.swgp-list{list-style:none;margin:10px 0;padding:0;}
.swgp-list li{display:block;padding:10px 0;border-bottom:1px solid #2a2a2a;}
/* each preset = its colored output (like Text Preview), wrapping inside the drawer; date small underneath */
.swgp-out{display:block;font-size:16px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere;color:#fff;}
.swgp-out.swgp-grad{font-weight:700;}
.swgp-out.swgp-muted{font-size:13px;font-style:italic;color:#9aa4ad;}
.swgp-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px;}
.swgp-list li.swgp-empty{display:block;color:#9aa4ad;font-size:14px;}
.swgp-date{font-size:12px;color:#9aa4ad;white-space:nowrap;}
.swgp-list .swgp-act{margin:0;}
.swgp-layer .swgp-list button{min-height:36px;padding:6px 12px;}
.swgp-tools{margin-top:16px;padding-top:12px;border-top:1px solid #2a2a2a;}
.swgp-file{display:none;}
.swgp-confirm{margin-top:12px;padding:12px;border:1px solid #FFDB1A;border-radius:6px;background:#161400;font-size:14px;}
.swgp-confirm p{margin:0 0 4px;font-size:14px;line-height:1.4;color:#fff;}
.swgp-status{min-height:20px;margin-top:12px;font-size:14px;color:#FFDB1A;}
.swgp-layer details{margin-top:10px;font-size:14px;}
.swgp-layer summary{cursor:pointer;color:#FFDB1A;}
.swgp-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.swgp-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 4px 3px 8px;border:1px solid #555;border-radius:14px;background:#121212;font-size:13px;}
.swgp-sw{width:14px;height:14px;border-radius:50%;border:1px solid #fff;display:inline-block;}
.swgp-chip button{min-height:28px !important;padding:2px 8px !important;border-radius:12px !important;}
#swgp-toast{position:fixed;left:50%;top:70px;z-index:100003;max-width:90vw;padding:10px 16px;border:1px solid #FFDB1A;border-radius:6px;background:#0b0b0b;color:#FFDB1A;font:700 14px Arial,Helvetica,sans-serif;transform:translateX(-50%);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility 0s linear .2s;}
#swgp-toast.swgp-on{opacity:1;visibility:visible;transition:opacity .2s ease,visibility 0s;}
@media (prefers-reduced-motion:reduce){#swgp-drawer,#swgp-drawer.swgp-open,#swgp-overlay,#swgp-overlay.swgp-on,#swgp-toast{transition:none !important;}}

/* rev 7: HEX colour <select> shows its selected option's colour on the text only (-webkit-text-fill-color,
   set inline by swg-presets.js); `color` stays white so the native arrow looks as in rev 6.
   Very dark colours get a stronger light outline on the dropdown only. The open list keeps its own option colours. */
.swg-page-hex select.color-select.swgp-selc[data-swgp-dark]{-webkit-text-stroke:.6px rgba(255,255,255,.9);text-shadow:0 0 1px #fff,0 0 2px rgba(255,255,255,.95),0 0 4px rgba(255,255,255,.55);}
.swg-page-hex select.color-select.swgp-selc option{-webkit-text-fill-color:currentcolor;-webkit-text-stroke:0;text-shadow:none;}
