/* ============================================================
   Hair Color Try-On — styles (scoped under .hct-app)
   Edit the tokens below to match your salon brand.
   ============================================================ */
.hct-app {
  --hct-bg:      #FBFAF8;
  --hct-surface: #FFFFFF;
  --hct-ink:     #1A1614;
  --hct-muted:   #8A817B;
  --hct-line:    #ECE7E2;
  --hct-primary: #4A2340;
  --hct-accent:  #B08D57;
  --hct-radius:  16px;
  --hct-shadow:  0 6px 24px rgba(26,22,20,.10);
  --hct-display: "Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;

  max-width: 480px;
  margin: 0 auto;
  padding: 8px 4px 24px;
  color: var(--hct-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hct-app *, .hct-app *::before, .hct-app *::after { box-sizing: border-box; }

.hct-head { text-align: center; margin-bottom: 18px; }
.hct-eyebrow {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--hct-accent); font-weight: 600; margin: 0 0 6px;
}
.hct-title { font-family: var(--hct-display); font-weight: 500; font-size: 28px; line-height: 1.1; margin: 0; }
.hct-sub   { color: var(--hct-muted); font-size: 14px; margin: 8px 0 0; }

.hct-stage {
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  background: var(--hct-surface); border: 1px solid var(--hct-line);
  border-radius: var(--hct-radius); overflow: hidden; box-shadow: var(--hct-shadow);
  display: flex; align-items: center; justify-content: center;
}
.hct-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#hctResult { z-index: 2; } #hctOriginal { z-index: 1; }

.hct-placeholder { text-align: center; padding: 24px; color: var(--hct-muted); z-index: 3; }
.hct-placeholder svg { width: 44px; height: 44px; opacity: .5; margin-bottom: 10px; }
.hct-placeholder strong { display: block; color: var(--hct-ink); font-weight: 600; margin-bottom: 4px; }

.hct-handle {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15); z-index: 4; left: 50%;
  display: none; touch-action: none; cursor: ew-resize;
}
.hct-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; transform: translate(-50%,-50%);
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%234A2340' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 5 3 10l4 5M13 5l4 5-4 5'/%3E%3C/svg%3E") no-repeat center;
  border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hct-stage.has-image .hct-handle { display: block; }

.hct-badge {
  position: absolute; bottom: 10px; z-index: 5; font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: rgba(26,22,20,.55); padding: 4px 8px; border-radius: 999px; display: none;
}
.hct-stage.has-image .hct-badge { display: block; }
.hct-before { left: 10px; } .hct-after { right: 10px; }

.hct-veil {
  position: absolute; inset: 0; z-index: 6; background: rgba(251,250,248,.92);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--hct-muted); font-size: 13px;
}
.hct-veil.show { display: flex; }
.hct-spinner {
  width: 26px; height: 26px; border: 3px solid var(--hct-line);
  border-top-color: var(--hct-primary); border-radius: 50%; animation: hct-spin .8s linear infinite;
}
@keyframes hct-spin { to { transform: rotate(360deg); } }

.hct-section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--hct-muted);
  margin: 22px 2px 10px; text-transform: uppercase;
}
.hct-swatches {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.hct-swatch {
  flex: 0 0 auto; scroll-snap-align: start; width: 54px; text-align: center;
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
}
.hct-swatch .hct-dot {
  display: block; width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 5px;
  border: 2px solid transparent; box-shadow: inset 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.hct-swatch[aria-pressed="true"] .hct-dot { border-color: var(--hct-accent); transform: scale(1.06); }
.hct-swatch .hct-name { font-size: 10px; color: var(--hct-muted); line-height: 1.2; }

.hct-controls { margin-top: 18px; }
.hct-slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hct-slider-row label { font-size: 12px; color: var(--hct-muted); min-width: 62px; }
.hct-slider-row input[type="range"] { flex: 1; accent-color: var(--hct-primary); height: 22px; }

.hct-btn {
  appearance: none; border: none; border-radius: 12px; font-family: inherit;
  font-size: 15px; font-weight: 600; padding: 14px 16px; cursor: pointer; width: 100%;
  transition: opacity .15s ease, transform .05s ease;
}
.hct-btn:active { transform: scale(.99); }
.hct-btn-primary { background: var(--hct-primary); color: #fff; }
.hct-btn-ghost { background: var(--hct-surface); color: var(--hct-ink); border: 1px solid var(--hct-line); }
.hct-btn:disabled { opacity: .45; cursor: default; }
.hct-btn-row { display: flex; gap: 10px; margin-top: 10px; }
.hct-btn-row .hct-btn { width: auto; flex: 1; }

.hct-privacy {
  margin-top: 22px; font-size: 11.5px; color: var(--hct-muted); text-align: center;
  line-height: 1.6; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.hct-privacy svg { width: 13px; height: 13px; flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .hct-spinner { animation-duration: 1.6s; }
  .hct-swatch .hct-dot { transition: none; }
}
