/* ── Artone Tool Kit — shared UI for every tool on tools.artone.studio ──
   DialKit (light theme) supplies the controls; this file adds the Artone
   layer on top: Suisse Int'l, the site's neutral palette, black pill CTAs,
   and the tool shell (sidebar + stage). Client branding never lives here —
   it belongs only to what a tool draws on its stage.

   Load order: vendor/dialkit/styles.css → kit.css → the tool's own css.   */

/* Suisse Int'l, self-hosted under the studio's web license (same files as
   site/public/fonts). Kept local so a tool never depends on another site. */
@font-face{font-family:"Suisse Int'l";src:url("fonts/SuisseIntl-Regular.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Suisse Int'l";src:url("fonts/SuisseIntl-Book.woff2") format("woff2");font-weight:450;font-display:swap}
@font-face{font-family:"Suisse Int'l";src:url("fonts/SuisseIntl-Medium.woff2") format("woff2");font-weight:500;font-display:swap}

:root{
  /* artone.studio palette (site/src/styles/global.css) */
  --atk-black-1:#000000;
  --atk-black-3:#292929;
  --atk-gray-0:#525252;
  --atk-gray-1:#8a8a8a;
  --atk-gray-2:#adadad;
  --atk-white-1:#d6d6d6;
  --atk-white-2:#ededed;
  --atk-white-3:#f5f5f5;
  --atk-white-4:#fafafa;
  --atk-white:#ffffff;

  --atk-border:rgba(0,0,0,.07);
  --atk-shadow:0 1px 8px -2px rgba(0,0,0,.12);      /* the site's card shadow */
  --atk-sans:"Suisse Int'l",ui-sans-serif,system-ui,-apple-system,sans-serif;
  --atk-sidebar-w:300px;
  color-scheme:light;
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%;overflow:hidden}
body{
  background:var(--atk-white-3);color:var(--atk-black-1);
  font-family:var(--atk-sans);font-weight:450;font-size:13px;line-height:1.4;
  letter-spacing:-0.01em;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  user-select:none;
}

/* ── DialKit light theme, Artone-tuned ──────────────────────────────────
   DialKit's light tokens already match the site (inputs on #f5f5f5,
   black text, hairline borders) — only the type, panel surface and
   radius move closer to artone.studio.                                  */
.dialkit-root[data-theme="light"]{
  --dial-glass-bg:var(--atk-white);
  --dial-dropdown-bg:var(--atk-white);
  --dial-radius:10px;
  --dial-row-height:36px;
  --dial-shadow-dropdown:0 6px 24px -4px rgba(0,0,0,.14);
  font-family:var(--atk-sans);
  letter-spacing:-0.01em;
}
.atk-app .dialkit-folder-title{font-weight:500;color:var(--atk-black-1)}
/* sections live on their own cards, so no divider lines — not even between
   folders that share a card */
.atk-app .dialkit-folder{border-top:0;margin-top:0}
/* DialKit backs each section header with a white ::before (inset 0 -12px)
   meant for its own scrolling panel. In our layout its containing block is
   the whole sidebar, so it painted a white sheet behind the entire column.
   Our sections sit on their own cards and don't stick, so it goes. */
.atk-app .dialkit-folder-section > .dialkit-folder-header::before{display:none}
.atk-card > .dialkit-folder-section > .dialkit-folder-content > .dialkit-folder-inner{padding-bottom:4px}
/* every segmented control (On/Off, tabs, the color formats): the selected
   option rides a white pill, same as the chips */
.atk-app .dialkit-segmented-pill,.dialkit-color-popover .dialkit-segmented-pill{
  background:var(--atk-white);box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:calc(var(--dial-radius) - 2px);
}
/* text inputs: no focus underline, the row itself shows focus */
.atk-app .dialkit-text-input:focus-visible{background-image:none}
.atk-app .dialkit-text-control:focus-within{background:var(--dial-surface-hover)}

/* ── shell ── */
.atk-app{display:flex;height:100vh;background:var(--atk-white-3)}

/* The sidebar has no surface of its own: the header, one card per section
   and the actions float straight on the app's gray, same as the canvas.
   The whole column scrolls (header included); only the actions stay put,
   on a solid gray bar the cards pass behind. */
.atk-sidebar{
  width:var(--atk-sidebar-w);min-width:var(--atk-sidebar-w);height:100%;
  display:flex;flex-direction:column;gap:8px;padding:12px 12px 0;
  overflow-y:auto;overflow-x:hidden;
  scrollbar-width:none;                 /* still scrolls; the cards are the visual edge */
}
.atk-sidebar::-webkit-scrollbar{display:none}
.atk-card{background:var(--atk-white);border-radius:20px;box-shadow:var(--atk-shadow);padding:8px 12px}
.atk-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px;flex-shrink:0;
}
.atk-title{font-size:15px;font-weight:500;letter-spacing:-0.02em}
.atk-client{display:flex;align-items:center;font-size:12px;color:var(--atk-gray-2)}
.atk-client-logo{display:block;height:16px;width:auto}
.atk-panel{display:flex;flex-direction:column;gap:8px}
.atk-foot{
  position:sticky;bottom:0;z-index:1;margin:auto -12px 0;padding:4px 12px 12px;
  display:flex;gap:8px;flex-shrink:0;background:var(--atk-white-3);
}
/* on the gray sidebar, secondary actions sit on white like the cards */
.atk-foot .atk-btn:not(.atk-btn--primary){background:var(--atk-white);box-shadow:var(--atk-shadow)}
.atk-foot .atk-btn:not(.atk-btn--primary):hover{background:var(--atk-white-4)}
.atk-foot > *{flex:1}

