/* =================================================================
   WOO SALON PRO — PREMIUM BOOKING WIDGET
   All selectors scoped under #wssp-bk to beat WordPress theme styles.
   ================================================================= */

/* ── Tokens ─────────────────────────────────────────────────────── */
#wssp-bk {
    --bk-purple:  #7c3aed;
    --bk-purple2: #6d28d9;
    --bk-tint:    #ede9fe;
    --bk-tint2:   #f5f3ff;
    --bk-border:  #e5e7eb;
    --bk-bg:      #f9fafb;
    --bk-white:   #ffffff;
    --bk-text:    #111827;
    --bk-muted:   #6b7280;
    --bk-r:       12px;
    --bk-r-sm:    8px;
    --bk-font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nav-w:      200px;
    --topbar-h:   58px;
}

/* ── Hard reset — override every possible theme rule ── */
#wssp-bk,
#wssp-bk * {
    box-sizing: border-box;
    font-family: var(--bk-font);
}
#wssp-bk ul,
#wssp-bk ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
#wssp-bk li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
#wssp-bk li::before,
#wssp-bk li::marker { display: none !important; content: none !important; }
#wssp-bk h1, #wssp-bk h2, #wssp-bk h3,
#wssp-bk h4, #wssp-bk h5, #wssp-bk h6 {
    margin: 0; padding: 0;
    font-weight: 700; line-height: 1.3;
}
#wssp-bk p { margin: 0; padding: 0; }
#wssp-bk button {
    font-family: var(--bk-font);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0; margin: 0;
    text-align: left;
    line-height: 1;
}
#wssp-bk input,
#wssp-bk select,
#wssp-bk textarea {
    font-family: var(--bk-font);
    font-size: 14px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}
#wssp-bk a { text-decoration: none; color: inherit; }
#wssp-bk svg { display: block; }
#wssp-bk img { display: block; max-width: 100%; }
/* Kill WordPress floats and margins on the container */
#wssp-bk::before, #wssp-bk::after { display: none; }

/* ── Outer wrapper ───────────────────────────────────────────────── */
#wssp-bk {
    display: block;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    border-radius: var(--bk-r);
    border: 1px solid var(--bk-border);
    box-shadow: 0 4px 32px rgba(124,58,237,.10), 0 1px 6px rgba(0,0,0,.06);
    background: var(--bk-white);
    overflow: hidden;
    color: var(--bk-text);
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

/* ── Panes ────────────────────────────────────────────────────────
   Visibility controlled ONLY via JS inline style.
   When JS sets display:flex, this provides the flex layout.
   ─────────────────────────────────────────────────────────────── */
#wssp-bk .bk-pane {
    flex-direction: column;
    width: 100%;
    background: var(--bk-white);
    /* height is set per pane below */
}
#wssp-bk .bk-pane-main {
    height: 600px;
    max-height: 600px;
    overflow: hidden;
}
#wssp-bk .bk-pane-form {
    height: 600px;
    max-height: 600px;
    overflow: hidden;
}

/* ═════════════════════════════════════════════════════════════════
   TOP BAR
═════════════════════════════════════════════════════════════════ */
#wssp-bk .bk-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    padding: 0 20px;
    background: var(--bk-white);
    border-bottom: 2px solid var(--bk-border);
    flex-shrink: 0;
}
#wssp-bk .bk-topbar-left {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1;
}
#wssp-bk .bk-salon-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--bk-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,.2);
    flex-shrink: 0;
}
#wssp-bk .bk-salon-name {
    font-size: 15px; font-weight: 800; letter-spacing: -.2px;
    color: var(--bk-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}
#wssp-bk .bk-salon-hours {
    font-size: 11px; color: var(--bk-muted); margin-top: 2px;
    white-space: nowrap;
}
#wssp-bk .bk-cart-chip {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    background: var(--bk-purple) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 40px !important;
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 3px 14px rgba(124,58,237,.35);
    transition: background .17s, transform .1s;
    line-height: 1;
}
#wssp-bk .bk-cart-chip:hover { background: var(--bk-purple2) !important; }
#wssp-bk .bk-cart-chip:active { transform: scale(.97); }
#wssp-bk .bk-cart-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
#wssp-bk .bk-chip-divider { width: 1px; height: 13px; background: rgba(255,255,255,.3); }
#wssp-bk .bk-chip-price { font-weight: 800; }
#wssp-bk .bk-chip-arrow { font-size: 12px; opacity: .8; }

