/* VPL Scheduling — Frontend Booking Form Styles */

:root {
    --vsch-primary:   #2271b1;
    --vsch-primary-d: #135e96;
    --vsch-success:   #00a32a;
    --vsch-error:     #d63638;
    --vsch-border:    #d0d0d0;
    --vsch-bg:        #ffffff;
    --vsch-bg-alt:    #f8f8f8;
    --vsch-text:      #1e1e1e;
    --vsch-mute:      #757575;
    --vsch-radius:    6px;
}

/* ── Wrapper ─────────────────────────────────────────────────────── */
.vpl-schedule-booking {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    color: var(--vsch-text);
    max-width: 640px;
    margin: 0 auto;
}

.vpl-schedule-booking * { box-sizing: border-box; }

/* ── Step progress indicator ─────────────────────────────────────── */
.vsch-steps {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}
.vsch-step {
    display: flex;
    align-items: center;
    font-size: .82rem;
    color: var(--vsch-mute);
}
.vsch-step.is-active { color: var(--vsch-primary); font-weight: 600; }
.vsch-step.is-done   { color: var(--vsch-success); }
.vsch-step__num {
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: .4em;
    flex-shrink: 0;
    font-size: .9em;
}
.vsch-step__sep {
    flex: 1;
    height: 2px;
    background: var(--vsch-border);
    margin: 0 .5rem;
}

/* ── Cards / panels ──────────────────────────────────────────────── */
.vsch-panel {
    background: var(--vsch-bg);
    border: 1px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.vsch-panel h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.vsch-helper {
    margin: .75rem 0 0;
    font-size: .85rem;
    color: var(--vsch-mute);
}

/* ── Service list ─────────────────────────────────────────────────── */
.vsch-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .75rem;
}
.vsch-service-list__item {
    border: 2px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color .15s, background .15s;
}
.vsch-service-list__item:hover,
.vsch-service-list__item.is-selected {
    border-color: var(--vsch-primary);
    background: #f0f6fc;
}
.vsch-service-name { font-weight: 600; }
.vsch-service-meta { font-size: .85rem; color: var(--vsch-mute); margin-top: .2rem; }
.vsch-service-dot  {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: .75rem;
    background: var(--vsch-primary);
}

/* ── Provider list ────────────────────────────────────────────────── */
.vsch-provider-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
.vsch-provider-card {
    border: 2px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    padding: .9rem 1.1rem;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    transition: border-color .15s;
}
.vsch-provider-card:hover,
.vsch-provider-card.is-selected { border-color: var(--vsch-primary); background: #f0f6fc; }
.vsch-provider-name { font-weight: 600; font-size: .92rem; }

/* ── Calendar / slot picker ───────────────────────────────────────── */
.vsch-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.vsch-month-nav button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--vsch-primary);
    padding: .2rem .5rem;
}
.vsch-month-title { font-weight: 600; font-size: 1rem; }

.vsch-zoom-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    margin-bottom: .65rem;
}

.vsch-zoom-btn {
    border: 1px solid var(--vsch-border);
    background: var(--vsch-bg-alt);
    color: var(--vsch-text);
    font-size: 1rem;
    line-height: 1;
    min-width: 30px;
    min-height: 30px;
    border-radius: 6px;
    cursor: pointer;
}

.vsch-zoom-value {
    font-size: .82rem;
    color: var(--vsch-mute);
    min-width: 74px;
    text-align: center;
}

.vsch-calendar-wrap {
    --vsch-zoom: 100%;
    font-size: var(--vsch-zoom);
}

.vsch-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1.25rem;
}
.vsch-cal-header { text-align: center; font-size: .75rem; color: var(--vsch-mute); font-weight: 600; padding: .3rem 0; }
.vsch-cal-day {
    text-align: center;
    padding: .45rem .25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .88rem;
    transition: background .12s;
}
.vsch-cal-day:hover:not(.is-disabled):not(.is-empty) { background: #e8f0fe; }
.vsch-cal-day.is-selected                            { background: var(--vsch-primary); color: #fff; font-weight: 700; border-radius: 4px; }
.vsch-cal-day.is-today                               { font-weight: 700; color: var(--vsch-primary); }
.vsch-cal-day.is-disabled,
.vsch-cal-day.is-empty                               { color: var(--vsch-mute); pointer-events: none; opacity: .45; }
.vsch-cal-day.has-slots::after {
    content: '';
    display: block;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--vsch-success);
    margin: .15rem auto 0;
}

.vsch-cal-day.has-busy::after {
    content: '';
    display: block;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--vsch-error);
    margin: .15rem auto 0;
}

