/* LeoScorpioLeo avatar — creator (My Account, white panel) + product-page view (dark page).
   SOP palette: #0B2A3C text, #4C6875 muted, #C9A24A accent fill. */

/* ---------- Profile → Avatar button ---------- */
.lsl-avatar-link-row { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(138, 143, 120, .35); }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content a.lsl-avatar-link {
  text-decoration: none;
  font-size: .85rem;
  padding: 6px 16px;
}

/* ---------- Creator ---------- */
.lsl-avc { container-type: inline-size; }
.lsl-avc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.lsl-avc-grid > * { min-width: 0; }
.lsl-avc-panel, .lsl-avc-controls, .lsl-avc-ctl { min-width: 0; max-width: 100%; box-sizing: border-box; }
.lsl-avc-ctl--slider input[type="range"] { display: block; box-sizing: border-box; max-width: 100%; margin: 0; }
/* narrow panel: stack the controls under the picture rather than squeezing them */
@container (max-width: 440px) { .lsl-avc-grid { grid-template-columns: 1fr; } .lsl-avc-stage { position: static; max-width: 420px; margin: 0 auto; width: 100%; } }
@media (max-width: 720px) { .lsl-avc-grid { grid-template-columns: 1fr; } }
.lsl-avc-stage { position: sticky; top: 12px; }
.lsl-avc-preview {
  background: #A9D2EC;
  border: 1px solid rgba(138, 143, 120, .4);
  border-radius: 10px;
  overflow: hidden;
}
.lsl-avc-preview svg { display: block; width: 100%; max-height: 860px; height: auto; }
.lsl-avc-stage-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

