/* Booking form (partials/el-booking-form.php): step 1 day + time, step 2 fields, step 3 booked.
   A separate form from the lead form; its fields and country picker use lead-form.css (loaded first). */
.el-bf-step h3 {
    margin: 0 0 clamp(18px, calc(18px + 6 * (100vw - 1280px) / 640), 24px);
    color: var(--el-color-heading);
}

.el-bf {
    position: relative; /* booking-form.js clips it only while the steps slide */
}

/* Day: the next 3 free days + "More dates" (opens a small calendar under the row), 4 boxes in a row */
.el-bf-picker {
    position: relative;
    margin-bottom: clamp(14px, calc(14px + 4 * (100vw - 1280px) / 640), 18px);
}

.el-bf-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.el-bf-quick-days {
    display: contents;
}

.el-bf-quick button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 68px;
    padding: 6px 4px;
    border: 1px solid #cdd6df;
    border-radius: 14px;
    background: var(--el-color-white);
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    color: var(--el-color-blue-dark);
    cursor: pointer;
    transition: border-color var(--el-transition), background-color var(--el-transition), color var(--el-transition);
}

.el-bf-quick button > span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
}

.el-bf-quick strong {
    font-family: var(--el-font-heading);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.1;
}

.el-bf-quick button:hover {
    border-color: var(--el-color-orange);
}

.el-bf-quick button[aria-checked="true"],
.el-bf-quick .el-bf-date.is-picked {
    border-color: var(--el-color-blue-dark);
    background: var(--el-color-blue-dark);
    color: var(--el-color-white);
}

/* "More dates": the calendar icon over the words; dashed so it reads as an option, not a day */
.el-bf-date:not(.is-picked) {
    gap: 4px;
    border-style: dashed;
}

.el-bf-date:not(.is-picked) > span {
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
}

.el-bf-date svg {
    flex: none;
    color: var(--el-color-orange);
}

/* A picked calendar day: a small calendar icon in the corner shows it opens the calendar again */
.el-bf-date.is-picked {
    position: relative;
}

.el-bf-date.is-picked svg {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 11px;
    height: 11px;
    color: currentColor;
    opacity: 0.8;
}

.el-bf-date[aria-expanded="true"] {
    border-color: var(--el-color-blue-dark);
}

/* The calendar: floats over the times under the row, lined up with "More dates" on the right */
.el-bf-cal {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 5;
    width: min(100%, 340px);
    padding: 12px;
    border: 1px solid #dfe5eb;
    border-radius: 16px;
    background: var(--el-color-white);
    box-shadow: 0 16px 40px rgba(12, 29, 39, 0.16);
}

.el-bf-cal[hidden] {
    display: none;
}

.el-bf-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.el-bf-month {
    margin: 0;
    font-family: var(--el-font-heading);
    font-size: 19px;
    color: var(--el-color-heading);
}

.el-bf-arrow {
    width: 32px;
    height: 32px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: var(--el-font-body);
    font-size: 28px;
    line-height: 1;
    color: var(--el-color-blue-dark);
    cursor: pointer;
    transition: color var(--el-transition), background-color var(--el-transition);
}

.el-bf-arrow:hover:not(:disabled),
.el-bf-arrow:focus-visible {
    background: #f3f6f9;
    color: var(--el-color-orange);
}

.el-bf-arrow:disabled {
    color: #c3cbd3;
    cursor: default;
}

.el-bf-cal-dow,
.el-bf-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    text-align: center;
}

.el-bf-cal-dow {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #8a96a2;
}

/* A day: a round number; days that can't be picked are faint text */
.el-bf-days > * {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 38px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    font-size: 15px;
}

.el-bf-days .is-off {
    color: #c3cbd3;
}

