/* Ivy inline-confirm slot picker — paired with /static/js/ivy-slot-picker.js.
   iClosed-style: tap a time, a Confirm button slides in beside it, book.
   Accent inherits the page's --ivy-green. Centered + responsive everywhere. */
.ivy-sp {
    --sp-accent: var(--ivy-green, #7000ff);
    --sp-accent-dark: var(--ivy-green-dark, #5b00d6);
    --sp-line: var(--ivy-line, #e5e7eb);
    --sp-ink: var(--ivy-ink, #0f172a);
    --sp-muted: var(--ivy-soft, #6b7280);
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.ivy-sp__status {
    text-align: center;
    color: var(--sp-muted);
    font-size: 14px;
    line-height: 1.5;
    padding: 40px 16px;
}
.ivy-sp__status a { color: var(--sp-accent); font-weight: 600; }
.ivy-sp__tz {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--sp-muted);
    text-align: center;
}

/* Day strip — centered, wraps instead of horizontal-scrolling */
.ivy-sp__days {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
}
.ivy-sp__day {
    flex: 0 0 auto;
    width: 66px;
    padding: 9px 4px;
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    background: #fff;
    color: var(--sp-ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .15s;
}
.ivy-sp__day:hover { border-color: var(--sp-accent); transform: translateY(-1px); }
.ivy-sp__day.is-active {
    background: var(--sp-accent);
    border-color: var(--sp-accent);
    color: #fff;
    box-shadow: 0 8px 18px -8px var(--sp-accent);
}
.ivy-sp__day-wd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.ivy-sp__day-num { font-size: 20px; font-weight: 800; line-height: 1; }
.ivy-sp__day-mo { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }

/* Slots — single centered column, scrolls if long, soft fade at the bottom */
.ivy-sp__slots {
    margin: 0 auto;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 4px 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--sp-line) transparent;
}
.ivy-sp__slots::-webkit-scrollbar { width: 6px; }
.ivy-sp__slots::-webkit-scrollbar-thumb { background: var(--sp-line); border-radius: 999px; }
.ivy-sp__row {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.ivy-sp__time {
    flex: 1 1 auto;
    min-width: 0;
    height: 50px;
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    background: #fff;
    color: var(--sp-ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.ivy-sp__time:hover { border-color: var(--sp-accent); box-shadow: 0 2px 10px -4px var(--sp-accent); }
/* Selected time stays light with an accent ring; the Confirm is the colored CTA */
.ivy-sp__row.is-selected .ivy-sp__time {
    color: var(--sp-accent-dark);
    border-color: var(--sp-accent);
    box-shadow: inset 0 0 0 1px var(--sp-accent);
}

/* Confirm — width 0 until its row is selected, then slides in beside the time. */
.ivy-sp__confirm {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    margin-left: 0;
    height: 50px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--sp-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    box-shadow: 0 8px 20px -8px var(--sp-accent);
    transition: width .22s ease, min-width .22s ease, margin-left .22s ease, opacity .18s ease, padding .22s ease;
}
.ivy-sp__row.is-selected .ivy-sp__confirm {
    flex: 0 0 auto;
    width: auto;
    min-width: 108px;
    margin-left: 8px;
    padding: 0 16px;
    opacity: 1;
    pointer-events: auto;
}
.ivy-sp__confirm:hover { background: var(--sp-accent-dark); }
.ivy-sp__confirm:disabled,
.ivy-sp__time:disabled { opacity: .55; cursor: default; box-shadow: none; }

.ivy-sp__err {
    margin: 14px 0 0;
    color: #b91c1c;
    font-size: 13px;
    text-align: center;
}

/* Narrow phones: keep the time + Confirm comfortably side by side */
@media (max-width: 360px) {
    .ivy-sp__day { width: 60px; }
    .ivy-sp__time { font-size: 14px; height: 48px; }
    .ivy-sp__confirm { height: 48px; }
    .ivy-sp__row.is-selected .ivy-sp__confirm { min-width: 96px; padding: 0 12px; }
}