/* ═════════════════════════════════════════════════════════════════
   STEP 1: TWO-COLUMN BROWSER
═════════════════════════════════════════════════════════════════ */
#wssp-bk .bk-browser {
    display: flex !important;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: calc(600px - var(--topbar-h));
}

/* ── Left sidebar nav ── */
#wssp-bk .bk-sidenav {
    width: var(--nav-w);
    min-width: var(--nav-w);
    display: flex !important;
    flex-direction: column;
    background: var(--bk-bg);
    border-right: 1px solid var(--bk-border);
    overflow: hidden;
    flex-shrink: 0;
}
#wssp-bk .bk-sidenav-search {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid var(--bk-border);
    flex-shrink: 0;
}
#wssp-bk .bk-sidenav-search > svg {
    position: absolute;
    left: 18px; top: 50%; transform: translateY(-52%);
    width: 13px; height: 13px; color: var(--bk-muted);
    pointer-events: none;
}
#wssp-bk .bk-sidenav-search input {
    display: block;
    width: 100%;
    padding: 8px 8px 8px 28px;
    border: 1.5px solid var(--bk-border) !important;
    border-radius: var(--bk-r-sm) !important;
    font-size: 12.5px;
    background: var(--bk-white);
    color: var(--bk-text);
    outline: none !important;
    box-shadow: none !important;
}
#wssp-bk .bk-sidenav-search input:focus {
    border-color: var(--bk-purple) !important;
}
#wssp-bk .bk-sidenav-search input::placeholder { color: #adb5bd; }

#wssp-bk .bk-sidenav-list {
    display: flex !important;
    flex-direction: column;
    list-style: none !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow-y: auto;
    flex: 1;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--bk-border) transparent;
}
#wssp-bk .bk-sidenav-list::-webkit-scrollbar { width: 4px; }
#wssp-bk .bk-sidenav-list::-webkit-scrollbar-thumb { background: var(--bk-border); border-radius: 4px; }
#wssp-bk .bk-sidenav-list li {
    display: block !important;
    list-style: none !important;
    margin: 0 !important; padding: 0 !important;
}

#wssp-bk .bk-sidenav-item {
    display: flex !important;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 10px;
    border: none !important;
    border-radius: var(--bk-r-sm) !important;
    background: transparent !important;
    font-size: 13px; font-weight: 600;
    color: var(--bk-muted) !important;
    cursor: pointer;
    text-align: left;
    transition: background .13s, color .13s;
    position: relative;
    line-height: 1.3;
}
#wssp-bk .bk-sidenav-item:hover {
    background: var(--bk-white) !important;
    color: var(--bk-text) !important;
}
#wssp-bk .bk-sidenav-item.is-active {
    background: var(--bk-white) !important;
    color: var(--bk-purple) !important;
    box-shadow: 0 1px 5px rgba(124,58,237,.09) !important;
}
#wssp-bk .bk-sidenav-item.is-active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px; border-radius: 3px;
    background: var(--bk-purple);
}
#wssp-bk .bk-sidenav-ico { font-size: 15px; line-height: 1; flex-shrink: 0; }
#wssp-bk .bk-sidenav-lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#wssp-bk .bk-sidenav-badge {
    min-width: 18px; height: 18px;
    background: var(--bk-purple); color: #fff;
    font-size: 10px; font-weight: 800;
    border-radius: 18px; padding: 0 5px;
    display: flex; align-items: center; justify-content: center;
}

/* ── Right panel area ── */
#wssp-bk .bk-service-area {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
}
#wssp-bk .bk-cat-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bk-border) transparent;
}
#wssp-bk .bk-cat-panel::-webkit-scrollbar { width: 4px; }
#wssp-bk .bk-cat-panel::-webkit-scrollbar-thumb { background: var(--bk-border); border-radius: 4px; }
#wssp-bk .bk-cat-panel.is-active { display: flex; }

