.ihb-booking {
    --ihb-accent: #2468a2;
    --ihb-border: #cdd5dd;
    --ihb-ink: #202a34;
    box-sizing: border-box;
    max-width: 55rem;
    margin-block: 1.5rem;
    color: var(--ihb-ink);
    overflow-wrap: anywhere;
}

.ihb-booking--admin {
    max-width: 42rem;
    padding: 1rem 1.5rem;
    border: 1px solid var(--ihb-border);
    border-radius: .75rem;
    background: #fff;
}

.ihb-booking--public {
    --ihb-accent: #ad3f1b;
    --ihb-progress: #f4662f;
    --ihb-highlight: #fdf0e9;
}

.ihb-booking fieldset {
    box-sizing: border-box;
    min-inline-size: 0;
    border: 0;
    padding: 0;
    margin: 1rem 0;
}

.ihb-booking fieldset:focus {
    outline: none;
}

.ihb-booking legend {
    font-size: 1.15em;
    font-weight: 650;
    padding: 0;
}

.ihb-booking label {
    display: grid;
    min-width: 0;
    gap: .35rem;
    margin-block: .55rem;
    font-weight: 600;
}

.ihb-booking :is(input:not([type="checkbox"]), select, textarea, button) {
    box-sizing: border-box;
    min-height: 2.65rem;
    max-width: 100%;
    border: 1px solid var(--ihb-border);
    border-radius: .25rem;
    background: #fff;
    color: var(--ihb-ink);
    padding: .45rem .65rem;
    font: inherit;
}

.ihb-booking select {
    appearance: auto;
    background-image: none;
    inline-size: 100%;
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ihb-booking select :is(option, optgroup) {
    font: inherit !important;
}

@supports (appearance: base-select) and selector(::picker(select)) {
    .ihb-booking select, .ihb-booking select::picker(select) {
        appearance: base-select;
    }

    .ihb-booking select::picker(select) {
        font: inherit;
        inline-size: anchor-size(width);
        max-inline-size: calc(100vw - 2rem);
        overflow-x: hidden;
        border: 1px solid #cdd5dd;
        border-radius: .35rem;
        background: #fff;
    }

    .ihb-booking select option {
        min-inline-size: 0;
        padding: .45rem .65rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.ihb-booking button {
    cursor: pointer;
}

.ihb-booking button:disabled {
    opacity: .55;
    cursor: default;
}

.ihb-booking .ihb-check {
    display: flex;
    align-items: baseline;
    font-weight: 400;
}

.ihb-booking [hidden] {
    display: none !important;
}

.ihb-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: .4rem;
    margin: 0 0 1.25rem;
}

.ihb-step {
    display: flex;
    align-items: center;
    gap: .28rem;
    position: relative;
    padding: 0 0 1.15rem;
    font-size: .9em;
    font-weight: 650;
    color: #526170;
}

.ihb-step::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: .8rem;
    background: var(--ihb-border);
}

.ihb-step:first-child::after {
    border-radius: .25rem 0 0 .25rem;
}

.ihb-step:last-child::after {
    border-radius: 0 .25rem .25rem 0;
}

.ihb-step span::after {
    content: ".";
}

.ihb-step:is(.is-complete, [aria-current]) {
    color: var(--ihb-accent);
}

.ihb-step:is(.is-complete, [aria-current])::after {
    background: var(--ihb-progress);
}

.ihb-booking-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 0 .85rem;
}

.ihb-booking-choice {
    position: relative;
    min-inline-size: 0;
    margin-block: .55rem;
    font-weight: 600;
}

.ihb-booking .ihb-booking-choice > label {
    margin: 0 0 .35rem;
}

.ihb-booking .ihb-choice-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    inline-size: 100%;
    text-align: start;
}

.ihb-choice-trigger > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ihb-choice-trigger::after {
    content: "";
    flex: none;
    inline-size: .42em;
    block-size: .42em;
    border: solid currentColor;
    border-width: 0 .12em .12em 0;
    transform: rotate(45deg) translateY(-.12em);
}

