/*
 * Meeting scheduler — the "Schedule Meeting" tab.
 *
 * Hand-written rather than Tailwind: prilixor.css is compiled output with no
 * build wired up, so a new arbitrary utility would simply not exist. Everything
 * here is namespaced .pbk- and reuses the design's own tokens.
 */

.pbk {
    --pbk-line: rgba(6, 42, 34, .12);
    --pbk-soft: rgba(6, 42, 34, .55);
    --pbk-mint: #35d6a4;
    --pbk-green: #0b7a5c;
    font-family: Inter, system-ui, sans-serif;
    color: var(--ink, #0c2a23);
}

/* ── header: duration, timezone, progress ─────────────────────────────── */

.pbk-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pbk-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(53, 214, 164, .16);
    color: var(--pbk-green);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
}

.pbk-badge svg {
    width: 13px;
    height: 13px;
}

.pbk-tz {
    font-size: 12px;
    color: var(--pbk-soft);
}

.pbk-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 16px;
}

.pbk-steps span {
    height: 3px;
    border-radius: 999px;
    background: rgba(6, 42, 34, .10);
    transition: background .25s ease;
}

.pbk-steps span.is-on {
    background: linear-gradient(120deg, #35d6a4, #17b9c4);
}

.pbk-intro {
    margin: 14px 0 0;
    font-size: 13.5px;
    line-height: 22px;
    color: var(--pbk-soft);
}

/* ── calendar — step 1, on its own ────────────────────────────────────── */

[data-pbk-cal] {
    max-width: 430px;
    margin-top: 18px;
}

[data-pbk-cal-step],
[data-pbk-time-step],
[data-pbk-details] {
    margin-top: 4px;
}

.pbk-cal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pbk-month {
    margin: 0;
    font-family: Sora, sans-serif;
    font-size: 16.5px;
    letter-spacing: -.02em;
}

.pbk-nav {
    display: flex;
    gap: 8px;
}

.pbk-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--pbk-line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink, #0c2a23);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, opacity .2s ease;
}

.pbk-nav button:hover:not(:disabled) {
    border-color: var(--pbk-mint);
    color: var(--pbk-green);
}

.pbk-nav button:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.pbk-nav svg {
    width: 13px;
    height: 13px;
}

.pbk-dow,
.pbk-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.pbk-dow {
    margin-top: 16px;
}

.pbk-dow span {
    padding-bottom: 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
    color: rgba(6, 42, 34, .45);
}

.pbk-grid {
    margin-top: 4px;
}

.pbk-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: none;
    font-family: inherit;
    font-size: 13px;
    color: rgba(6, 42, 34, .28);
    cursor: default;
}

.pbk-day.is-open {
    border-color: var(--pbk-line);
    background: #fff;
    color: var(--ink, #0c2a23);
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pbk-day.is-open:hover {
    border-color: var(--pbk-mint);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(6, 42, 34, .07);
}

.pbk-day i {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--pbk-mint);
}

.pbk-day.is-today {
    font-weight: 700;
}

.pbk-day.is-picked {
    border-color: transparent;
    background: linear-gradient(120deg, #35d6a4, #17b9c4);
    color: #03130f;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(23, 185, 196, .28);
}

.pbk-day.is-picked i {
    background: rgba(3, 19, 15, .5);
}

.pbk-day.is-empty {
    border: 0;
    background: none;
}

.pbk-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--pbk-soft);
}

.pbk-legend i {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--pbk-mint);
}

/* ── time slots ───────────────────────────────────────────────────────── */

/*
 * The day is split into morning / afternoon / evening. Each group is a couple
 * of rows rather than one long run of chips, so a full working day fits the
 * panel without scrolling and the time you want is easy to pick out.
 */
.pbk-slots {
    margin-top: 16px;
}

.pbk-group + .pbk-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(6, 42, 34, .10);
}

.pbk-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(6, 42, 34, .45);
}

.pbk-group-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(53, 214, 164, .16);
    font-size: 9.5px;
    letter-spacing: 0;
    color: var(--pbk-green);
}

.pbk-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 7px;
}

.pbk-slots button {
    padding: 9px 6px;
    border: 1px solid var(--pbk-line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12.8px;
    font-weight: 600;
    color: var(--ink, #0c2a23);
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.pbk-slots button:hover {
    border-color: var(--pbk-mint);
    color: var(--pbk-green);
    transform: translateY(-1px);
}

.pbk-slots button.is-picked {
    border-color: transparent;
    background: linear-gradient(120deg, #35d6a4, #17b9c4);
    color: #03130f;
}

[data-pbk-slot-head] {
    font-family: Sora, sans-serif;
    font-weight: 600;
}

.pbk-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 21px;
    color: var(--pbk-soft);
}

/* ── details form ─────────────────────────────────────────────────────── */

.pbk-chosen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(53, 214, 164, .35);
    border-radius: 12px;
    background: rgba(53, 214, 164, .10);
    font-size: 13px;
}

.pbk-chosen strong {
    font-family: Sora, sans-serif;
    font-weight: 600;
}

.pbk-chosen button {
    border: 0;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pbk-green);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.pbk-fields {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 560px) {
    .pbk-fields {
        grid-template-columns: 1fr 1fr;
    }

    .pbk-fields .pbk-wide {
        grid-column: 1 / -1;
    }
}

.pbk-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(6, 42, 34, .55);
}

.pbk-field input,
.pbk-field select,
.pbk-field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--pbk-line);
    border-radius: 11px;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--ink, #0c2a23);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.pbk-field textarea {
    min-height: 78px;
    resize: vertical;
}