/* Panel header */
#wssp-bk .bk-cat-title {
    display: flex !important;
    align-items: center;
    gap: 9px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--bk-border);
    position: sticky; top: 0;
    background: var(--bk-white); z-index: 2;
    flex-shrink: 0;
}
#wssp-bk .bk-cat-title > span:first-child { font-size: 18px; flex-shrink: 0; }
#wssp-bk .bk-cat-title h2 {
    font-size: 16px; font-weight: 800; margin: 0; flex: 1;
    letter-spacing: -.2px; color: var(--bk-text);
}
#wssp-bk .bk-cat-count {
    font-size: 11px; color: var(--bk-muted);
    background: var(--bk-bg); border: 1px solid var(--bk-border);
    border-radius: 20px; padding: 2px 9px; font-weight: 600;
    flex-shrink: 0;
}

/* ── Service row ── */
#wssp-bk .bk-svc-row {
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    padding: 14px 20px;
    border: none !important;
    border-bottom: 1px solid var(--bk-border) !important;
    cursor: pointer;
    transition: background .12s;
    position: relative;
    user-select: none;
    background: var(--bk-white) !important;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}
#wssp-bk .bk-svc-row:last-child { border-bottom: none !important; }
#wssp-bk .bk-svc-row:hover { background: var(--bk-tint2) !important; }
#wssp-bk .bk-svc-row.is-selected { background: var(--bk-tint) !important; }
#wssp-bk .bk-svc-row.is-selected::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--bk-purple);
}

/* Thumbnail */
#wssp-bk .bk-svc-thumb {
    width: 52px; height: 52px; border-radius: 10px;
    background: var(--bk-tint); overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
#wssp-bk .bk-svc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#wssp-bk .bk-svc-thumb-fallback { font-size: 22px; line-height: 1; }

/* Text */
#wssp-bk .bk-svc-info { flex: 1; min-width: 0; }
#wssp-bk .bk-svc-name {
    font-size: 14px; font-weight: 700; color: var(--bk-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
#wssp-bk .bk-svc-dur { font-size: 12px; color: var(--bk-muted); margin-top: 2px; }
#wssp-bk .bk-svc-price {
    font-size: 14px; font-weight: 800;
    color: var(--bk-text); flex-shrink: 0; white-space: nowrap;
}

/* Check circle */
#wssp-bk .bk-svc-check {
    width: 24px; height: 24px; flex-shrink: 0; color: #d1d5db;
    transition: color .14s;
}
#wssp-bk .bk-svc-check svg { width: 24px; height: 24px; display: block; }
#wssp-bk .bk-svc-row.is-selected .bk-svc-check { color: var(--bk-purple); }
#wssp-bk .bk-check-mark { opacity: 0; transition: opacity .14s; }
#wssp-bk .bk-svc-row.is-selected .bk-check-mark { opacity: 1; }

/* CRITICAL: Hide the real checkbox completely */
#wssp-bk .bk-svc-cb {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important; height: 0 !important;
    pointer-events: none !important;
    margin: 0 !important; padding: 0 !important;
}

/* Empty state */
#wssp-bk .bk-empty {
    padding: 40px 20px; text-align: center;
    color: var(--bk-muted); font-size: 13.5px;
}

/* ═════════════════════════════════════════════════════════════════
   STEPS 2-4: FORM SCREENS
═════════════════════════════════════════════════════════════════ */
#wssp-bk .bk-form-topbar {
    display: flex !important;
    align-items: center; gap: 12px;
    height: var(--topbar-h); min-height: var(--topbar-h);
    padding: 0 20px;
    border-bottom: 2px solid var(--bk-border);
    background: var(--bk-white); flex-shrink: 0;
}
#wssp-bk .bk-back-btn {
    display: flex !important;
    align-items: center; gap: 5px;
    background: none !important; border: none !important;
    font-size: 13.5px; font-weight: 600; color: var(--bk-muted);
    cursor: pointer; padding: 6px 10px; border-radius: var(--bk-r-sm);
    transition: background .14s, color .14s; line-height: 1;
}
#wssp-bk .bk-back-btn svg { width: 18px; height: 18px; }
#wssp-bk .bk-back-btn:hover { background: var(--bk-tint) !important; color: var(--bk-purple) !important; }
#wssp-bk .bk-step-crumb { font-size: 12px; font-weight: 700; color: var(--bk-muted); }