.ihb-booking .ihb-choice-trigger:focus-visible {
    outline: 2px solid var(--ihb-accent);
    outline-offset: 2px;
}

.ihb-booking .ihb-choice-list {
    box-sizing: border-box;
    max-block-size: 18rem;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--ihb-border);
    border-radius: .35rem;
    background: #fff;
    box-shadow: 0 .3rem .9rem #172e4926;
    color: var(--ihb-ink);
    font: inherit;
    line-height: 1.35;
}

.ihb-booking .ihb-choice-list[popover] {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    inline-size: min(var(--ihb-choice-width, 100%), calc(100% - 16px));
    max-block-size: min(18rem, var(--ihb-choice-space, 18rem));
}

.ihb-booking-choice[data-location-field] .ihb-choice-list[popover] {
    inline-size: min(max(28rem, var(--ihb-choice-width, 100%)), calc(100% - 16px));
}

.ihb-booking .ihb-choice-option {
    display: block;
    padding: .45rem .65rem;
    font: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.ihb-choice-option[aria-selected="true"] {
    background: var(--ihb-highlight);
}

.ihb-choice-option:is(:hover, .is-active) {
    background: #e4ebf1;
}

.ihb-booking-summary, .ihb-booking-message {
    padding: .65rem .85rem;
    border-radius: .25rem;
    background: var(--ihb-highlight, #edf4fa);
}

.ihb-booking-date {
    max-width: 15rem;
}

.ihb-booking-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.25rem), 1fr));
    gap: .5rem;
    margin-block: .8rem;
}

.ihb-booking-times button:not([aria-pressed="true"]):hover {
    background: var(--ihb-highlight, #edf4fa);
}

.ihb-booking-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
}

.ihb-booking-actions button[type="submit"], .ihb-booking-times button[aria-pressed="true"] {
    background: var(--ihb-accent);
    border-color: var(--ihb-accent);
    color: #fff;
}

.ihb-booking--public .ihb-booking-actions button[type="submit"] {
    margin-inline-start: auto;
}

.ihb-booking-dialog {
    box-sizing: border-box;
    inline-size: min(42rem, calc(100% - 1.5rem));
    max-block-size: calc(100% - 1.5rem);
    overflow: auto;
    padding: 0;
    border: 1px solid #cdd5dd;
    border-radius: .85rem;
    background: #fff;
    color: #202a34;
    box-shadow: 0 .6rem 2rem #172e4940;
}

.ihb-booking-dialog::backdrop {
    background: #14273b66;
}

.ihb-booking-dialog-heading {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1.15rem;
    border-bottom: 1px solid #cdd5dd;
    background: #fff;
}

.ihb-booking-dialog-heading h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 650;
}

.ihb-booking-dialog-heading button {
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0;
    border: 1px solid #cdd5dd;
    border-radius: .35rem;
    background: #fff;
    color: #202a34;
    font: inherit;
    font-size: 1.4rem;
    cursor: pointer;
}

.ihb-booking-dialog .ihb-booking--admin {
    max-inline-size: none;
    margin: 0;
    padding: .85rem 1.15rem 1.15rem;
    border: 0;
    border-radius: 0;
}

.ihb-booking-dialog [data-calendar-time] {
    margin-block: 0 .65rem;
    font-weight: 650;
}

.ihb-booking-selected-service {
    margin-block: -.2rem .55rem;
    color: #4f6275;
    font-size: .9em;
    overflow-wrap: anywhere;
}

.ihb-calendar-title {
    font-size: 1.55rem;
    font-weight: 600;
    margin-block: 1rem .75rem;
}

.ihb-calendar {
    --ihb-edge: #ced5dd;
    --ihb-cal-text: #20272e;
    --ihb-row: 2.85rem;
    box-sizing: border-box;
    padding: 1.15rem;
    color: var(--ihb-cal-text);
    border: 1px solid #dbe1e7;
    border-radius: 1rem;
    box-shadow: 0 1px 3px #24384b15;
    background: #fff;
}