.lsl-avc-tabs { display: flex; border: 2px solid #0B2A3C; border-radius: 999px; overflow: hidden; margin-bottom: 14px; max-width: 100%; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-tab {
  flex: 1;
  background: #fff !important;
  color: #0B2A3C !important;
  border: 0 !important;
  border-radius: 0;
  padding: 8px 2px;
  min-width: 0;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-tab.is-active {
  background: #0B2A3C !important;
  color: #fff !important;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-tab:not(.is-active):hover { background: #C9A24A !important; }

.lsl-avc-ctl { margin-bottom: 16px; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 6px;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-value { color: #4C6875 !important; font-weight: 600; }
.lsl-avc-ctl--slider input[type="range"] { width: 100%; accent-color: #0B2A3C; height: 22px; background: transparent !important; border: 0 !important; padding: 0; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-ends { display: flex; justify-content: space-between; font-size: .75rem; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-ends span { color: #4C6875 !important; }

.lsl-avc-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.lsl-avc-choices--eyes { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: #fff !important;
  color: #0B2A3C !important;
  border: 2px solid rgba(138, 143, 120, .45) !important;
  border-radius: 12px;
  padding: 0 !important;
  overflow: hidden;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  transition: border-color .12s, transform .12s;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-choice:hover { border-color: #0B2A3C !important; transform: translateY(-1px); }
.lsl-avc-pic { display: block; background: linear-gradient(#DCEBF4, #F4F8EF); }
.lsl-avc-pic svg { display: block; width: 100%; height: auto; }
.lsl-avc-choices--head .lsl-avc-pic svg { aspect-ratio: 210 / 220; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-cap {
  display: block;
  padding: 5px 4px 6px;
  text-align: center;
  color: #0B2A3C !important;
  border-top: 1px solid rgba(138, 143, 120, .3);
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-choice.is-selected {
  border-color: #0B2A3C !important;
  box-shadow: 0 0 0 2px #C9A24A;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-choice.is-selected .lsl-avc-cap { background: #C9A24A !important; }

/* Hair style groups */
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-group {
  margin: 10px 0 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4C6875 !important;
}

/* Bald tick box at the short end of the hair-length slider */
.lsl-avc-baldrow { display: flex; align-items: flex-start; gap: 12px; }
.lsl-avc-sliderbox { flex: 1; min-width: 0; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-bald {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: none;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
}
.lsl-avc-box {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid #0B2A3C;
  border-radius: 3px;
  background: #fff;
}
.lsl-avc-box svg { display: block; width: 100%; height: 100%; }
.lsl-avc-box path { fill: none; stroke: #0B2A3C; stroke-width: 2.6; stroke-linecap: round; opacity: 0; }
.lsl-avc-bald.is-on .lsl-avc-box path { opacity: 1; }
.lsl-avc-bald:hover .lsl-avc-box, .lsl-avc-bald:focus-visible .lsl-avc-box { box-shadow: 0 0 0 3px #C9A24A; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-bald-cap { font-size: .75rem; font-weight: 700; color: #0B2A3C !important; line-height: 1; }

/* While bald, hair style / length / color stay pickable but visibly have no effect */
.lsl-avc-controls.is-bald .lsl-avc-dimmable .lsl-avc-choices,
.lsl-avc-controls.is-bald .lsl-avc-dimmable .lsl-avc-group,
.lsl-avc-controls.is-bald .lsl-avc-dimmable .lsl-avc-swatches,
.lsl-avc-controls.is-bald .lsl-avc-sliderbox { opacity: .4; }
.lsl-avc-baldnote { display: none; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-controls.is-bald .lsl-avc-baldnote {
  display: block;
  margin: 0 0 6px;
  font-size: .8rem;
  color: #0B2A3C !important;
  background: #F1FFE0;
  border-left: 3px solid #C9A24A;
  padding: 4px 8px;
}

/* Height readout: click to flip cm ↔ ft/in (also clickable on the preview ruler). */
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-units {
  background: transparent !important;
  color: #0B2A3C !important;
  border: 0 !important;
  border-bottom: 2px dotted #C9A24A !important;
  border-radius: 0;
  padding: 0 2px !important;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-units:hover { background: #C9A24A !important; }
.lsl-av-height:focus { outline: none; }
.lsl-av-height:focus rect, .lsl-av-height:hover rect { stroke: #C9A24A; stroke-width: 3; }

.lsl-avc-swatches { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(138, 143, 120, .6) !important;
  cursor: pointer;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-swatch.is-selected {
  border-color: #0B2A3C !important;
  box-shadow: 0 0 0 3px #C9A24A;
}
body.woocommerce-account #av-primary-content .woocommerce .woocommerce-MyAccount-content .lsl-avc-custom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.lsl-avc-custom input[type="color"] { width: 30px; height: 30px; padding: 0 !important; border-radius: 50%; border: 2px solid #4C6875 !important; background: none !important; cursor: pointer; }

.lsl-avc-save { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(138, 143, 120, .35); }
.lsl-avc-save .lsl-avc-back { font-size: .9rem; }

/* ---------- Product page ---------- */
.lsl-avp-toggle {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  border: 2px solid #C9A24A;
  border-radius: 999px;
  overflow: hidden;
}
.lsl-avp-toggle button {
  background: transparent !important;
  color: #0E2733 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 8px 18px !important;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: none !important;
}
.lsl-avp-toggle button.is-active { background: #C9A24A !important; color: #0B2A3C !important; }
.lsl-avp-panel {
  background: linear-gradient(#EAF4F6, #FFFFFF 70%);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 24px;
  text-align: center;
}
.lsl-avp-stage svg { display: block; width: 100%; max-height: 640px; height: auto; margin: 0 auto; }
.lsl-avp-panel .lsl-avp-caption { color: #0B2A3C !important; font-weight: 600; margin: 6px 0 2px; }
.lsl-avp-panel a.lsl-avp-edit { color: #0B2A3C !important; font-size: .85rem; text-decoration: underline; text-decoration-color: #C9A24A; text-decoration-thickness: 2px; }
.lsl-avp-cta { margin: 0 0 10px; }
.lsl-avp-cta a { color: #C9A24A !important; font-weight: 700; }

/* ---------- Avatar page layout: no sidebar, wide menu, picture pinned while the options scroll ---------- */
body.lsl-avatar-page #av-secondary-content,
body.lsl-avatar-page .av-secondary-content { display: none !important; }
body.lsl-avatar-page #av-primary-content { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
body.lsl-avatar-page .lsl-avc-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr); gap: 24px; }
body.lsl-avatar-page .lsl-avc-stage { position: sticky; top: 12px; z-index: 5; align-self: start; }
body.lsl-avatar-page.admin-bar .lsl-avc-stage { top: 44px; }
body.lsl-avatar-page .lsl-avc-preview svg { max-height: calc(100vh - 110px); margin: 0 auto; }
body.lsl-avatar-page.admin-bar .lsl-avc-preview svg { max-height: calc(100vh - 142px); }

/* Narrow screens: the picture rides along at the top of the screen and the options scroll up underneath it */
@container (max-width: 560px) {
  body.lsl-avatar-page .lsl-avc-grid { grid-template-columns: 1fr; gap: 12px; }
  body.lsl-avatar-page .lsl-avc-stage { position: sticky; top: 0; max-width: none; margin: 0; padding: 6px 0 8px; background: #fff; box-shadow: 0 10px 12px -10px rgba(27, 42, 23, .35); }
  body.lsl-avatar-page .lsl-avc-preview { display: flex; justify-content: center; }
  body.lsl-avatar-page .lsl-avc-preview svg { width: auto; max-width: 100%; height: 40vh; max-height: 40vh; }
  body.lsl-avatar-page .lsl-avc-stage-actions { margin-top: 6px; }
}
@media (max-width: 720px) {
  body.lsl-avatar-page .lsl-avc-grid { grid-template-columns: 1fr; gap: 12px; }
  body.lsl-avatar-page .lsl-avc-stage { position: sticky; top: 0; max-width: none; margin: 0; padding: 6px 0 8px; background: #fff; box-shadow: 0 10px 12px -10px rgba(27, 42, 23, .35); }
  body.lsl-avatar-page .lsl-avc-preview { display: flex; justify-content: center; }
  body.lsl-avatar-page .lsl-avc-preview svg { width: auto; max-width: 100%; height: 40vh; max-height: 40vh; }
  body.lsl-avatar-page .lsl-avc-stage-actions { margin-top: 6px; }
}
@media (min-width: 601px) and (max-width: 782px) {
  body.lsl-avatar-page.admin-bar .lsl-avc-stage { top: 46px; }
}