#wssp-bk .bk-form-scroll {
    flex: 1; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--bk-border) transparent;
}
#wssp-bk .bk-form-scroll::-webkit-scrollbar { width: 4px; }
#wssp-bk .bk-form-scroll::-webkit-scrollbar-thumb { background: var(--bk-border); border-radius: 4px; }
#wssp-bk .bk-form-inner { padding: 20px 22px 8px; }

/* Field rows */
#wssp-bk .bk-field-row { margin-bottom: 16px; }
#wssp-bk .bk-field-label {
    display: block; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .6px;
    color: var(--bk-muted); margin-bottom: 7px;
}
#wssp-bk .bk-opt { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
#wssp-bk .bk-field-input {
    display: block !important; width: 100% !important;
    padding: 12px 14px !important;
    border: 1.5px solid var(--bk-border) !important;
    border-radius: var(--bk-r-sm) !important;
    font-size: 14.5px !important;
    color: var(--bk-text) !important; background: var(--bk-white) !important;
    transition: border-color .15s, box-shadow .15s;
    outline: none !important; box-shadow: none !important;
    -webkit-appearance: none !important; appearance: none !important;
    line-height: 1.4;
}
#wssp-bk .bk-field-input:focus {
    border-color: var(--bk-purple) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.1) !important;
}
#wssp-bk .bk-field-input::placeholder { color: #adb5bd; }
#wssp-bk select.bk-field-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
    padding-right: 36px !important; cursor: pointer;
}
#wssp-bk .bk-textarea { resize: vertical; min-height: 62px; line-height: 1.55; }

/* Notice strip */
#wssp-bk .bk-notice {
    display: flex !important; align-items: center; gap: 8px;
    margin-bottom: 20px; padding: 10px 14px;
    background: var(--bk-tint) !important; border-radius: var(--bk-r-sm);
    font-size: 12.5px; font-weight: 600; color: var(--bk-purple);
    border: none !important;
}
#wssp-bk .bk-notice svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Form footer */
#wssp-bk .bk-form-footer {
    padding: 14px 22px 20px;
    border-top: 1px solid var(--bk-border);
    background: var(--bk-white); flex-shrink: 0;
}
#wssp-bk .bk-footer-note {
    margin: 10px 0 0; text-align: center;
    font-size: 12px; color: var(--bk-muted);
}

/* Booking summary card */
#wssp-bk .bk-summary {
    margin-bottom: 20px;
    border: 1.5px solid var(--bk-border) !important;
    border-radius: var(--bk-r-sm); overflow: hidden;
    background: var(--bk-white);
}
#wssp-bk .bk-summary-meta {
    padding: 12px 16px;
    background: var(--bk-tint) !important;
    border-bottom: 1px solid rgba(124,58,237,.15);
}
#wssp-bk .bk-summary-meta-row {
    display: flex !important; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 700; color: var(--bk-purple);
    margin-bottom: 5px;
}
#wssp-bk .bk-summary-meta-row:last-child { margin: 0; }
#wssp-bk .bk-summary-meta-row svg { width: 13px; height: 13px; flex-shrink: 0; }
#wssp-bk .bk-summary-row {
    display: flex !important; justify-content: space-between;
    padding: 10px 16px; font-size: 14px;
    border: none !important; border-bottom: 1px solid var(--bk-border) !important;
    background: var(--bk-white);
}
#wssp-bk .bk-summary-row:last-of-type { border-bottom: none !important; }
#wssp-bk .bk-summary-total {
    display: flex !important; justify-content: space-between;
    padding: 12px 16px; font-size: 15px; font-weight: 800; color: var(--bk-purple);
    background: var(--bk-tint) !important;
    border-top: 1.5px solid rgba(124,58,237,.15);
}