.ihb-calendar-bar, .ihb-cal-filters, .ihb-cal-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ihb-calendar-bar {
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.ihb-cal-filters {
    gap: .45rem;
}

.ihb-cal-filters select, .ihb-cal-filters input[type="date"], .ihb-cal-control, .ihb-cal-new {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    max-width: 100%;
    margin: 0;
    padding: .35rem .75rem;
    border: 1px solid var(--ihb-edge);
    border-radius: .35rem;
    background-color: #fff;
    color: var(--ihb-cal-text);
    font: inherit;
    text-decoration: none;
}

.ihb-cal-filters select {
    max-width: 14rem;
    padding-right: 1.65rem;
}

.ihb-cal-control, .ihb-cal-new {
    cursor: pointer;
}

.ihb-cal-control:hover, .ihb-cal-control[aria-current] {
    background-color: #e7ebef;
    color: var(--ihb-cal-text);
}

.ihb-cal-new, .ihb-cal-new:hover, .ihb-cal-new:focus {
    background-color: #2468a2;
    color: #fff;
    border-color: #2468a2;
    font-weight: 600;
}

.ihb-cal-group {
    gap: .15rem;
}

.ihb-cal-group a[aria-label$="period"] {
    font-size: 1.45rem;
    line-height: 1;
}

.ihb-calendar-navigation h3 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 500;
}

.ihb-cal-scroll {
    overflow: auto;
    border: 1px solid #d3d8dd;
    max-height: min(75vh, 55rem);
}

.ihb-cal-grid {
    display: grid;
    grid-template-columns: 5rem repeat(var(--tracks), minmax(10rem, 1fr));
}

.ihb-cal-grid section {
    min-width: 0;
    border-left: 1px solid #d3d8dd;
}

.ihb-cal-heading {
    box-sizing: border-box;
    margin: 0;
    padding: .7rem .35rem;
    border-bottom: 1px solid #d3d8dd;
    background: #fff;
    text-align: center;
    line-height: 1.3;
}