.vsch-slots {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
    font-size: var(--vsch-zoom, 100%);
}
.vsch-slot-btn {
    padding: .4rem .85rem;
    border: 1.5px solid var(--vsch-primary);
    border-radius: 3em;
    background: none;
    color: var(--vsch-primary);
    font-size: .88rem;
    cursor: pointer;
    transition: background .13s, color .13s;
}
.vsch-slot-btn:hover,
.vsch-slot-btn.is-selected { background: var(--vsch-primary); color: #fff; }

.vsch-slot-btn.is-busy {
    border-color: #c7cbd1;
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}
.vsch-slot-btn.is-busy:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Form fields ─────────────────────────────────────────────────── */
.vsch-form-group  { margin-bottom: 1rem; }
.vsch-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
    font-size: .9rem;
}
.vsch-form-group input,
.vsch-form-group textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    font-size: .95rem;
}
.vsch-form-group input:focus,
.vsch-form-group textarea:focus {
    outline: none;
    border-color: var(--vsch-primary);
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.vsch-form-group textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.vsch-btn {
    display: inline-block;
    padding: .6rem 1.5rem;
    border: none;
    border-radius: var(--vsch-radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}
.vsch-btn--primary { background: var(--vsch-primary); color: #fff; }
.vsch-btn--primary:hover { background: var(--vsch-primary-d); }
.vsch-btn--secondary {
    background: var(--vsch-bg-alt);
    color: var(--vsch-text);
    border: 1px solid var(--vsch-border);
    margin-right: .5rem;
}
.vsch-btn:disabled { opacity: .55; cursor: default; }

.vsch-nav-row { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; }

/* ── Confirmation ─────────────────────────────────────────────────── */
.vsch-confirmation {
    text-align: center;
    padding: 2rem;
}
.vsch-confirmation__icon { font-size: 3rem; margin-bottom: 1rem; }
.vsch-confirmation__token {
    font-family: monospace;
    font-size: .95rem;
    background: var(--vsch-bg-alt);
    padding: .3em .6em;
    border-radius: 3px;
    word-break: break-all;
}

/* ── Error / notice ───────────────────────────────────────────────── */
.vsch-notice {
    padding: .75rem 1rem;
    border-radius: var(--vsch-radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}
.vsch-notice--success { background: #d1e7dd; color: #0a5a2d; }
.vsch-notice--error   { background: #f8d7da; color: #842029; }
.vsch-notice--info    { background: #cff4fc; color: #055160; }

/* ── Spinner ─────────────────────────────────────────────────────── */
.vsch-spinner {
    display: inline-block;
    width: 1.2em; height: 1.2em;
    border: 2px solid var(--vsch-border);
    border-top-color: var(--vsch-primary);
    border-radius: 50%;
    animation: vsch-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes vsch-spin { to { transform: rotate(360deg); } }

/* ── Returning-customer lookup card ─────────────────────────────── */

/* Toggle pill */
.vsch-rc-wrap {
    margin: 0 0 1.25rem;
    border: 1px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    overflow: hidden;
    transition: box-shadow .2s;
}
.vsch-rc-wrap.is-open {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border-color: var(--vsch-primary);
}

.vsch-rc-toggle {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .75rem 1rem;
    background: var(--vsch-bg-alt);
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: var(--vsch-primary-d);
    font-weight: 500;
    text-align: left;
    transition: background .15s;
}
.vsch-rc-wrap.is-open .vsch-rc-toggle {
    background: #eaf2fb;
}
.vsch-rc-toggle:hover { background: #ddeeff; }

.vsch-rc-toggle__icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}
.vsch-rc-toggle__label { flex: 1; }
.vsch-rc-toggle__arrow {
    font-size: .7rem;
    color: var(--vsch-mute);
    flex-shrink: 0;
}

/* Drawer */
.vsch-rc-drawer {
    display: none;
    padding: 1rem 1rem 1.25rem;
    background: #fff;
    border-top: 1px solid var(--vsch-border);
}
.vsch-rc-wrap.is-open .vsch-rc-drawer { display: block; }

.vsch-rc-hint {
    margin: 0 0 1rem;
    font-size: .88rem;
    color: var(--vsch-mute);
    line-height: 1.5;
}

/* Fields inside drawer */
.vsch-rc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
@media (max-width: 480px) {
    .vsch-rc-fields { grid-template-columns: 1fr; }
}
/* Email gets full width since it's the primary field */
.vsch-rc-fields .vsch-rc-field:first-child {
    grid-column: 1 / -1;
}

.vsch-rc-field { display: flex; flex-direction: column; gap: .3rem; }

.vsch-rc-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--vsch-text);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.vsch-rc-input {
    padding: .55rem .75rem;
    border: 1.5px solid var(--vsch-border);
    border-radius: var(--vsch-radius);
    font-size: .95rem;
    color: var(--vsch-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
}
.vsch-rc-input:focus {
    border-color: var(--vsch-primary);
    box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}
.vsch-rc-input--error {
    border-color: var(--vsch-error);
    box-shadow: 0 0 0 3px rgba(214,54,56,.12);
}

/* Submit button */
.vsch-rc-actions { margin-top: .9rem; }
.vsch-rc-submit {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    background: var(--vsch-primary);
    color: #fff;
    border: none;
    border-radius: var(--vsch-radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.vsch-rc-submit:hover  { background: var(--vsch-primary-d); }
.vsch-rc-submit:active { transform: scale(.98); }

/* Spinner inside drawer */
.vsch-rc-searching {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 0;
    color: var(--vsch-mute);
    font-size: .9rem;
}
.vsch-rc-spinner {
    display: inline-block;
    width: 1.1em; height: 1.1em;
    border: 2px solid var(--vsch-border);
    border-top-color: var(--vsch-primary);
    border-radius: 50%;
    animation: vsch-spin .7s linear infinite;
    flex-shrink: 0;
}

/* Success chip shown after a successful lookup */
.vsch-rc-found {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1.1rem;
    padding: .65rem 1rem;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: var(--vsch-radius);
    font-size: .88rem;
    color: #065f46;
}
.vsch-rc-found__icon {
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.vsch-rc-found__msg { flex: 1; }
.vsch-rc-found__clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
    padding: 0 .2rem;
    line-height: 1;
    flex-shrink: 0;
}
.vsch-rc-found__clear:hover { color: #111; }
