/* =============================================
   BOOT ID — 3D Boot Studio (section #bi-order on boot-id.html)
   3D stage left, control panel right (the panel scrolls on its own);
   stacked on phones.
   ============================================= */
/* main.css fades images in only for ones present at page load; the studio builds its own */
.bs-app img { opacity: 1; }
/* main.css hides the system cursor for the site's custom one; inside the studio the real cursor shows */
.bs-app, .bs-app * { cursor: auto; }
.bs-app a, .bs-app button, .bs-app select, .bs-app label,
.bs-app input[type=range], .bs-app input[type=color], .bs-app input[type=checkbox] { cursor: pointer; }
.bs-app input[type=text], .bs-app input[type=search] { cursor: text; }
.bs-app .bs-stage canvas { cursor: grab; }
.bs-app .bs-stage canvas:active { cursor: grabbing; }
.bs-app .bs-cart-btn:disabled, .bs-app .bs-add:disabled { cursor: not-allowed; }
body:has(.bs-app:hover) .cursor, body:has(.bs-app:hover) .cursor-follower { opacity: 0; }

.bs-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  box-sizing: border-box;
}

/* ── STAGE ───────────────────────────────── */
.bs-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 50% 72%, rgba(212, 255, 26, 0.10), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 35%, #2a2a2a 0%, #121212 60%, #080808 100%);
  touch-action: none;
}
.bs-stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.bs-stage-head {
  position: absolute; top: 28px; left: 32px; z-index: 2; pointer-events: none;
}
.bs-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: .9;
  color: var(--white);
  margin: 10px 0 0;
  letter-spacing: 1px;
}
.bs-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: var(--grey-500);
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase; z-index: 3;
}
.bs-loading[hidden] { display: none; }
.bs-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--grey-300); border-top-color: var(--accent);
  animation: bs-spin .8s linear infinite;
}
@keyframes bs-spin { to { transform: rotate(360deg); } }
.bs-hint {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(8, 8, 8, .72); border: 1px solid var(--grey-200);
  color: var(--grey-500); font-size: 12px; padding: 8px 14px; border-radius: 30px;
  white-space: nowrap; z-index: 2; transition: opacity .6s; pointer-events: none;
}
.bs-hint.gone { opacity: 0; }
.bs-views {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 4px; z-index: 2;
  background: rgba(22, 22, 22, .85); border: 1px solid var(--grey-200); border-radius: 40px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bs-views button, .bs-stage-tools button {
  background: none; border: 0; color: var(--grey-500); font: 500 12px var(--font-body);
  letter-spacing: 1px; text-transform: uppercase; padding: 9px 14px; border-radius: 30px; cursor: pointer;
}
.bs-views button:hover, .bs-stage-tools button:hover { color: var(--white); }
.bs-views button.active { background: var(--accent); color: #000; }
.bs-stage-tools { position: absolute; top: 28px; right: 24px; display: flex; gap: 6px; z-index: 2; }
.bs-stage-tools button { background: rgba(22, 22, 22, .85); border: 1px solid var(--grey-200); }

/* floating editor */
.bs-edit {
  position: absolute; right: 24px; top: 80px; width: 260px; z-index: 4;
  background: rgba(16, 16, 16, .94); border: 1px solid var(--grey-300); border-radius: 10px;
  padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bs-edit[hidden] { display: none; }
.bs-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bs-edit-head strong { color: var(--white); font: 400 22px var(--font-display); letter-spacing: 1px; }
.bs-x { background: var(--accent); color: #000; border: 0; border-radius: 20px; font: 700 11px var(--font-body); letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; cursor: pointer; }
.bs-range { display: block; margin-bottom: 12px; color: var(--grey-500); font-size: 12px; }
.bs-range span { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bs-range b { color: var(--accent); font-weight: 700; }
.bs-range input { width: 100%; accent-color: var(--accent); }
.bs-edit-ink { display: flex; gap: 6px; margin-bottom: 12px; }
.bs-edit-ink[hidden] { display: none; }
.bs-edit-actions { display: flex; gap: 6px; }
.bs-edit-actions button {
  flex: 1; background: var(--grey-200); color: var(--white); border: 1px solid var(--grey-300);
  border-radius: 6px; padding: 9px 6px; font: 500 12px var(--font-body); cursor: pointer;
}
.bs-edit-actions .bs-danger { color: #ff6b6b; }

/* ── PANEL ───────────────────────────────── */
/* the panel is a flex column that scrolls: its parts must keep their height (the tab bar was squashed to 0 and the pane drew over it) */
.bs-panel > * { flex-shrink: 0; }
.bs-panel {
  background: var(--grey-100); border-left: 1px solid var(--grey-200);
  overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; min-height: 0;
}
.bs-tabs {
  display: grid; grid-template-columns: repeat(7, minmax(54px, 1fr)); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 2;
  background: var(--grey-100); border-bottom: 1px solid var(--grey-200);
}
.bs-tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--grey-500);
  padding: 14px 2px 12px; font-size: 10px !important; cursor: pointer; font: 500 11px var(--font-body); letter-spacing: 1px; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.bs-tab-ico { font: 400 20px/1 var(--font-display); height: 22px; display: flex; align-items: center; }
.bs-tab-ico--type { font: 400 17px/1 'Russo One', sans-serif; }
.bs-tabs button.active { color: var(--white); border-bottom-color: var(--accent); }
.bs-tabs button:hover { color: var(--white); }

.bs-pane { display: none; padding: 24px 24px 8px; }
.bs-pane.active { display: block; animation: bs-in .25s var(--ease-out); }
@keyframes bs-in { from { opacity: 0; transform: translateY(6px); } }
.bs-h { font: 400 30px/1 var(--font-display); color: var(--white); letter-spacing: 1px; margin: 0 0 8px; }
.bs-h--sm { font-size: 22px; margin: 0; }
.bs-sub, .bs-note, .bs-fine { color: var(--grey-500); font-size: 13px; line-height: 1.55; margin: 0 0 16px; }
.bs-note { font-size: 12px; margin-top: 14px; }
.bs-note a { color: var(--grey-500); }
.bs-fine { font-size: 11px; margin: 12px 0 0; }
.bs-label { color: var(--grey-500); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin: 18px 0 8px; }

.bs-input {
  width: 100%; box-sizing: border-box; background: var(--black); border: 1px solid var(--grey-300);
  color: var(--white); border-radius: 6px; padding: 14px 16px; font: 400 26px var(--font-display);
  letter-spacing: 2px; text-transform: uppercase; outline: none; transition: border-color .2s;
}
.bs-input:focus { border-color: var(--accent); }
.bs-input--num { font-size: 34px; text-align: center; }
.bs-input--sm { font: 400 14px var(--font-body); letter-spacing: 0; text-transform: none; padding: 11px 14px; }

.bs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-chips button, .bs-ink {
  background: var(--black); border: 1px solid var(--grey-300); color: var(--grey-500);
  border-radius: 6px; padding: 10px 14px; cursor: pointer; font-size: 16px; letter-spacing: 1px; flex: 1;
}
.bs-chips button.active, .bs-ink.active { border-color: var(--accent); color: var(--white); box-shadow: 0 0 0 1px var(--accent) inset; }
.bs-ink { font: 500 13px var(--font-body); display: flex; align-items: center; justify-content: center; gap: 8px; }
.bs-ink::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--grey-400); }
.bs-ink--black::before { background: #000; }
.bs-ink--white::before { background: #fff; }

.bs-add, .bs-next, .bs-cart-btn {
  width: 100%; margin-top: 20px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--accent); color: #000; font: 700 13px var(--font-body); letter-spacing: 2px;
  text-transform: uppercase; padding: 16px; transition: transform .15s, background .2s;
}
.bs-add:hover, .bs-next:hover, .bs-cart-btn:not(:disabled):hover { transform: translateY(-1px); background: #e2ff5c; }
.bs-next { background: var(--grey-200); color: var(--white); }
.bs-next:hover { background: var(--grey-300); }
.bs-cart-btn:disabled { background: var(--grey-200); color: var(--grey-400); cursor: not-allowed; }

.bs-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.bs-swatch {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--grey-300); cursor: pointer; position: relative;
  transition: transform .15s;
}
.bs-swatch:hover { transform: scale(1.08); }
.bs-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212, 255, 26, .25); }
.bs-custom-colour { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--grey-500); font-size: 13px; cursor: pointer; }
.bs-custom-colour input { width: 38px; height: 38px; border: 0; background: none; padding: 0; cursor: pointer; }

.bs-grid { display: grid; gap: 8px; margin-top: 12px; }
.bs-grid > button { min-width: 0; }
.bs-grid--flags { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); max-height: 330px; overflow-y: auto; padding-right: 4px; }
.bs-grid--emoji { grid-template-columns: repeat(5, 1fr); }
.bs-grid button {
  background: var(--black); border: 1px solid var(--grey-200); border-radius: 6px; padding: 8px 4px 6px;
  cursor: pointer; color: var(--grey-500); font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: border-color .15s, transform .15s;
}
.bs-grid button:hover { border-color: var(--accent); transform: translateY(-1px); }
.bs-grid--flags img { width: 42px; height: 28px; border-radius: 4px; object-fit: fill; }
.bs-grid--flags span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.bs-grid--emoji img { width: 34px; height: 34px; }