.atk-stage{flex:1;position:relative;overflow:hidden;background:var(--atk-white-3)}
.atk-toolbar{position:absolute;top:12px;right:12px;z-index:10;display:flex;gap:6px}
.atk-tag{
  position:absolute;top:12px;left:12px;z-index:10;pointer-events:none;
  display:inline-flex;align-items:center;gap:6px;
  height:32px;padding:0 12px 0 10px;border-radius:99px;
  background:var(--atk-white);box-shadow:var(--atk-shadow);
  font-size:12px;color:var(--atk-gray-0);
}
.atk-tag svg{width:11px;height:11px;flex-shrink:0;color:var(--atk-black-1)}

/* ── full-bleed: the stage fills the whole tool and the sidebar floats on
   top of it (opt in with .atk-app--fullbleed). The tool draws edge to
   edge, under the sidebar too. */
.atk-app--fullbleed{position:relative}
.atk-app--fullbleed .atk-stage{position:absolute;inset:0}
.atk-app--fullbleed .atk-sidebar{position:relative;z-index:5}
.atk-app--fullbleed .atk-foot{background:transparent}
.atk-app--fullbleed .atk-tag{left:calc(var(--atk-sidebar-w) + 12px)}

/* ── buttons: secondary = DialKit surface, primary = the site's black pill ── */
.atk-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:36px;padding:0 14px;border:0;border-radius:99px;cursor:pointer;
  background:var(--atk-white-3);color:var(--atk-black-1);
  font:inherit;font-size:13px;font-weight:500;letter-spacing:-0.01em;
  transition:background .15s,opacity .15s,transform .1s;
}
.atk-btn:hover{background:var(--atk-white-2)}
.atk-btn:active{transform:scale(.98)}
.atk-btn:disabled{opacity:.35;pointer-events:none}
.atk-btn:focus-visible{outline:2px solid var(--atk-black-1);outline-offset:2px}
.atk-btn--primary{background:var(--atk-black-1);color:var(--atk-white)}
.atk-btn--primary:hover{background:var(--atk-black-3)}
.atk-btn--danger{color:#c0392b}
.atk-btn--icon{width:36px;padding:0}
.atk-btn--float{background:var(--atk-white);box-shadow:var(--atk-shadow)}
.atk-btn--float:hover{background:var(--atk-white-4)}
.atk-btn--float:disabled{opacity:1;color:var(--atk-white-1);box-shadow:none;background:rgba(255,255,255,.6)}
.atk-btn svg{width:16px;height:16px;flex-shrink:0}

/* ── chips: multi-select, drawn in DialKit's row language ── */
.atk-field{margin:0 0 var(--dial-row-gap,6px)}
.atk-field-label{display:block;padding:6px 2px 8px;font-size:12px;color:rgba(0,0,0,.6)}
/* same track + raised pill as DialKit's segmented control, but multi-select */
.atk-chips{
  display:grid;grid-template-columns:repeat(2,1fr);gap:2px;padding:2px;
  background:var(--dial-surface);border-radius:var(--dial-radius);
}
.atk-chip{
  height:32px;padding:0 10px;border:0;border-radius:calc(var(--dial-radius) - 2px);cursor:pointer;
  background:transparent;color:rgba(0,0,0,.45);
  font:inherit;font-size:12.5px;transition:background .15s,color .15s,box-shadow .15s;
}
.atk-chip:hover{color:var(--atk-black-1)}
.atk-chip.is-on{background:var(--atk-white);color:var(--atk-black-1);box-shadow:0 1px 3px rgba(0,0,0,.1)}
.atk-chip:focus-visible{outline:2px solid var(--atk-black-1);outline-offset:-2px}

/* ── swatches ── */
.atk-swatches{display:flex;flex-wrap:wrap;gap:5px}
.atk-swatch{
  position:relative;width:22px;height:22px;border:0;border-radius:99px;cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);transition:transform .12s;
}
.atk-swatch:hover{transform:scale(1.1)}
.atk-swatch.is-on{outline:2px solid var(--atk-black-1);outline-offset:2px}
.atk-swatch--custom{background:conic-gradient(#f66,#fd6,#6f9,#6cf,#c6f,#f66)}
/* the rainbow dot hosts DialKit's color control; only its (invisible)
   swatch button remains, stretched over the dot, so it opens DialKit's picker */
.atk-swatch--custom .dialkit-color-control{position:absolute;inset:0;height:auto;padding:0;background:none}
.atk-swatch--custom .dialkit-color-label,.atk-swatch--custom .dialkit-color-value{display:none}
.atk-swatch--custom .dialkit-color-inputs{position:absolute;inset:0}
.atk-swatch--custom .dialkit-color-swatch{position:absolute;inset:0;width:100%;height:100%;opacity:0;border-radius:99px}

/* ── popover (e.g. per-object editor on the stage) ── */
.atk-popover{
  position:absolute;z-index:30;width:288px;
  background:var(--atk-white);border-radius:16px;
  box-shadow:0 10px 36px -6px rgba(0,0,0,.18),0 0 0 1px var(--atk-border);
  padding:6px 10px 10px;
}
.atk-popover-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:8px 4px 6px;font-size:13px;font-weight:500;cursor:move;
}
.atk-popover-x{
  width:24px;height:24px;border-radius:99px;border:0;cursor:pointer;
  display:grid;place-items:center;background:transparent;color:var(--atk-gray-1);
}
.atk-popover-x:hover{background:var(--atk-white-3);color:var(--atk-black-1)}
.atk-popover-x svg{width:12px;height:12px}
.atk-popover-body{display:flex;flex-direction:column;gap:var(--dial-row-gap,6px)}
.atk-popover-body > .atk-field{margin:0}
.atk-hint{padding:2px 4px 2px;font-size:11.5px;color:var(--atk-gray-1)}
.atk-row{display:flex;gap:6px;margin-top:4px}
.atk-row > *{flex:1}

/* ── toast ── */
.atk-toast{
  position:fixed;bottom:24px;left:calc(50% + var(--atk-sidebar-w) / 2);z-index:100;
  transform:translate(-50%,8px);opacity:0;pointer-events:none;
  height:36px;padding:0 16px;display:flex;align-items:center;border-radius:99px;
  background:var(--atk-black-1);color:var(--atk-white);font-size:12.5px;
  transition:opacity .2s,transform .2s;
}
.atk-toast.is-on{opacity:1;transform:translate(-50%,0)}
