/* The child theme narrows .entry-content to 720px on default page templates and
   exempts each tool with :not(:has(#xx-wrap)). The tidy fix is to add
   :not(:has(#gt-wrap)) to that rule in kadence-child/style.css; until then the
   chain below out-specifies it so this tool gets the full 1100px measure. */
.entry-content:has(#gt-wrap):has(#gt-stage):has(#gt-presets):has(#gt-stops):has(#gt-code):has(#gt-toast){
    max-width:none !important; padding-left:0 !important; padding-right:0 !important; }
#gt-wrap{ max-width:1100px; margin:0 auto; padding:40px 24px 80px; -webkit-font-smoothing:antialiased; font-family:Outfit, sans-serif; color:#2D3748; }
#gt-wrap *,#gt-wrap *::before,#gt-wrap *::after{ box-sizing:border-box; }
.gt-layout{ display:grid; grid-template-columns:1fr 340px; gap:24px; align-items:start; }
.gt-stage-col{ display:flex; flex-direction:column; gap:16px; min-width:0; }

/* stage */
.gt-stage{ position:relative; border-radius:28px; overflow:hidden; box-shadow:0 4px 32px rgba(0,0,0,.12); background:#fff; min-height:360px; display:flex; align-items:center; justify-content:center; padding:48px 32px; transition:background .2s; }
.gt-stage.alpha{ background-color:#fff; background-image:linear-gradient(45deg,#eee 25%,transparent 25%),linear-gradient(-45deg,#eee 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eee 75%),linear-gradient(-45deg,transparent 75%,#eee 75%); background-size:20px 20px; background-position:0 0,0 10px,10px -10px,-10px 0; }
.gt-stage-inner{ width:100%; }
.gt-text{ margin:0; white-space:pre-wrap; word-break:break-word; outline:none; -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.gt-text:focus-visible{ outline:2px dashed rgba(33,83,135,.5); outline-offset:8px; }
.gt-stage-hint{ position:absolute; bottom:10px; right:14px; font-size:11px; color:#6E6E78; letter-spacing:.02em; pointer-events:none; }

/* output */
.gt-output{ background:#F8F8F8; border:1px solid #F0F0F0; border-radius:20px; padding:14px; }
.gt-tabs{ display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.gt-tablist{ display:flex; align-items:center; gap:6px; }
.gt-tab{ padding:4px 10px; border-radius:999px; border:1px solid transparent; background:transparent; font-family:inherit; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:#6E6E78; cursor:pointer; transition:.12s; }
.gt-tab:hover{ color:#555; }
.gt-tab.on{ background:#fff; border-color:#E8E8E8; color:#111; }
.gt-copy-btn{ margin-left:auto; padding:3px 8px; border-radius:999px; border:1px solid #E0E0E0; background:#fff; font-family:inherit; font-size:11px; font-weight:500; cursor:pointer; transition:.12s; color:#666; }
.gt-copy-btn:hover{ background:#111; color:#fff; border-color:#111; }
.gt-copy-btn.ok{ background:#F0FDF4; border-color:#BBF7D0; color:#166534; }
.gt-output pre{margin:0;font-family:"SF Mono","Fira Code",ui-monospace,monospace;white-space:pre-wrap;word-break:break-word;color:#333;max-height:210px;overflow:auto}

/* actions */
.gt-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.gt-btn{border-radius:999px;border:none;font-family:inherit;font-weight:600;cursor:pointer;transition:.15s}
.gt-btn-primary{ background:#111; color:#fff; }
.gt-btn-primary:hover{ background:#333; transform:translateY(-1px); }
.gt-btn-secondary{ background:#F4F4F5; color:#444; border:1px solid #E4E4E7; }
.gt-btn-secondary:hover{ background:#E4E4E7; }
.gt-btn-download{ background:#F0F9FF; color:#0369A1; border:1px solid #BAE6FD; }
.gt-btn-download:hover{ background:#E0F2FE; }
.gt-note{ font-size:12px; color:#6E6E78; margin:0; line-height:1.5; }
.gt-note b{ color:#555; font-weight:600; }

/* panel */
.gt-panel{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.gt-card{ background:#fff; border:1px solid #F0F0F0; border-radius:24px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.gt-card-title{font-weight:600;text-transform:uppercase;color:#6E6E78;margin-bottom:14px}
.gt-field-label{display:block;font-weight:500;color:#555;margin:14px 0 6px}
.gt-hint{ color:#6E6E78; font-style:normal; font-weight:400; }

/* presets */
.gt-presets{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.gt-preset{ height:44px; border-radius:14px; cursor:pointer; border:2px solid transparent; transition:.15s; padding:0; }
.gt-preset:hover{ transform:scale(1.05); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.gt-preset.on{ border-color:#111; box-shadow:0 0 0 2px #111; }

/* segmented */
.gt-seg{ display:flex; gap:4px; background:#F5F5F5; border-radius:999px; padding:3px; margin-bottom:14px; }
.gt-seg-btn{ flex:1; padding:7px 4px; border:none; border-radius:999px; background:transparent; font-family:inherit; font-size:12px; font-weight:600; color: #6E6E78; cursor:pointer; transition:.12s; }
.gt-seg-btn:hover{ color:#111; }
.gt-seg-btn.on{ background:#fff; color:#111; box-shadow:0 1px 2px rgba(0,0,0,.08); }

/* sliders */
.gt-slider-row{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.gt-slider-label{ display:flex; justify-content:space-between; align-items:center; }
.gt-slider-label span{font-weight:500;color:#555}
.gt-slider-val{ font-size:12px; color:#55555F; font-style:normal; font-family:"SF Mono","Fira Code",ui-monospace,monospace; background:#F5F5F5; padding:2px 7px; border-radius:999px; }
#gt-wrap input[type=range]{ width:100%; accent-color:#111; }

/* stops */
.gt-stops{ display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.gt-stop{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:14px; border:1.5px solid transparent; transition:.12s; }
.gt-stop:hover{ background:#FAFAFA; border-color:#F0F0F0; }
.gt-stop input[type=color]{ width:32px; height:32px; flex-shrink:0; padding:0; border:2px solid rgba(0,0,0,.08); border-radius:14px; background:none; cursor:pointer; }
.gt-stop-meta{ flex:1; min-width:0; }
.gt-stop-hex{ font-size:11px; color:#6E6E78; font-family:"SF Mono","Fira Code",ui-monospace,monospace; display:block; }
.gt-stop-pos{ width:100%; margin-top:3px; }
.gt-stop-del{ width:26px; height:26px; border-radius:50%; border:1px solid #F0F0F0; background:#FAFAFA; cursor:pointer; font-size:13px; color: #6E6E78; display:flex; align-items:center; justify-content:center; transition:.12s; flex-shrink:0; }
.gt-stop-del:hover{ background:#FEE2E2; border-color:#FCA5A5; color:#DC2626; }
.gt-stop-del[disabled]{ opacity:.35; cursor:not-allowed; }
.gt-add{ width:100%; padding:9px; border-radius:14px; border:1.5px dashed #E0E0E0; background:transparent; font-family:inherit; font-size:13px; font-weight:500; color:#6E6E78; cursor:pointer; transition:.15s; margin-top:8px; }
.gt-add:hover{ border-color:#111; color:#111; background:#FAFAFA; }

/* inputs */
.gt-input{ width:100%; padding:9px 11px; border:1px solid #E8E8E8; border-radius:999px; font-family:inherit; font-size:13px; color:#333; background:#fff; }
.gt-input:focus{ outline:none; border-color:#111; }
.gt-textarea{ resize:vertical; line-height:1.4; }
.gt-check{ display:flex; align-items:center; gap:9px; font-size:13px; font-weight:500; color:#555; cursor:pointer; }
.gt-check input{ width:16px; height:16px; accent-color:#111; }

/* backdrops */
.gt-bgs{ display:flex; gap:8px; flex-wrap:wrap; }
.gt-bg{ width:34px; height:34px; border-radius:14px; border:2px solid #EAEAEA; cursor:pointer; padding:0; transition:.12s; position:relative; overflow:hidden; }
.gt-bg:hover{ transform:scale(1.06); }
.gt-bg.on{ border-color:#111; box-shadow:0 0 0 2px #111; }
.gt-bg-alpha{ background-color:#fff; background-image:linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%); background-size:12px 12px; background-position:0 0,0 6px,6px -6px,-6px 0; }
.gt-bg-custom{ display:block; }
.gt-bg-custom input[type=color]{ width:100%; height:100%; padding:0; border:none; background:none; cursor:pointer; }
.gt-fallback-row{ display:flex; align-items:center; gap:10px; }
.gt-fallback-row input[type=color]{ width:34px; height:34px; padding:0; border:2px solid rgba(0,0,0,.08); border-radius:14px; background:none; cursor:pointer; }
.gt-fallback-row code{ font-size:12px; color: #6E6E78; font-family:"SF Mono","Fira Code",ui-monospace,monospace; }

/* toast */
.gt-toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px); background:#111; color:#fff; padding:12px 24px; border-radius:50px; font-size:14px; font-weight:500; transition:transform .3s; z-index:9999; white-space:nowrap; pointer-events:none; }
.gt-toast.show{ transform:translateX(-50%) translateY(0); }

@media (max-width:900px){
  .gt-layout{ grid-template-columns:1fr; }
  .gt-stage{ min-height:240px; padding:36px 20px; }
}
@media (prefers-reduced-motion:reduce){
  .gt-text{ animation:none !important; }
  .gt-btn:hover{ transform:none; }
  .gt-preset:hover,.gt-bg:hover{ transform:none; }
}
@keyframes gt-shift{ to { background-position:200% center; } }