.pbk-field input:focus,
.pbk-field select:focus,
.pbk-field textarea:focus {
    outline: 0;
    border-color: var(--pbk-mint);
    box-shadow: 0 0 0 3px rgba(53, 214, 164, .18);
}

.pbk-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pbk-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(120deg, #35d6a4, #17b9c4);
    font-family: Sora, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #03130f;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

.pbk-submit:hover:not(:disabled) {
    transform: translateY(-2px);
}

.pbk-submit:disabled {
    opacity: .55;
    cursor: progress;
}

.pbk-small {
    margin: 10px 0 0;
    font-size: 11.5px;
    line-height: 19px;
    color: rgba(6, 42, 34, .5);
}

.pbk-msg {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 20px;
    color: #b4342c;
}

/* ── done ─────────────────────────────────────────────────────────────── */

.pbk-done {
    text-align: center;
    padding: 6px 0 4px;
}

.pbk-tick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(53, 214, 164, .18);
    color: var(--pbk-green);
    font-size: 22px;
}

.pbk-done h3 {
    margin: 16px 0 0;
    font-family: Sora, sans-serif;
    font-size: 20px;
    letter-spacing: -.02em;
}

.pbk-done p {
    margin: 8px auto 0;
    max-width: 420px;
    font-size: 13.5px;
    line-height: 23px;
    color: var(--pbk-soft);
}

.pbk-done .pbk-when {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(53, 214, 164, .35);
    border-radius: 12px;
    background: rgba(53, 214, 164, .10);
    font-family: Sora, sans-serif;
    font-size: 14.5px;
    color: var(--ink, #0c2a23);
}

.pbk-ics {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 22px;
    border: 1px solid var(--pbk-line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #0c2a23);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.pbk-ics:hover {
    border-color: var(--pbk-mint);
    color: var(--pbk-green);
}

/* ── the scheduling form ──────────────────────────────────────────────── */

.pbk-form {
    margin-top: 18px;
}

/*
 * Meeting Date and Meeting Time are filled in from the calendar and locked, so
 * they read as a confirmation rather than as something still to answer.
 */
.pbk-form input[readonly] {
    background: rgba(53, 214, 164, .10);
    border-color: rgba(53, 214, 164, .35);
    color: var(--ink, #0c2a23);
    font-weight: 600;
    cursor: default;
}

.pbk-form input[readonly]:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(53, 214, 164, .18);
}

/* ── external scheduler embed ─────────────────────────────────────────── */

/*
 * Calendly and the rest render inside an iframe, so their own layout cannot be
 * restyled from here — a browser will not let CSS cross into another site's
 * frame. What is styled is the frame around it, and Calendly's colours are set
 * through its URL instead (see prilixor_booking_embed_url()).
 */
.pbk-embed-wrap {
    margin-top: 6px;
    border: 1px solid var(--pbk-line);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

/*
 * A fixed height, not an auto-growing one.
 *
 * Calendly laid out in one narrow column stacks the whole day as a vertical
 * list, and an auto-height frame then runs for several screens — leaving the
 * contact card beside it as a tall empty strip. Pinning the height keeps the
 * section the size the design expects; Calendly scrolls within it.
 */
.pbk-embed,
.calendly-inline-widget.pbk-embed {
    display: block;
    width: 100%;
    min-width: 0;
    height: 580px;
    border: 0;
}

@media (min-width: 700px) {

    .pbk-embed,
    .calendly-inline-widget.pbk-embed {
        height: 620px;
    }
}

/*
 * Give an embedded scheduler the whole card.
 *
 * The enquiry section normally sets contact details beside the tab panel, which
 * leaves the panel around 550px — narrow enough that Calendly falls back to its
 * one-column phone layout: a small calendar with the entire day listed under
 * it. Across the full card it has room for its two-column layout instead, so
 * the times sit beside the calendar and the section stays short.
 *
 * :has() is only used to spot the card that actually contains an embed. Where
 * it is unsupported nothing changes and the fixed height above still keeps the
 * panel in check.
 */
@supports selector(:has(*)) {
    @media (min-width: 1024px) {

        /* The contact column reads as a header above the scheduler. */
        .grad-card-lt:has(.pbk-embed-wrap) > div:first-child {
            max-width: 640px;
            padding-bottom: 4px;
        }

        .grad-card-lt:has(.pbk-embed-wrap) [role="tabpanel"] {
            min-height: 0;
        }
    }
}

/* ── skeleton while a month or a day is loading ───────────────────────── */

.pbk-loading {
    opacity: .45;
    pointer-events: none;
}