.ihb-cal-grid .ihb-cal-heading {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 2.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ihb-cal-track {
    position: relative;
    height: calc(var(--ihb-row) * var(--hours, 24));
    background: #eeeee3;
}

.ihb-cal-axis {
    position: sticky;
    left: 0;
    z-index: 6;
}

.ihb-cal-axis .ihb-cal-track {
    background: #fff;
}

.ihb-cal-hour, .ihb-cal-working, .ihb-cal-slot, .ihb-cal-grid .ihb-cal-event {
    position: absolute;
    inset: var(--offset) 0 auto;
    height: var(--length);
    box-sizing: border-box;
}

.ihb-cal-hour {
    right: .5rem;
    padding-top: .15rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ihb-cal-working {
    background: #fffde9;
}

.ihb-cal-slot {
    border-top: 1px solid #d1d2ca;
}

.ihb-cal-gridline {
    pointer-events: none;
}

.ihb-cal-slot.ihb-cal-bookable {
    border: 0;
    border-bottom: 1px solid #bad2ea;
    background: #e8f2ff;
    cursor: pointer;
}

.ihb-cal-hint {
    color: #556473;
    margin-block: .35rem .65rem;
}

.ihb-cal-hint span {
    display: inline-block;
    padding-inline: .36rem;
    border-radius: .2rem;
    background: #e8f2ff;
    color: #195891;
    font-weight: 700;
}

.ihb-cal-hour-link {
    color: #195891;
    text-decoration: underline;
}

.ihb-cal-hour-link:is(:hover, :focus-visible) {
    color: #103b64;
    background: #e8f2ff;
}

.ihb-cal-slot.ihb-cal-bookable:is(:hover, :focus-visible) {
    z-index: 1;
    background: #bbdafa;
    outline-offset: -2px;
}

.ihb-cal-bookable:is(:hover, :focus-visible)::after {
    content: "+ Book";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: .45rem;
    transform: translateY(-50%);
    padding: .1rem .35rem;
    border-radius: .2rem;
    background: #195891;
    color: #fff;
    font-weight: 650;
    white-space: nowrap;
    pointer-events: none;
}

.ihb-cal-event {
    display: block;
    box-sizing: border-box;
    border-left: .22rem solid #2c72ac;
    border-radius: .2rem;
    padding: .2rem .38rem;
    background: #dcecff;
    color: #183e61;
    text-decoration: none;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.ihb-cal-event span {
    display: block;
    font-size: .88em;
}

.ihb-cal-event[data-status="pending"] {
    background: #ffebbc;
    border-color: #b57612;
    color: #5a3d12;
}

.ihb-cal-event:is([data-status="cancelled"], [data-status="rejected"]) {
    background: #f1e9eb;
    border-color: #a46b74;
    color: #633f47;
}

.ihb-cal-event:hover, .ihb-cal-event:focus-visible {
    text-decoration: underline;
}

.ihb-cal-grid .ihb-cal-event {
    left: var(--lane);
    right: auto;
    width: var(--breadth);
    min-height: .65rem;
    z-index: 2;
}

.ihb-cal-grid .ihb-cal-event:is(:hover, :focus-visible) {
    z-index: 3;
    min-height: 1.4rem;
}

.ihb-cal-timeline .ihb-cal-grid {
    --ihb-label-width: 10rem;
    display: block;
    min-width: 82rem;
}

.ihb-cal-timeline .ihb-cal-grid > * {
    display: grid;
    grid-template-columns: var(--ihb-label-width) 1fr;
    border: 0;
    border-bottom: 1px solid #d3d8dd;
}

.ihb-cal-timeline .ihb-cal-axis {
    top: 0;
    left: auto;
}

.ihb-cal-timeline .ihb-cal-heading {
    height: auto;
    position: sticky;
    top: auto;
    left: 0;
    border: 0;
    border-right: 1px solid #d3d8dd;
}

.ihb-cal-timeline .ihb-cal-track {
    height: 4rem;
}

.ihb-cal-timeline .ihb-cal-axis .ihb-cal-track {
    height: 2.6rem;
}

.ihb-cal-timeline :is(.ihb-cal-hour, .ihb-cal-working, .ihb-cal-slot, .ihb-cal-event) {
    inset: 0 auto 0 var(--offset);
    height: 100%;
    width: var(--length);
}

.ihb-cal-timeline .ihb-cal-hour {
    width: auto;
    padding: .65rem .15rem;
    white-space: nowrap;
    font-size: .85em;
}

.ihb-cal-timeline .ihb-cal-gridline {
    border-top: 0;
    border-left: 1px solid #d1d2ca;
}

.ihb-cal-timeline .ihb-cal-event {
    top: var(--lane);
    height: var(--breadth);
    min-width: .65rem;
}

.ihb-cal-month {
    display: grid;
    grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
}

.ihb-cal-month section, .ihb-cal-list section {
    box-sizing: border-box;
    min-width: 0;
    padding: .4rem;
    border: 1px solid #e3e7eb;
}

.ihb-cal-month section {
    min-height: 6rem;
}

.ihb-cal-month h4, .ihb-cal-list h4 {
    margin: .15rem 0 .5rem;
}

.ihb-cal-month .ihb-cal-event, .ihb-cal-list .ihb-cal-event {
    margin-block: .25rem;
}

.ihb-cal-other-month {
    background: #f6f7f7;
}

.ihb-cal-list {
    padding: .5rem;
}

#ihb-create {
    scroll-margin-top: 3.5rem;
}

@media (max-width: 580px) {
    .ihb-step {
        flex-direction: column;
        align-items: center;
        padding: 0;
        font-size: .82em;
    }

    .ihb-step::after, .ihb-step span::after {
        content: none;
    }

    .ihb-step span {
        display: grid;
        place-items: center;
        width: 1.5rem;
        height: 1.5rem;
        box-sizing: border-box;
        border: 1px solid var(--ihb-border);
        border-radius: 50%;
        background: #fff;
    }

    .ihb-step:is(.is-complete, [aria-current]) span {
        border-color: var(--ihb-accent);
        background: var(--ihb-accent);
        color: #fff;
    }

    .ihb-calendar {
        padding: .65rem;
    }

    .ihb-calendar-navigation h3 {
        width: 100%;
        order: -1;
    }
}
