/**
 * LikeInk Designer — Design System
 *
 * The "Modernist" token + component system from the Claude Design source
 * (ClaudeDesign/Tattoo Sheet Editor.dc.html), retuned to the Like Ink brand.
 *
 * Two things were merged to produce this file:
 *   1. The base system, extracted from the design system stylesheet bundled
 *      into ClaudeDesign/Custom Tattoo Sheet Designer.html.
 *   2. The brand overrides the design applies on top of it, in the <helmet>
 *      block of Tattoo Sheet Editor.dc.html (orange accent, roc-grotesk,
 *      pill radius, 1px hairlines).
 *
 * Everything below the token block is scoped under .likeink-designer-app so
 * the sheet cannot leak into the theme. Do not add bare element selectors.
 *
 * Fonts come from the Typekit kit the child theme already uses (pdn1oux);
 * Assets.php enqueues it, because the designer's standalone template does not
 * load the theme header that would otherwise pull it in.
 */

:root {
	--color-bg: #ffffff;
	--color-surface: #fbe3d2;
	--color-text: #000000;
	--color-accent: #f4801f;
	--color-accent-2: #4b7a3e;
	--color-divider: rgba( 20, 20, 20, 0.15 );

	/* Neutral ramp, carried over from the base system. */
	--color-neutral-100: #f8f4f4;
	--color-neutral-200: #eae7e7;
	--color-neutral-300: #d7d3d3;
	--color-neutral-400: #bab6b6;
	--color-neutral-500: #9b9797;
	--color-neutral-600: #7d7979;
	--color-neutral-700: #605d5d;
	--color-neutral-800: #444141;
	--color-neutral-900: #2d2b2b;

	/* Accent ramp, regenerated around the brand orange. The base system's
	   ramp was built for its red accent; the design overrides only
	   --color-accent, which left every hover/active state pulling a red out
	   of the old ramp. These are the same lightness steps in orange. */
	--color-accent-100: #fff4e8;
	--color-accent-200: #ffe4c8;
	--color-accent-300: #fdcb98;
	--color-accent-400: #f9a85c;
	--color-accent-500: #f4801f;
	--color-accent-600: #d76a0e;
	--color-accent-700: #ad530a;
	--color-accent-800: #7d3c09;
	--color-accent-900: #4e2708;

	/* Secondary accent ramp, likewise regenerated around the brand green. */
	--color-accent-2-100: #eef5ea;
	--color-accent-2-200: #d6e7cd;
	--color-accent-2-300: #b4d2a4;
	--color-accent-2-400: #86b370;
	--color-accent-2-500: #5f9147;
	--color-accent-2-600: #4b7a3e;
	--color-accent-2-700: #3a6030;
	--color-accent-2-800: #2b4624;
	--color-accent-2-900: #1d2f19;

	/* Add-to-cart is its own brand pairing in the design, not an accent step. */
	--color-cart-bg: #2d6947;
	--color-cart-fg: #9bbf5d;

	--font-heading: 'roc-grotesk', 'Space Grotesk', system-ui, sans-serif;
	--font-heading-weight: 600;
	--font-body: 'roc-grotesk', 'Inter', system-ui, sans-serif;
	--font-wide: 'roc-grotesk-wide', 'roc-grotesk', system-ui, sans-serif;

	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-6: 24px;
	--space-8: 32px;

	--radius-sm: 0px;
	--radius-md: 999px;
	--radius-lg: 0px;

	--shadow-sm: 0 1px 2px color-mix( in srgb, #2d2b2b 14%, transparent );
	--shadow-md: 0 3px 10px color-mix( in srgb, #2d2b2b 16%, transparent );
	--shadow-lg: 0 12px 32px color-mix( in srgb, #2d2b2b 22%, transparent );
}

/* ── base ─────────────────────────────────────────────────────────────── */

.likeink-designer-app,
.likeink-designer-app *,
.likeink-designer-app *::before,
.likeink-designer-app *::after {
	box-sizing: border-box;
}

.likeink-designer-app {
	margin: 0;
	background: var( --color-bg );
	color: var( --color-text );
	font-family: var( --font-body );
	font-size: 15px;
	line-height: 1.55;
	font-weight: 400;
}

.likeink-designer-app h1,
.likeink-designer-app h2,
.likeink-designer-app h3,
.likeink-designer-app h4,
.likeink-designer-app h5,
.likeink-designer-app h6 {
	font-family: var( --font-heading );
	font-weight: var( --font-heading-weight );
	line-height: 1.12;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	margin: 0 0 var( --space-2 );
}

.likeink-designer-app h1 { font-size: 42px; }
.likeink-designer-app h2 { font-size: 32px; }
.likeink-designer-app h3 { font-size: 25px; }
.likeink-designer-app h4 { font-size: 20px; }
.likeink-designer-app h5 { font-size: 16px; }
.likeink-designer-app h6 { font-size: 13px; letter-spacing: 0.08em; }

.likeink-designer-app p { margin: 0 0 var( --space-3 ); }
.likeink-designer-app img { display: block; max-width: 100%; }
.likeink-designer-app a { color: var( --color-accent ); text-underline-offset: 3px; }
.likeink-designer-app a:hover { color: var( --color-accent-700 ); }
.likeink-designer-app :focus { outline: none; }
.likeink-designer-app :focus-visible { outline: 2px solid var( --color-accent ); outline-offset: 2px; }
.likeink-designer-app ::selection { background: color-mix( in srgb, var( --color-accent ) 30%, transparent ); }

.likeink-designer-app .text-muted {
	color: color-mix( in srgb, var( --color-text ) 55%, transparent );
}

/* Small uppercase section label, used above the sidebar's panels. */
.likeink-designer-app .eyebrow {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.6;
}

/* Neutralise the theme's own form styling.
 *
 * The designer's page skips get_header(), but wp_head() still enqueues the
 * active theme's stylesheet, so Flatsome's rules for bare `button` and `input`
 * elements apply here. They are broad — max-width, min-height, uppercase,
 * letter-spacing, a right margin — and they were quietly reshaping every
 * control that is not a .btn.
 *
 * The one that actually broke something: `max-width: 100%` on the absolutely
 * positioned sidebar flap resolved against a collapsed (0px) sidebar and shrank
 * the button to a 1px sliver that could not be clicked.
 *
 * `label` belongs in this list too. Flatsome gives every bare label a
 * bottom margin, and in a flex row the margin sits outside the item — so the
 * segmented control grew ~5px taller than its two labels and the checked
 * option's background stopped short of the bottom edge.
 *
 * Everything below the reset re-applies what the design system wants.
 */
.likeink-designer-app button,
.likeink-designer-app input,
.likeink-designer-app label,
.likeink-designer-app select,
.likeink-designer-app textarea {
	margin: 0;
	max-width: none;
	min-height: 0;
	font: inherit;
	color: inherit;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	border-radius: 0;
	box-shadow: none;
	transition: none;
}

/* The reset above covers the resting state, but the theme also paints every
 * bare control on :hover AND :focus:
 *
 *     [type="button"]:hover, [type="button"]:focus, button:hover, button:focus
 *         { background-color: #c36; color: #fff }
 *
 * `[type="button"]:hover` weighs (0,2,0) — the same as our own component
 * rules — and Flatsome's stylesheet is enqueued after ours, so it wins every
 * tie. Our hover rules were only ever winning because they carry a third
 * class (`:not(:disabled)`); none of them matched :focus at all, so every
 * button in the editor turned magenta with white text the moment it took
 * focus — which on a touchscreen is immediately after it is tapped.
 *
 * The fix is per-state rather than a blanket reset: "transparent" is the wrong
 * answer for .btn-cart or a FAB, whose resting background is the thing worth
 * keeping. So each state rule below simply restates what the control already
 * looks like, at a weight the theme cannot tie.
 */

/* ── rules ────────────────────────────────────────────────────────────── */

.likeink-designer-app .hr {
	height: 1px;
	border: 0;
	margin: var( --space-4 ) 0;
	background: var( --color-divider );
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.likeink-designer-app .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	text-decoration: none;
	font-family: var( --font-wide );
	font-weight: 600;
	text-transform: uppercase;
	font-size: 11px;
	line-height: 1.2;
	color: var( --color-text );
	background: transparent;
	border: 1px solid transparent;
	padding: 10px calc( var( --space-3 ) * 1.2 ) var( --space-2 );
	border-radius: var( --radius-md );
}

.likeink-designer-app .btn svg { display: block; flex-shrink: 0; }
.likeink-designer-app .btn:disabled { opacity: 0.45; cursor: not-allowed; }

.likeink-designer-app .btn-primary { background: var( --color-accent ); color: var( --color-bg ); }
.likeink-designer-app .btn-primary:is( :hover, :focus ):not( :disabled ) { background: var( --color-accent-600 ); }
.likeink-designer-app .btn-primary:active:not( :disabled ) { background: var( --color-accent-700 ); }

.likeink-designer-app .btn-secondary { border-color: var( --color-divider ); }
.likeink-designer-app .btn-secondary:is( :hover, :focus ):not( :disabled ) { background: color-mix( in srgb, var( --color-text ) 7%, transparent ); }
.likeink-designer-app .btn-secondary:active:not( :disabled ) { background: color-mix( in srgb, var( --color-text ) 14%, transparent ); }

.likeink-designer-app .btn-ghost { color: var( --color-accent ); padding-inline: var( --space-1 ); }
.likeink-designer-app .btn-ghost:is( :hover, :focus ):not( :disabled ) { background: color-mix( in srgb, var( --color-accent ) 10%, transparent ); }

.likeink-designer-app .btn-cart { background: var( --color-cart-bg ); color: var( --color-cart-fg ); }
.likeink-designer-app .btn-cart:is( :hover, :focus ):not( :disabled ) { background: color-mix( in srgb, var( --color-cart-bg ) 88%, #000 ); }

.likeink-designer-app .btn-icon { width: 36px; height: 36px; padding: 0; }
.likeink-designer-app .btn-block { width: 100%; }

/* ── forms ────────────────────────────────────────────────────────────── */

.likeink-designer-app .field > label {
	display: block;
	font-size: 12px;
	margin-bottom: 5px;
	color: color-mix( in srgb, var( --color-text ) 70%, transparent );
}

.likeink-designer-app .input {
	width: 100%;
	min-height: 36px;
	padding: 6px 10px;
	font: inherit;
	font-size: 14px;
	color: var( --color-text );
	caret-color: var( --color-accent );
	background: #fff;
	border: 1px solid var( --color-divider );
	border-radius: var( --radius-md );
}

.likeink-designer-app .input:hover { border-color: color-mix( in srgb, var( --color-text ) 45%, transparent ); }
.likeink-designer-app .input:focus-visible { border-color: var( --color-accent ); outline-offset: 0; }
.likeink-designer-app textarea.input { min-height: 90px; resize: vertical; border-radius: var( --radius-sm ); }

/* Segmented control. The radio itself is visually hidden; the label is the
   control, and :has() paints the checked one. */
.likeink-designer-app .seg {
	display: inline-flex;
	overflow: hidden;
	border: 1px solid var( --color-divider );
	border-radius: var( --radius-md );
}

.likeink-designer-app .seg-opt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	font-size: 13px;
	cursor: pointer;
}

.likeink-designer-app .seg-opt input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.likeink-designer-app .seg-opt + .seg-opt { border-left: 1px solid var( --color-divider ); }
.likeink-designer-app .seg-opt:has( input:checked ) { background: var( --color-accent ); color: var( --color-bg ); }
.likeink-designer-app .seg-opt:not( :has( input:checked ) ):is( :hover, :focus ) { background: color-mix( in srgb, var( --color-text ) 7%, transparent ); }
.likeink-designer-app .seg-opt:has( input:focus-visible ) { outline: 2px solid var( --color-accent ); outline-offset: -2px; }

/* ── tags ─────────────────────────────────────────────────────────────── */

.likeink-designer-app .tag {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	letter-spacing: 0.02em;
	padding: 3px 10px;
	border-radius: var( --radius-md );
	white-space: nowrap;
}

.likeink-designer-app .tag-neutral { background: var( --color-neutral-100 ); color: var( --color-neutral-800 ); }
.likeink-designer-app .tag-accent { background: var( --color-accent-100 ); color: var( --color-accent-800 ); }
.likeink-designer-app .tag-outline { border: 1px solid var( --color-accent ); color: var( --color-accent ); }

/* ── navigation ───────────────────────────────────────────────────────── */

.likeink-designer-app .nav {
	display: flex;
	align-items: center;
	gap: var( --space-4 );
	padding: var( --space-3 ) var( --space-4 );
	border-bottom: 1px solid var( --color-divider );
}

/* ── elevation ────────────────────────────────────────────────────────── */

.likeink-designer-app .elev-sm { box-shadow: var( --shadow-sm ); }
.likeink-designer-app .elev-md { box-shadow: var( --shadow-md ); }
.likeink-designer-app .elev-lg { box-shadow: var( --shadow-lg ); }