/* text modes, words, symbols, upload */
.bs-seg { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--black); border: 1px solid var(--grey-300); border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.bs-seg button { background: none; border: 0; color: var(--grey-500); font: 500 12px var(--font-body); padding: 9px 2px; border-radius: 6px; }
.bs-seg button.active { background: var(--accent); color: #000; font-weight: 700; }
.bs-mode[hidden] { display: none; }
.bs-mode .bs-note { margin: 8px 0 0; }
.bs-input--caps { text-transform: uppercase; font-family: 'Russo One', sans-serif; }
.bs-join { margin: 8px 0; }
.bs-join button { font: 400 20px 'Russo One', 'Noto Emoji', sans-serif; padding: 6px; }
.bs-check { display: flex; align-items: center; gap: 10px; color: var(--grey-500); font-size: 13px; margin-top: 12px; }
.bs-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.bs-collections { margin: 4px 0 14px; gap: 6px; }
.bs-collections button { flex: 0 0 auto; font: 500 12px var(--font-body); padding: 7px 12px; border-radius: 30px; letter-spacing: .5px; }
.bs-pills { display: flex; flex-wrap: wrap; gap: 6px; max-height: 300px; overflow-y: auto; }
.bs-pill {
  background: var(--black); border: 1px solid var(--grey-300); color: var(--white); border-radius: 4px;
  font: 400 13px 'Russo One', sans-serif; letter-spacing: .5px; padding: 8px 11px; transition: border-color .15s, background .15s;
}
.bs-pill:hover { border-color: var(--accent); background: rgba(212, 255, 26, .06); }
.bs-pill small { color: var(--grey-500); font: 400 10px var(--font-body); margin-left: 4px; }
.bs-inline { display: flex; gap: 8px; }
.bs-add--inline { width: auto; margin: 0; padding: 0 20px; }
.bs-grid--symbols { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.bs-grid--symbols button { font: 700 26px/1 'Noto Emoji', 'Noto Sans Symbols', sans-serif; color: var(--white); padding: 10px 2px 6px; }
.bs-grid--symbols button span { font: 400 9px var(--font-body); color: var(--grey-500); }
.bs-grid--emoji { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.bs-grid--emoji button span { display: none; }
.bs-upload {
  display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--grey-300); border-radius: 10px;
  padding: 18px; color: var(--white); font-size: 14px; line-height: 1.4; transition: border-color .2s; background: var(--black);
}
.bs-upload:hover, .bs-upload.has-file { border-color: var(--accent); }
.bs-upload small { color: var(--grey-500); font-size: 11px; }
.bs-upload-ico { font-size: 26px; color: var(--accent); width: 48px; height: 48px; border-radius: 8px; background: var(--grey-200); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; }
.bs-upload-ico img { width: 100%; height: 100%; object-fit: contain; }
.bs-add:disabled { background: var(--grey-200); color: var(--grey-400); cursor: not-allowed; transform: none; }

/* summary */
.bs-summary { margin-top: auto; padding: 20px 24px 24px; border-top: 1px solid var(--grey-200); background: #111; }
.bs-summary-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bs-count { background: var(--accent); color: #000; font: 700 12px var(--font-body); border-radius: 20px; padding: 2px 9px; }
.bs-list { list-style: none; margin: 0; padding: 0; max-height: 210px; overflow-y: auto; }
.bs-empty { color: var(--grey-400); font-size: 13px; padding: 6px 0; }
.bs-item {
  display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px; border-radius: 6px; border: 1px solid transparent; cursor: pointer;
}
.bs-item:hover { background: var(--grey-100); }
.bs-item.active { border-color: var(--accent); background: rgba(212, 255, 26, .05); }
.bs-item-thumb { width: 34px; height: 24px; object-fit: contain; border-radius: 3px; background: #2a2a2a; }
.bs-item-name { color: var(--white); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-item-meta { color: var(--grey-500); font-size: 11px; }
.bs-item select {
  background: var(--black); color: var(--white); border: 1px solid var(--grey-300); border-radius: 4px;
  font: 500 11px var(--font-body); padding: 5px 4px;
}
.bs-item-price { color: var(--white); font: 700 13px var(--font-body); min-width: 48px; text-align: right; }
.bs-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--grey-300); color: var(--grey-500); font-size: 13px; }
.bs-total-row strong { color: var(--accent); font: 400 32px var(--font-display); letter-spacing: 1px; }

.bs-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--accent); color: #000; font: 700 13px var(--font-body); padding: 12px 20px; border-radius: 30px;
  z-index: 9999; transition: all .3s var(--ease-out); pointer-events: none;
}
.bs-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── PHONES / TABLETS ────────────────────── */
@media (max-width: 900px) {
  .bs-app { grid-template-columns: 1fr; }
  .bs-stage { height: 56vh; height: 56svh; min-height: 340px; }
  .bs-stage-head { top: 16px; left: 16px; }
  .bs-title { font-size: 30px; }
  .bs-stage-tools { top: 14px; right: 12px; }
  .bs-stage-tools button { padding: 7px 10px; font-size: 11px; }
  .bs-views { bottom: 14px; }
  .bs-views button { padding: 8px 11px; font-size: 11px; }
  .bs-hint { bottom: 64px; font-size: 11px; }
  .bs-panel { border-left: 0; overflow: visible; }
  .bs-tabs { top: var(--bs-nav, 64px); }
  .bs-pane { padding: 20px 16px 4px; }
  .bs-summary { padding: 18px 16px 28px; }
}

/* custom image: preview of the (cut-out) image before it goes on the boot */
.bs-img-prep { margin-top: 14px; }
.bs-img-prep[hidden], .bs-range[hidden], .bs-note[hidden] { display: none; }
.bs-img-preview {
  border-radius: 8px; border: 1px solid var(--grey-300); padding: 12px; display: flex; justify-content: center;
  background: repeating-conic-gradient(#2a2a2a 0% 25%, #1c1c1c 0% 50%) 50% / 16px 16px;   /* checkerboard = transparent */
}
.bs-img-preview canvas { max-width: 100%; max-height: 190px; display: block; }
.bs-range--inline { margin: 12px 0 0; }

/* ── EMBEDDED ON boot-id.html (section #bi-order) ── */
.bi-studio { scroll-margin-top: var(--bs-nav, 72px); border-top: 1px solid var(--grey-200); border-bottom: 1px solid var(--grey-200); }
.bs-app--embed { height: calc(100vh - var(--bs-nav, 72px)); height: calc(100dvh - var(--bs-nav, 72px)); min-height: 600px; max-height: 940px; padding-top: 0; }
@media (max-width: 900px) {
  .bs-app--embed { height: auto; min-height: 0; max-height: none; }
}

/* ── Boot ID guides strip (boot-id.html, above the FAQ) ── */
.bi-guides { max-width: 1200px; margin: 0 auto; padding: 80px 24px 0; }
.bi-guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.bi-guide { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 10px; background: var(--grey-100); border: 1px solid var(--grey-200); text-decoration: none; transition: border-color .2s, transform .2s; }
.bi-guide:hover { border-color: var(--accent); transform: translateY(-2px); }
.bi-guide b { font: 400 24px/1 var(--font-display); letter-spacing: 1px; color: var(--white); }
.bi-guide span { font-size: 14px; line-height: 1.5; color: var(--grey-500); }
@media (max-width: 800px) { .bi-guides { padding: 56px 16px 0; } .bi-guides-grid { grid-template-columns: 1fr; } }

/* ── PHONES: the transfer editor sits below the boot (moved there by boot-studio.js),
   so it never covers the 3D view you're dragging on ── */
@media (max-width: 900px) {
  .bs-edit.bs-edit--below {
    position: static; width: auto; margin: 0; border-radius: 0; border: 0; border-bottom: 1px solid var(--grey-200);
    box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--grey-100);
    padding: 12px 16px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; align-items: end;
  }
  .bs-edit.bs-edit--below[hidden] { display: none; }
  .bs-edit--below .bs-edit-head { grid-column: 1 / -1; margin-bottom: 2px; }
  .bs-edit--below .bs-edit-head strong { font-size: 20px; }
  .bs-edit--below .bs-range { margin-bottom: 6px; font-size: 11px; }
  .bs-edit--below .bs-edit-ink, .bs-edit--below .bs-edit-actions { margin: 0; gap: 6px; }
  .bs-edit--below .bs-edit-ink[hidden] + .bs-edit-actions { grid-column: 1 / -1; }
  .bs-edit--below .bs-ink { padding: 8px 6px; font-size: 12px; }
  .bs-edit--below .bs-edit-actions button { padding: 8px 4px; font-size: 11px; }
}
