
/* ---- Variables (can be mapped to theme later) ---- */
.slp-classic{ --bg:#ffffff; --arrow-bg:#ffffff; --arrow-ink:#6b7280; --ink:#2b2b2b; --muted:#6b7280; --chip:#f1f2f4; --chip-active:#e7f6f6; --chip-ink:#0ea5a5; --chip-underline:#75d1c8; --border:#e8eaee; --cta:#ff9db1; --cta-ink:#ffffff; --accent:#14b8a6; --shadow:0 12px 36px rgba(0,0,0,.12); }

/* ---- Card container ---- */
.slp-classic{ position:relative; background:var(--bg); border-radius:18px; box-shadow:var(--shadow); padding:14px; color:var(--ink); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial; }
.slp-head{ display:flex; flex-direction:column; align-items:stretch; gap:10px; }

/* Optional banner above/below categories */
.slp-cat-banner{
  width:100%;
  background: var(--banner-bg, transparent);
  color: var(--banner-ink, var(--ink));
  font-family: var(--banner-font, inherit);
  font-size: var(--banner-size, 14px);
  padding: var(--banner-pad-y, 8px) var(--banner-pad-x, 12px);
  border-radius: var(--banner-radius, 12px);
  text-align: var(--banner-align, left);
  line-height:1.25;
  overflow:hidden;
  white-space:nowrap;
}
.slp-cat-banner--above{ margin-bottom:2px; }
.slp-cat-banner--below{ margin-top:-2px; }
.slp-cat-banner a{ color:inherit; text-decoration:underline; }
.slp-cat-banner p{ margin:0; display:inline; }
.slp-cat-banner:empty{ display:none; }
.slp-cat-banner.is-active{ display:block !important; }

/* Auto marquee when text overflows */
.slp-cat-banner.is-marquee{ white-space:nowrap; }
.slp-cat-banner.is-marquee .slp-banner-marquee{
  display:flex;
  flex-wrap:nowrap;
  gap:32px;
  width:max-content;
  will-change:transform;
  animation: slpMarquee var(--marquee-duration, 12s) linear infinite;
}
.slp-cat-banner.is-marquee.pause-hover:hover .slp-banner-marquee{ animation-play-state: paused; }
.slp-cat-banner.is-marquee.is-paused .slp-banner-marquee{ animation-play-state: paused; }
.slp-cat-banner.is-marquee .slp-banner-track{ display:inline-flex; align-items:center; white-space:nowrap; }
@keyframes slpMarquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(calc(-1 * var(--marquee-x, 320px))); }
}


/* Sticky header (Step 1) */
.slp-classic.slp-has-stickyhead{
  /* Remove container padding so sticky header can sit flush at the very top */
  padding:0;
}
.slp-classic.slp-has-stickyhead .slp-head{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--bg);
  margin:0;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--border);
  border-top-left-radius:18px;
  border-top-right-radius:18px;
}
.slp-classic.slp-has-stickyhead .slp-list{
  margin-top:6px;
  border-top:0;
  padding:0 14px;
}
.slp-classic.slp-has-stickyhead .slp-sticky{
  margin:10px 14px 14px;
}

