/* ============================================================
   HEXLY — shared extension-UI showcase
   The animated stage (fake site + cursor + extension panel) and
   the hx-* extension component spec (Figma "Hexly CSS" nodes
   549:950 / 428:1605). Used by index.html and account.html.
   Requires home.css tokens (--ease, --mono, --ink, …).
   ============================================================ */

.ax-stage [hidden] { display: none !important; }

/* ---------- Fake site being scanned ---------- */
.fs {
  position: absolute; top: 9%; left: 9%; right: 17%; bottom: 24%;
  background: #fff; border-radius: 14px; box-shadow: var(--card-shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.fs-nav { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #171717; flex-shrink: 0; }
.fs-logo { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, #0088FF, #7C3AED); }
.fs-links { display: flex; gap: 8px; margin-left: 6px; }
.fs-links i { width: 24px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.32); }
.fs-navpill { margin-left: auto; width: 52px; height: 18px; border-radius: 200px; background: #fff; }
.fs-body { flex: 1; display: flex; align-items: flex-start; gap: 7%; padding: 9% 8%; min-height: 0; }
.fs-copy { flex: 1; min-width: 0; }
.fs-h { font-weight: 600; font-size: clamp(18px, 1.9vw, 28px); line-height: 1.15; letter-spacing: -1px; color: #171717; }
.fs-p { margin-top: 8px; font-size: 13px; line-height: 18px; letter-spacing: -0.2px; color: #7A7A7A; max-width: 240px; }
.fs-cta {
  display: inline-block; margin-top: 16px; background: #0088FF; color: #fff;
  border-radius: 200px; padding: 9px 18px;
  font-weight: 500; font-size: 13px; letter-spacing: -0.2px; cursor: default;
}
.fs-art {
  flex: 0 0 36%; max-width: 220px; aspect-ratio: 1; border-radius: 12px;
  background: linear-gradient(120deg, #0088FF 0%, #4F46E5 45%, #FF5100 100%);
}
/* flash ring when something is "found" */
.ax-flash { animation: axflash 0.9s var(--ease); }
@keyframes axflash {
  0% { box-shadow: 0 0 0 0 rgba(0, 136, 255, 0); }
  30% { box-shadow: 0 0 0 4px rgba(0, 136, 255, 0.45); }
  100% { box-shadow: 0 0 0 4px rgba(0, 136, 255, 0); }
}

/* ---------- Extension panel mock (matches real extension UI) ---------- */
.hxp {
  position: absolute; right: 8%; bottom: 7%; width: 300px; max-width: 74%; z-index: 10;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0px 11px 22px 0px rgba(0, 0, 0, 0.3);
}

/* tabs header */
.hx-tabs { display: flex; align-items: flex-start; gap: 8px; padding: 0 8px; border-bottom: 1px solid #F5F5F5; }
.hx-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 32px; padding: 8px; box-sizing: border-box;
  color: #8C8C8C; border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.hx-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.hx-tab-label { display: none; font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: -0.36px; white-space: nowrap; }
.hx-tab.is-active { width: auto; padding: 8px 12px; color: #000; border-bottom-color: #000; }
.hx-tab.is-active .hx-tab-label { display: block; }

/* panes */
.hx-body { position: relative; height: 322px; }
.hx-pane {
  position: absolute; inset: 0; padding: 16px 12px 12px;
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.hx-pane.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* toolbar */
.hx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hx-found { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hx-logo { width: 24px; height: 24px; flex-shrink: 0; }
.hx-found-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-found-txt strong { font-weight: 500; font-size: 12px; line-height: 12px; letter-spacing: -0.19px; color: #171717; white-space: nowrap; }
.hx-found-txt em { font-style: normal; font-weight: 400; font-size: 10px; line-height: 12px; letter-spacing: -0.06px; color: #7A7A7A; }
.hx-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  background: #fff; border: 1px solid #E4E4E4; border-radius: 200px;
  padding: 6px 8px 6px 12px; box-sizing: border-box;
  font-weight: 500; font-size: 12px; line-height: 12px; letter-spacing: -0.07px; color: #171717;
  transition: transform 0.15s var(--ease);
}
.hx-btn svg { width: 12px; height: 12px; color: #8C8C8C; flex-shrink: 0; }
.hx-btn--icon { width: 24px; height: 24px; padding: 5px; }
.hx-btn--icon svg { width: 14px; height: 14px; color: #171717; }

/* swatch list — 50/50 color:details split per node */
.hx-swl { display: flex; flex-direction: column; gap: 6px; }
.hx-sw { display: flex; align-items: stretch; gap: 4px; background: #F5F5F5; border-radius: 6px; padding: 4px; overflow: hidden; }
.hx-sw-c { flex: 1; min-width: 0; border-radius: 4px; }
.hx-sw-c--line { box-shadow: inset 0 0 0 1px #ECECEC; }
.hx-sw-d { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 6px 4px 4px; box-sizing: border-box; }
.hx-sw-hex { display: flex; align-items: center; gap: 4px; font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: -0.07px; color: #171717; white-space: nowrap; }
.hx-sw-hex svg { width: 14px; height: 14px; color: #8C8C8C; flex-shrink: 0; }
.hx-sw-use { font-weight: 400; font-size: 10px; line-height: 12px; letter-spacing: -0.06px; color: #7A7A7A; white-space: nowrap; }

/* swatch stagger on pane activation */
.hx-pane .hx-sw { opacity: 0; transform: translateY(6px); }
.hx-pane.is-active .hx-sw { animation: hxRowIn 0.45s var(--ease) forwards; }
.hx-pane.is-active .hx-sw:nth-child(1) { animation-delay: 0.05s; }
.hx-pane.is-active .hx-sw:nth-child(2) { animation-delay: 0.11s; }
.hx-pane.is-active .hx-sw:nth-child(3) { animation-delay: 0.17s; }
.hx-pane.is-active .hx-sw:nth-child(4) { animation-delay: 0.23s; }
.hx-pane.is-active .hx-sw:nth-child(5) { animation-delay: 0.29s; }
@keyframes hxRowIn { to { opacity: 1; transform: none; } }

/* typography pane — font card at extension scale */
.hx-fc { display: flex; flex-direction: column; gap: 8px; border: 1px solid #E4E4E4; border-radius: 12px; padding: 10px; }
.hx-fc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hx-fname { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; line-height: 16px; letter-spacing: -0.2px; color: #171717; }
.hx-fname--mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.hx-badge {
  font-style: normal; font-weight: 500; font-size: 10px; line-height: 14px; letter-spacing: -0.06px;
  color: #fff; background: #1FA05C; border-radius: 200px; padding: 1px 7px;
}
.hx-fc-prev {
  border: 1px solid #ECECEC; border-radius: 6px; padding: 8px 10px;
  font-weight: 400; font-size: 20px; line-height: 26px; letter-spacing: -0.4px; color: #171717;
  text-align: center; white-space: nowrap; overflow: hidden;
}
.hx-fmin {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #E4E4E4; border-radius: 12px; padding: 9px 12px; color: #8C8C8C;
}
.hx-fmin svg { width: 12px; height: 12px; }

/* assets pane — thumbnail grid at extension scale (tile spec: Figma 557:1083) */
.hx-ag { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; }
.hx-at {
  position: relative; border-radius: 8px; overflow: hidden; background: #F5F5F5;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  transition: transform 0.15s var(--ease);
}
.hx-at .athumb { position: absolute; inset: 0; width: 100%; height: 100%; }

/* hover overlay: darkened scrim, filename + size under a top gradient,
   copy/download actions over a bottom gradient (Figma 557:1097) */
.at-ov {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0; transition: opacity 0.2s var(--ease);
}
.hx-at:hover .at-ov, .atile:hover .at-ov { opacity: 1; }
.at-meta {
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
  padding: 10px 8px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));
  color: #fff; text-align: left;
}
.at-meta b { font-weight: 400; font-size: 12px; line-height: 12px; letter-spacing: -0.36px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-meta i { font-style: normal; font-weight: 400; font-size: 10px; line-height: 10px; letter-spacing: -0.3px; }
.at-acts {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
  color: #fff;
}
.at-acts svg { width: 14px; height: 14px; flex-shrink: 0; }

/* extension-panel scale: tighter type + icons on the small tiles */
.hx-ag .at-meta { gap: 3px; padding: 6px 6px 10px; }
.hx-ag .at-meta b { font-size: 9.5px; line-height: 10px; letter-spacing: -0.2px; }
.hx-ag .at-meta i { font-size: 8.5px; line-height: 9px; letter-spacing: -0.17px; }
.hx-ag .at-acts { gap: 6px; padding: 6px; }
.hx-ag .at-acts svg { width: 11px; height: 11px; }
/* tile stagger on pane activation */
.hx-pane .hx-at { opacity: 0; transform: translateY(6px); }
.hx-pane.is-active .hx-at { animation: hxRowIn 0.45s var(--ease) forwards; animation-delay: calc(0.05s + var(--i, 0) * 0.05s); }

/* inspect pane */
.hx-exit { display: flex; align-items: center; gap: 4px; }
.hx-exit span { font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: -0.07px; color: #972525; }
.hx-esc {
  display: inline-flex; align-items: center; height: 16px; padding: 0 4px 1px; box-sizing: border-box;
  background: #F5F5F5; border-radius: 4px;
  font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: -0.07px; color: #8C8C8C;
}
.hx-el { display: flex; flex-direction: column; background: #F5F5F5; border-radius: 12px; padding: 12px; }
.hx-el-kind { font-weight: 400; font-size: 10px; line-height: 12px; letter-spacing: -0.16px; color: #8C8C8C; }
.hx-el-name { font-weight: 600; font-size: 16px; line-height: 24px; letter-spacing: -0.26px; color: #171717; }
.hx-card { border: 1px solid #E4E4E4; border-radius: 8px; overflow: hidden; }
.hx-card-h {
  display: flex; align-items: center; justify-content: space-between;
  background: #F5F5F5; padding: 8px 8px 8px 12px;
}
.hx-card-h b { font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: -0.07px; color: #171717; }
.hx-card-copy { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; font-size: 10px; line-height: 12px; letter-spacing: -0.06px; color: #8C8C8C; }
.hx-card-copy svg { width: 12px; height: 12px; }
.hx-props { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.hx-props--flush { padding: 0; }
.hx-prop { display: flex; align-items: center; font-size: 11px; line-height: 16px; letter-spacing: -0.07px; }
.hx-prop span { flex: 1; min-width: 0; font-weight: 400; color: #7A7A7A; }
.hx-prop b { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: #171717; }
.hx-prop .minibox { width: 12px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); flex-shrink: 0; }

.ax-press { transform: scale(0.94); }

/* ---------- Copy-format dropdown ---------- */
.ax-menu {
  position: absolute; top: 72px; right: 12px; z-index: 12;
  display: flex; flex-direction: column; min-width: 150px;
  background: #fff; border: 1.25px solid var(--line); border-radius: 12px;
  box-shadow: var(--card-shadow); padding: 5px; overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right;
  pointer-events: none; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.ax-menu.is-open { opacity: 1; transform: none; }
.ax-mi {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 8px; padding: 8px 10px; text-align: left;
  font-weight: 500; font-size: 13px; letter-spacing: -0.2px; color: var(--dark-2);
}
.ax-mi em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.ax-mi.is-hover { background: var(--line-lighter); }

/* ---------- Toast ---------- */
.ax-toast {
  position: absolute; right: 8%; bottom: 7%; transform: translateY(-6px); z-index: 20;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: #fff; border-radius: 200px; padding: 8px 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0;
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.ax-toast.is-on { opacity: 1; transform: translateY(-14px); }
.ax-toast .ic14 { color: #35D07F; }
.ax-toast i { width: 11px; height: 11px; border-radius: 3px; display: none; }
.ax-toast.has-sw i { display: inline-block; }

/* ---------- Cursor ---------- */
.ax-cursor {
  position: absolute; left: 0; top: 0; width: 21px; z-index: 30; pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 1s var(--ease);
  will-change: transform;
}

/* ---------- Eyedropper loupe ---------- */
.ax-loupe {
  position: absolute; left: 0; top: 0; z-index: 28; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; transition: transform 1s var(--ease), opacity 0.3s var(--ease);
  will-change: transform;
}
.ax-loupe.is-on { opacity: 1; }
.lp-ring {
  width: 62px; height: 62px; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  background: #FF5100; display: flex; align-items: center; justify-content: center;
  transition: background 0.4s var(--ease);
}
.lp-box { width: 15px; height: 15px; border: 2.5px solid #fff; border-radius: 5px; }
.lp-hex {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border-radius: 200px; padding: 5px 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  font-weight: 600; font-size: 13px; letter-spacing: -0.2px; color: #171717;
}
.lp-hex i { width: 13px; height: 13px; border-radius: 4px; background: #FF5100; transition: background 0.4s var(--ease); }

/* ---------- Inspect overlay ---------- */
.ax-ins {
  position: absolute; z-index: 26; border: 2px dashed var(--ink); pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease), left 0.55s var(--ease), top 0.55s var(--ease),
              width 0.55s var(--ease), height 0.55s var(--ease);
}
.ax-ins.is-on { opacity: 1; }
.ax-ins .fs-chip {
  position: absolute; top: -8px; right: 0; transform: translateY(-100%);
  font-family: var(--mono); font-size: 10px; line-height: 12px;
  color: var(--line-lighter); background: var(--ink); border-radius: 4px; padding: 4px 6px;
  white-space: nowrap;
}
