/* Keep native date pickers inside narrow grid/flex columns, including iOS. */
body input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
}

body input[type="date"],
body select#durationSelect {
    display: block;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 2.75rem;
    min-height: 2.75rem;
}

/* The paired booking controls must use identical metrics on every dashboard. */
body input#bookingDate,
body select#durationSelect {
    margin: 0;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Safari gives the date value its own intrinsic width and alignment. */
body input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

body input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

@media (max-width: 767px) {
    body input[type="date"],
    body input#bookingDate,
    body select#durationSelect {
        /* Prevent Safari from zooming the page when the field receives focus. */
        font-size: 16px;
    }
}

/* Mobile booking is deliberately step based: slot selection comes before contact details. */
@media (max-width: 1023px) {
    #bookingForm.mobile-flow {
        display: flex;
        flex-direction: column;
    }

    #bookingForm .mobile-slots-panel {
        order: 1;
    }

    #bookingForm .mobile-details-panel {
        order: 2;
    }

    #bookingForm .mobile-slots-panel .mobile-duration-row {
        margin-bottom: 1.25rem;
    }

    #bookingForm .mobile-customer-details.mobile-details-hidden {
        display: none;
    }
}