/* Tabs (chips) */
.slp-tabs-wrap{ position:relative; }
.slp-tabs{ display:flex; gap:10px; flex-wrap:nowrap; width:100%; overflow-x:auto; scrollbar-width:none; padding:0 40px 6px; scroll-behavior:smooth; }
.slp-tabs::-webkit-scrollbar{ display:none; }
.slp-tab-arrow{
  position:absolute;
  top:0;
  bottom:6px;
  width:34px;
  border:1px solid var(--border);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  line-height:1;
  background:var(--arrow-bg);
  color:var(--arrow-ink);
  border-radius:999px;
  z-index:5;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.slp-tab-arrow:active{ transform:translateY(1px); }
.slp-tab-arrow.is-hidden{ display:none; }
.slp-tab-prev{ left:0; }
.slp-tab-next{ right:0; }

.slp-tab{ padding:10px 14px; border-radius:999px; background:var(--chip); cursor:pointer; user-select:none; font-weight:600; white-space:nowrap; position:relative; }
.slp-tab.is-active{ background:var(--chip-active); color:var(--chip-ink); }
.slp-tab.is-active:after{ content:''; position:absolute; left:14px; right:14px; bottom:-6px; height:3px; background:var(--chip-underline); border-radius:2px; }

/* Search pill */
.slp-search-wrap{ width:100%; }
.slp-search{ width:100%; max-width:none; border:1px solid var(--border); border-radius:999px; padding:10px 16px; outline:0; background:#fff; }

/* List */
.slp-list{ margin-top:6px; border-top:1px solid var(--border); }
.slp-item{ display:flex; align-items:flex-start; gap:12px; padding:16px 8px; border-bottom:1px solid var(--border); cursor:pointer; border-radius:12px; }
.slp-item:hover{ background:#fafafa; }
.slp-radio{ width:18px; height:18px; border-radius:999px; border:2px solid #cbd5e1; margin-top:3px; flex:0 0 18px; position:relative; }
.slp-item.is-active .slp-radio{ border-color:var(--chip-ink); }
.slp-item.is-active .slp-radio:after{ content:''; position:absolute; inset:3px; background:var(--chip-ink); border-radius:999px; }
.slp-main{ flex:1; min-width:0; }
.slp-title{ font-weight:700; }
.slp-desc{ color:var(--muted); font-size:.92rem; margin-top:2px; }
.slp-meta{ margin-left:auto; text-align:right; min-width:120px; }
.slp-price{ font-weight:700; }
.slp-dur{ color:var(--muted); font-size:.88rem; }

/* Sticky footer */
.slp-sticky{ position:sticky; bottom:0; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; background:#fff; border-radius:12px; border:1px solid var(--border); margin-top:10px; }
.slp-total-val{ font-variant-numeric: tabular-nums; }
.slp-next{ background:var(--cta); color:var(--cta-ink); border:0; border-radius:14px; padding:10px 16px; font-weight:700; }
.slp-next:disabled{ opacity:.6; }

/* Step 2 overlay inside same card */
.slp-step2{ position:absolute; inset:10px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 14px 36px rgba(0,0,0,.16); padding:12px; display:none; overflow:auto; -webkit-overflow-scrolling:touch; }
.slp-step2[aria-hidden="false"]{ display:block; animation:slpIn .18s ease-out; }
@keyframes slpIn{ from{ transform:translateY(8px); opacity:0 } to{ transform:translateY(0); opacity:1 } }

.slp-step2-head{ display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--border); padding-bottom:8px; }
.slp-back{ border:0; background:var(--chip); border-radius:8px; padding:6px 10px; cursor:pointer; }
.slp-picked{ font-weight:700; }
.slp-datebar{ margin:12px 0; }
.slp-times{ display:flex; flex-wrap:wrap; gap:8px; min-height:44px; }
.slp-time{ padding:8px 10px; border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer; }
.slp-time.is-active{ background:var(--chip-active); border-color:var(--chip-underline); }
.slp-step2-actions{ display:flex; justify-content:flex-end; margin-top:10px; }
.slp-confirm{ background:var(--accent); color:#fff; border:0; border-radius:12px; padding:10px 16px; font-weight:700; }
.slp-confirm:disabled{ opacity:.6; }

/* Helpers */
.slp-empty,.slp-loading{ color:var(--muted); padding:8px; }
@media (max-width:680px){
  .slp-search{ width:100%; }
  .slp-item{ padding:14px 8px; }
}

/* Height control
   Steps 2/3/4 are absolutely positioned inside the card. If the card only has
   max-height, it can collapse when Step 1 is hidden, causing the overlays to be
   cut off. Use a fixed height based on the configured CSS variables instead.
*/
.slp-classic{ height: var(--widget-h-desktop, 620px); max-height:none; overflow:auto; }
@media (max-width:680px){ .slp-classic{ height: var(--widget-h-mobile, 540px); } }

/* Tabs active like Salonized */
.slp-tab{ background:var(--chip); border:1px solid transparent; }
.slp-tab.is-active{ background:var(--cta); color:#fff; box-shadow:none; }
.slp-tab.is-active:after{ display:none; }

/* Step2 Salonized header & date pills */
.slp-step2 .slp-titlebar{ font-weight:700; text-align:center; margin:6px 0 8px; }
.slp-dates{ display:flex; gap:8px; overflow-x:auto; padding:6px 2px; scrollbar-width:none; }
.slp-dates::-webkit-scrollbar{ display:none; }
.slp-date-pill{ min-width:64px; text-align:center; border:1px solid var(--border); border-radius:12px; padding:8px 6px; background:#fff; cursor:pointer; }
.slp-date-pill.is-active{ border-color:#fecdd3; background:#fff5f7; color:#e11d48; }
.slp-date-pill .d{ font-weight:700; display:block; }
.slp-times{ display:grid; grid-template-columns: repeat(4,minmax(72px, 1fr)); gap:8px; }
@media (max-width:680px){ .slp-times{ grid-template-columns: repeat(3,minmax(72px, 1fr)); } }

/* Step3 form */
.slp-step3{ position:absolute; inset:10px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 14px 36px rgba(0,0,0,.16); padding:12px; display:none; overflow:auto; -webkit-overflow-scrolling:touch; }
.slp-step3[aria-hidden="false"]{ display:block; animation:slpIn .18s ease-out; }
.slp-form{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.slp-form .full{ grid-column:1 / -1; }
.slp-input{ width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.slp-summary{ border:1px solid var(--border); border-radius:12px; padding:10px; margin-top:6px; }
.slp-actions{ display:flex; justify-content:flex-end; margin-top:10px; }
.slp-book{ background:var(--cta); color:var(--cta-ink); border:0; border-radius:12px; padding:10px 16px; font-weight:700; }

/* -------- Step views (Step2/3/4 replace Step1) -------- */
.slp-classic.slp-view-step2 .slp-head,
.slp-classic.slp-view-step2 .slp-list,
.slp-classic.slp-view-step2 .slp-sticky,
.slp-classic.slp-view-step3 .slp-head,
.slp-classic.slp-view-step3 .slp-list,
.slp-classic.slp-view-step3 .slp-sticky,
.slp-classic.slp-view-step4 .slp-head,
.slp-classic.slp-view-step4 .slp-list,
.slp-classic.slp-view-step4 .slp-sticky{ display:none; }

/* Unified overlay header: back (left) + centered title + close (right) */
.slp-overlay-head{ display:grid; grid-template-columns: 44px 1fr 44px; align-items:center; gap:6px; border-bottom:1px solid var(--border); padding-bottom:10px; margin-bottom:10px; }
.slp-overlay-title{ text-align:center; font-weight:800; }
.slp-back, .slp-back2, .slp-back4{ border:0; background:transparent; font-size:22px; line-height:1; width:44px; height:36px; border-radius:10px; cursor:pointer; color:var(--muted); }
.slp-back:hover, .slp-back2:hover, .slp-back4:hover{ background:#f3f4f6; color:var(--ink); }
.slp-close{ border:0; background:transparent; font-size:24px; line-height:1; width:44px; height:36px; border-radius:10px; cursor:pointer; color:var(--muted); }
.slp-close:hover{ background:#f3f4f6; color:var(--ink); }

/* Picked service line in Step2 */
.slp-step2 .slp-picked{ font-weight:700; margin:0 0 10px; }

/* Step4 */
.slp-step4{ position:absolute; inset:10px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 14px 36px rgba(0,0,0,.16); padding:12px; display:none; overflow:auto; -webkit-overflow-scrolling:touch; }
.slp-step4[aria-hidden="false"]{ display:block; animation:slpIn .18s ease-out; }
.slp-done{ border:1px solid var(--border); border-radius:12px; padding:14px; }

/* -------- Step views (Step2/3/4 replace Step1) -------- */
.slp-classic.slp-view-step2 .slp-head,
.slp-classic.slp-view-step2 .slp-list,
.slp-classic.slp-view-step2 .slp-sticky,
.slp-classic.slp-view-step3 .slp-head,
.slp-classic.slp-view-step3 .slp-list,
.slp-classic.slp-view-step3 .slp-sticky,
.slp-classic.slp-view-step4 .slp-head,
.slp-classic.slp-view-step4 .slp-list,
.slp-classic.slp-view-step4 .slp-sticky{
  display:none;
}

/* Overlay header (back + title + close) */
.slp-overlay-head{
  display:grid;
  grid-template-columns: 44px 1fr 44px;
  align-items:center;
  gap:8px;
  border-bottom:1px solid var(--border);
  padding-bottom:10px;
  margin-bottom:10px;
}
.slp-overlay-title{
  text-align:center;
  font-weight:700;
}
.slp-back,.slp-back2,.slp-back4{
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:22px;
  line-height:1;
  width:44px;
  height:38px;
  border-radius:10px;
  cursor:pointer;
}
.slp-back:hover,.slp-back2:hover,.slp-back4:hover{
  background:rgba(0,0,0,.04);
}
.slp-close{
  justify-self:end;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:26px;
  line-height:1;
  width:44px;
  height:38px;
  border-radius:10px;
  cursor:pointer;
}
.slp-close:hover{ background:rgba(0,0,0,.04); }

/* Step4 success */
.slp-step4{ position:absolute; inset:10px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 14px 36px rgba(0,0,0,.16); padding:12px; display:none; overflow:auto; -webkit-overflow-scrolling:touch; }
.slp-step4[aria-hidden="false"]{ display:block; animation:slpIn .18s ease-out; }
.slp-done{ padding:8px 4px; }

/* Picked summary line in step2 */
.slp-step2 .slp-picked{ font-weight:600; color:var(--muted); margin:0 0 10px; }