/* ── Buttons ── */
#wssp-bk .bk-btn-primary {
    display: flex !important; align-items: center; justify-content: center;
    gap: 8px; width: 100%; padding: 14px 20px;
    background: var(--bk-purple) !important; color: #fff !important;
    border: none !important; border-radius: 50px !important;
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124,58,237,.28);
    transition: background .17s, transform .1s;
    line-height: 1;
}
#wssp-bk .bk-btn-primary svg { width: 18px; height: 18px; }
#wssp-bk .bk-btn-primary:hover { background: var(--bk-purple2) !important; }
#wssp-bk .bk-btn-primary:active { transform: scale(.98); }
#wssp-bk .bk-btn-confirm {
    display: block !important; width: 100%; padding: 15px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    color: #fff !important; border: none !important; border-radius: 50px !important;
    font-size: 16px; font-weight: 800; cursor: pointer;
    box-shadow: 0 5px 20px rgba(124,58,237,.32);
    transition: opacity .17s, transform .1s;
    line-height: 1; text-align: center;
}
#wssp-bk .bk-btn-confirm:hover { opacity: .9; }
#wssp-bk .bk-btn-confirm:active { transform: scale(.98); }
#wssp-bk .bk-btn-confirm:disabled { opacity: .5; cursor: not-allowed; }
#wssp-bk .bk-btn-ghost {
    display: block !important; width: 100%; padding: 13px;
    background: none !important; border: 1.5px solid var(--bk-border) !important;
    border-radius: 50px !important; color: var(--bk-muted) !important;
    font-size: 14px; font-weight: 600; cursor: pointer; text-align: center;
    transition: border-color .15s, color .15s;
}
#wssp-bk .bk-btn-ghost:hover { border-color: var(--bk-purple) !important; color: var(--bk-purple) !important; }

/* ═════════════════════════════════════════════════════════════════
   SUCCESS SCREEN
═════════════════════════════════════════════════════════════════ */
#wssp-bk .bk-success-pane {
    align-items: center !important;
    justify-content: center !important;
}
#wssp-bk .bk-success-inner {
    text-align: center; padding: 48px 28px; max-width: 360px;
}
#wssp-bk .bk-success-icon {
    width: 72px; height: 72px; margin: 0 auto 20px;
    filter: drop-shadow(0 6px 14px rgba(22,163,74,.3));
}
#wssp-bk .bk-success-icon svg { width: 72px; height: 72px; }
#wssp-bk .bk-success-title { font-size: 24px; font-weight: 900; margin: 0 0 10px !important; letter-spacing: -.3px; }
#wssp-bk .bk-success-body  { font-size: 14.5px; color: var(--bk-muted); line-height: 1.65; margin: 0 0 26px !important; }

/* ═════════════════════════════════════════════════════════════════
   MOBILE  ≤ 640px — sidebar becomes horizontal pill tab bar
═════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    #wssp-bk { border-radius: 0; border-left: none; border-right: none; }
    #wssp-bk .bk-pane-main,
    #wssp-bk .bk-pane-form { height: auto; max-height: none; }
    #wssp-bk .bk-browser { flex-direction: column; overflow: visible; height: auto; }

    /* Sidebar → horizontal pill row */
    #wssp-bk .bk-sidenav {
        width: 100%; min-width: 0;
        flex-direction: row;
        border-right: none; border-bottom: 1px solid var(--bk-border);
        height: auto; overflow: visible;
    }
    #wssp-bk .bk-sidenav-search { display: none; }
    #wssp-bk .bk-sidenav-list {
        flex-direction: row !important;
        padding: 8px 10px !important;
        gap: 6px;
        overflow-x: auto; overflow-y: hidden;
        scrollbar-width: none; flex: 1;
        height: auto;
    }
    #wssp-bk .bk-sidenav-list::-webkit-scrollbar { display: none; }
    #wssp-bk .bk-sidenav-list li { display: block !important; flex-shrink: 0; }
    #wssp-bk .bk-sidenav-item {
        padding: 7px 13px !important;
        border-radius: 20px !important;
        background: var(--bk-bg) !important;
        font-size: 12px;
        white-space: nowrap;
    }
    #wssp-bk .bk-sidenav-item.is-active {
        background: var(--bk-purple) !important;
        color: #fff !important;
        box-shadow: 0 2px 10px rgba(124,58,237,.3) !important;
    }
    #wssp-bk .bk-sidenav-item.is-active::before { display: none; }
    #wssp-bk .bk-service-area { overflow: visible; }
    #wssp-bk .bk-cat-panel { height: auto; overflow: visible; }
    #wssp-bk .bk-chip-arrow { display: none; }
    #wssp-bk .bk-salon-hours { display: none; }
    #wssp-bk .bk-form-inner { padding: 14px 14px 6px; }
    #wssp-bk .bk-form-footer { padding: 12px 14px 18px; }
    #wssp-bk .bk-form-topbar { padding: 0 14px; }
}