.el-bf-days .is-today:not([aria-checked="true"]) {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* "Time" with the host's time zone after it */
.el-bf-label > span {
    margin-left: 6px;
    white-space: nowrap;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.el-bf-label {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7c8b99;
}

.el-bf-days button,
.el-bf-times button {
    border: 1px solid #cdd6df;
    background: var(--el-color-white);
    font: inherit;
    color: var(--el-color-blue-dark);
    cursor: pointer;
    transition: border-color var(--el-transition), background-color var(--el-transition), color var(--el-transition);
}

.el-bf-days button {
    padding: 0;
    border-color: transparent;
    background: #f3f6f9;
}

.el-bf-times {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-height: 52px;
}

.el-bf-times button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: clamp(16px, calc(16px + 2 * (100vw - 1280px) / 640), 18px);
    line-height: 1.2;
}

.el-bf-days button:hover:not(:disabled),
.el-bf-times button:hover:not(:disabled) {
    border-color: var(--el-color-orange);
}

.el-bf-days button[aria-checked="true"],
.el-bf-times button[aria-checked="true"] {
    border-color: var(--el-color-blue-dark);
    background: var(--el-color-blue-dark);
    color: var(--el-color-white);
}

/* Booked (blocked): grey, dashed, the time struck through and "Booked" (or "Passed") under it; a full day
   is a grey number struck through */
.el-bf-days button.is-booked,
.el-bf-times button.is-booked {
    border-style: dashed;
    border-color: #c9d2db;
    background: #eef2f5;
    color: #8a96a2;
    cursor: not-allowed;
}

.el-bf-days button.is-booked {
    border-color: transparent;
    background: transparent;
    text-decoration: line-through;
}

.el-bf-times .is-booked s {
    text-decoration-thickness: 1px;
}

.el-bf-times small {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a96a2;
}

.el-bf-loading {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 16px;
    color: var(--el-color-muted);
}

/* The host picks the exact time: a pale info line under the windows */
.el-bf-disclaimer {
    display: flex;
    gap: 10px;
    margin: 12px 0 clamp(18px, calc(18px + 6 * (100vw - 1280px) / 640), 24px);
    padding: 10px 14px;
    border-radius: 10px;
    background: #fdf1ea;
    font-size: 15px;
    line-height: 1.5;
    color: var(--el-color-navy);
}

.el-bf-disclaimer svg {
    flex: none;
    margin-top: 2px;
    color: var(--el-color-orange);
}

/* Only shown for a slot error or a booked note (booking-form.js) */
.el-bf-note {
    margin: -8px 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--el-color-muted);
}

.el-bf-note.is-error {
    color: #c0392b;
}

.el-bf-next,
.el-bf-submit {
    width: 100%;
}

/* Disabled until a time is picked: light orange (design) */
.el-bf-next:disabled {
    border-color: transparent;
    background: #f8c3a9;
    color: var(--el-color-navy);
    cursor: not-allowed;
}

.el-bf-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Phones: the windows stay 3 across (2 lines each) to keep the form short */
@media (max-width: 575px) {
    .el-bf-times button {
        padding: 4px 6px;
        font-size: 14px;
    }
}

/* Step 2: the picked day and window under the label line (with the time zone), "Change" top right */
.el-bf-picked {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 16px;
    margin-bottom: 16px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #f3f6f9;
}

.el-bf-picked .el-bf-label {
    margin: 0;
}

.el-bf-picked strong {
    grid-column: 1 / -1;
    font-family: var(--el-font-heading);
    font-size: 22px;
    font-weight: 400;
    color: var(--el-color-heading);
}

@media (max-width: 575px) {
    .el-bf-zone-code {
        display: none;
    }

    .el-bf-picked .el-bf-label {
        font-size: 12px;
        letter-spacing: 0.1em;
    }
}

/* Name and email side by side */
.el-bf-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

@media (max-width: 575px) {
    .el-bf-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.el-bf-change {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--el-color-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Fields, phone country picker, status and privacy note: assets/css/lead-form.css (the lead form's styles). */

/* Thank-you popup: the wrapper here, the card, check mark and confetti from lead-form.css */
.el-bf-thanks {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.el-bf-thanks[hidden] {
    display: none;
}

/* The booked time, under the title */
.el-bf-thanks-when {
    margin: 0 0 12px;
    font-family: var(--el-font-heading);
    font-size: 22px;
    line-height: 1.3;
    color: var(--el-color-heading);
}
