/* AIM Keycap configurator: dark look from the Keycap Studio mockup, scoped to .aimkc.
   No font families or sizes here: text inherits the theme font, sizes come from theme classes (is-xsmall/is-small/is-xlarge) in template.php. */
.aimkc {
	--accent: #f20746; --bg: #0a0b0e; --surface: #14171d; --raised: #1c2028; --line: #2c323d; --muted: #a3acba; --text: #f1f5f9;
	color-scheme: dark; background: var(--bg); color: var(--text);
}
.aimkc *, .aimkc *::before, .aimkc *::after { box-sizing: border-box; }

/* Theme resets: Flatsome styles bare buttons/labels; here they take font and size from their parent, weight stays the theme's button weight. */
.aimkc button { margin: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; text-transform: none; letter-spacing: normal; text-shadow: none; box-shadow: none; cursor: pointer; max-width: none; -webkit-tap-highlight-color: transparent; }
.aimkc button:disabled { cursor: default; }
.aimkc label { margin: 0; font-weight: inherit; color: inherit; }
.aimkc h1, .aimkc h2, .aimkc h3 { color: #fff; margin: 0; }
.aimkc p { margin: 0; }
.aimkc img { max-width: 100%; }
.aimkc input[type=file] { display: none; }
.aimkc :focus-visible { outline: 2px solid #ff477c; outline-offset: 4px; }

/* Top bar */
.aimkc-bar { display: flex; align-items: center; gap: 16px; padding: 14px 40px; background: #0e1015; border-bottom: 1px solid var(--line); }
.aimkc-name { color: var(--muted); margin-right: auto; }
.aimkc-purchase { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.aimkc-purchase strong { white-space: nowrap; }
.aimkc .aimkc-cta, .aimkc .aimkc-next { background: var(--accent); color: #fff; border-radius: 9px; padding: 14px 20px; box-shadow: 0 4px 20px #f207461a; }
.aimkc .aimkc-cta:hover, .aimkc .aimkc-next:hover { background: #ce063d; }
.aimkc .aimkc-cta:disabled { opacity: .5; }

/* Step tabs */
.aimkc-tabs { background: #101218; border-bottom: 1px solid var(--line); padding: 0 40px; }
.aimkc-tablist { max-width: 1620px; margin: auto; display: grid; grid-template-columns: repeat(var(--aimkc-steps, 5), minmax(0, 1fr)); gap: 16px; }
.aimkc .aimkc-tab { color: #aab2c0; border-bottom: 3px solid #303540; padding: 17px 8px 14px; min-height: 55px; text-align: center; }
.aimkc .aimkc-tab:hover { color: #fff; background: #ffffff06; }
.aimkc .aimkc-tab.active { color: #fff; border-bottom-color: var(--accent); background: linear-gradient(0deg, #f2074617, transparent); }

/* Layout */
.aimkc-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; max-width: 1700px; margin: auto; align-items: start; }
.aimkc-preview { padding: 28px 40px 48px; min-width: 0; align-self: stretch; background: radial-gradient(ellipse at 15% 0%, #f207460b, transparent 50%); }
.aimkc-sticky { position: sticky; top: calc(var(--aimkc-top, 0px) + 12px); z-index: 2; background: var(--bg); padding-bottom: 12px; }
.aimkc-intro h1 { margin: 0 0 8px; }
.aimkc-intro h1 em { font-style: normal; color: var(--accent); }
.aimkc-intro p { color: var(--muted); }
.aimkc-lighting { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 20px; color: var(--muted); }
.aimkc .aimkc-reset { margin-right: auto; border: 1px solid #3a4351; background: var(--surface); color: #e1e8f2; padding: 10px 15px; border-radius: 9px; white-space: nowrap; }
.aimkc .aimkc-reset:hover { background: #252b36; }
.aimkc-rgb { display: flex; padding: 4px; gap: 3px; background: #07090d; border: 1px solid #303746; border-radius: 10px; }
.aimkc .aimkc-rgb button { border-radius: 7px; padding: 11px 16px; min-height: 38px; color: #a6b0bf; }
.aimkc .aimkc-rgb button.selected { background: #2b1a25; color: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.aimkc-rgb i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: conic-gradient(#ec56b7, #816cf1, #52c7f2, #93e385, #ec56b7); }
.aimkc-stage { margin-top: 16px; background: #fff; border: 1px solid #343944; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px #0005; }
.aimkc-viewport { overflow: hidden; position: relative; }
.aimkc canvas { display: block; width: 100%; height: auto; touch-action: none; }
.aimkc-stage-bottom { display: flex; justify-content: space-between; padding: 14px 20px; background: var(--surface); color: #adb6c4; border-top: 1px solid var(--line); }
.aimkc-stage-bottom i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px #f2074666; }
.aimkc-below { display: flex; justify-content: space-between; margin-top: 12px; color: #b7c0ce; }
.aimkc .aimkc-zoom-hint { display: none; }

/* Accessories */
.aimkc-acc { margin-top: 28px; }
.aimkc-acc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.aimkc-acc-head h2 { margin-top: 9px; }
.aimkc-eyebrow { color: #bac3d0; }
.aimkc-optional { color: var(--muted); }
.aimkc-acc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aimkc .aimkc-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.aimkc .aimkc-card:hover { border-color: #586478; }
.aimkc-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.aimkc-card:has(input:focus-visible) { outline: 2px solid #ff477c; outline-offset: 4px; }
.aimkc .aimkc-acc-check { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.aimkc-check { position: absolute; right: 12px; top: 12px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #657085; border-radius: 5px; color: transparent; background: #0d1016; }
.aimkc-card:has(input:checked) .aimkc-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.aimkc-card img { width: 100%; height: 110px; object-fit: contain; margin-bottom: 14px; background: #fff; border-radius: 8px; }
.aimkc-card-info { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aimkc-card-info span { white-space: nowrap; }
.aimkc-card-desc { margin-top: 6px; color: var(--muted); }
.aimkc-card-action { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); color: #b1bccb; }
.aimkc-card:has(input:checked) .aimkc-card-action { color: #ff628d; }
.aimkc-acc-total { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; color: var(--muted); }
.aimkc-acc-total strong { color: #fff; margin-left: 10px; }

/* Side panel */
.aimkc-aside { position: sticky; top: var(--aimkc-top, 0px); max-height: calc(100dvh - var(--aimkc-top, 0px)); overflow-y: auto; overscroll-behavior: contain; padding: 20px 28px 24px; background: var(--surface); border-left: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: #46505f var(--surface); }
.aimkc-panel-title { display: flex; justify-content: space-between; align-items: center; }
.aimkc-panel-title h2 { margin: 12px 0 22px; }
.aimkc-panel-title span { color: var(--muted); white-space: nowrap; }
.aimkc-step { padding: 8px 0 18px; }
.aimkc-step[hidden] { display: none !important; }
.aimkc-hint { color: var(--muted); }
.aimkc-hint.aimkc-small { margin-top: 14px; }
.aimkc .aimkc-text { color: #bdc7d6; text-decoration: underline; text-underline-offset: 3px; }
.aimkc .aimkc-text:hover { color: #fff; }

.aimkc .aimkc-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 10px; background: #0d1016; border: 1px dashed #49515f; border-radius: 10px; cursor: pointer; }
.aimkc .aimkc-upload:hover { border-color: var(--accent); background: #f2074609; }
.aimkc-upload span { color: var(--muted); }
.aimkc .aimkc-strap-upload { margin-top: 18px; padding: 17px 10px; }
.aimkc-fileline { display: flex; justify-content: space-between; gap: 10px; margin: 15px 0 8px; }
.aimkc-fileline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.aimkc .aimkc-range { display: block; margin: 14px 0; }
.aimkc-range output { float: right; color: var(--muted); }
.aimkc-range input { display: block; width: 100%; margin: 12px 0; accent-color: var(--accent); }

.aimkc-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.aimkc .aimkc-preset { padding: 6px; text-align: left; background: var(--raised); border: 1px solid #343c48; border-radius: 9px; color: #dbe3ed; }
.aimkc .aimkc-preset.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.aimkc-preset-swatch { display: block; height: 44px; border-radius: 5px; }
.aimkc-preset-name { display: block; margin: 8px 3px 3px; }
.aimkc-preset.active .aimkc-preset-name::after { content: '✓'; float: right; color: #ff4679; }
.aimkc .aimkc-solid { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; }
.aimkc-solid input { width: 32px; height: 28px; padding: 2px; margin: 0; background: var(--raised); border: 1px solid #49515f; border-radius: 5px; cursor: pointer; }

.aimkc-group-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 20px; }
.aimkc .aimkc-group-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 70px; padding: 10px 5px; color: #bbc6d5; background: #10131a; border: 1px solid #343d4a; border-radius: 7px; }
.aimkc .aimkc-group-tabs button.selected { color: #fff; background: #f2074612; border-color: var(--accent); }
.aimkc-group-tabs canvas { width: 66px; border-radius: 2px; }
.aimkc-group-label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.aimkc-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #b4bbc4; display: inline-block; }
.aimkc-palette-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.aimkc-palette-head span { color: var(--muted); }
.aimkc-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.aimkc .aimkc-swatch { position: relative; min-height: 40px; border: 1px solid #ffffff35; border-radius: 6px; }
.aimkc .aimkc-swatch.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.aimkc-swatch.selected::after { content: '✓'; position: absolute; inset: 7px auto auto 50%; transform: translateX(-50%); display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: #17191c; }
.aimkc .aimkc-swatch:disabled { opacity: .45; }
.aimkc-group-resets { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

.aimkc-legend + .aimkc-legend { margin-top: 18px; }
.aimkc-legend > span { display: block; color: var(--muted); margin-bottom: 8px; }
.aimkc-legend-options { display: flex; flex-wrap: wrap; gap: 6px; }
.aimkc .aimkc-legend-options button { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; color: #d7e0ed; background: #0d1016; border: 1px solid #424b59; border-radius: 7px; }
.aimkc .aimkc-legend-options button.selected { color: #fff; background: #f2074614; border-color: var(--accent); }
.aimkc-legend-options i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #c5cbd2; display: inline-block; }

.aimkc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 8px; border-top: 1px solid var(--line); }
.aimkc .aimkc-back { min-height: 44px; padding: 12px 18px; border: 1px solid #3a4351; border-radius: 8px; background: var(--raised); color: #dbe3ed; }
.aimkc .aimkc-back:disabled { opacity: .35; }
.aimkc .aimkc-next { min-height: 44px; min-width: 110px; padding: 12px 14px; }

#aimkcToast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; display: none; max-width: 90%; padding: 14px 22px; background: #232a35; border: 1px solid #475266; border-radius: 9px; color: #fff; }

@media (max-width: 900px) {
	.aimkc-bar { padding: 10px 16px; }
	.aimkc .aimkc-cta { padding: 12px; }
	.aimkc-tabs { padding: 0 8px; }
	.aimkc-tablist { gap: 4px; }
	.aimkc .aimkc-tab { min-height: 52px; padding: 10px 4px; white-space: normal; }
	.aimkc-main { grid-template-columns: minmax(0, 1fr); }
	.aimkc-preview { display: contents; }
	.aimkc-sticky { order: 0; position: sticky; top: var(--aimkc-top, 0px); z-index: 5; padding: 10px 16px 12px; background: #0a0b0ef5; backdrop-filter: blur(12px); border-bottom: 1px solid #303745; }
	.aimkc-intro { display: none; }
	.aimkc-lighting { margin-top: 0; gap: 10px; }
	.aimkc .aimkc-rgb button { padding: 8px 13px; min-height: 34px; }
	.aimkc-stage { margin-top: 8px; border-radius: 10px; }
	.aimkc-stage-bottom { padding: 8px 12px; }
	.aimkc-below { margin-top: 7px; }
	.aimkc-below span:last-child { display: none; }
	.aimkc .aimkc-zoom-hint { display: block; width: 100%; padding: 8px 0 1px; text-align: left; color: #b8c3d2; cursor: zoom-in; }
	.aimkc .aimkc-zoom-hint[aria-pressed=true] { color: #ff628d; cursor: zoom-out; }
	.aimkc-viewport canvas { transform-origin: center; will-change: transform; }
	.aimkc-aside { order: 1; position: static; max-height: none; overflow: visible; border-left: 0; padding: 18px 20px 24px; }
	.aimkc-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.aimkc .aimkc-swatch { min-height: 44px; }
	.aimkc .aimkc-group-tabs button { min-height: 76px; }
	.aimkc-acc { order: 2; margin: 0; padding: 26px 20px 30px; }
	.aimkc-card img { height: 85px; }
}
@media (min-width: 601px) and (max-width: 900px) { .aimkc-stage { max-width: 480px; margin-left: auto; margin-right: auto; } }
@media (max-width: 480px) {
	.aimkc-name { display: none; }
	.aimkc-purchase { width: 100%; justify-content: space-between; }
	.aimkc-lighting > span { display: none; }
	.aimkc-acc-grid { gap: 8px; }
	.aimkc .aimkc-card { padding: 10px; }
	.aimkc-acc-head .aimkc-optional { display: none; }
}
@media (max-width: 900px) and (orientation: landscape) and (max-height: 550px) { .aimkc-sticky { position: static; } }
@media (prefers-reduced-motion: no-preference) { .aimkc button, .aimkc .aimkc-upload { transition: background .15s, border-color .15s; } }
