Files
web/packages/booking-flow/lib/components/BookingWidget/bookingWidget.module.css
Matilda Haneling 6a008ba342 Merged in fix/book-149-incorrect-onfocus-behaviour-booking-widget (pull request #3320)
Fix/book 149 incorrect onfocus behaviour booking widget

* fix(BOOK-149): fixed labels shifting

* fix(BOOK-149): reintroduced sticky position

* fix(BOOK-149): added missing border to "where" text field

* added overflow to datepicker

* comment fixes

* removed separate typography declaration

* changed to onPress

* fix(BOOK-149): moved components to separate files

* fix(BOOK-149): removed desktop & mobile specific css classes

* fix(BOOK-149): new implementation of date and room modals

* dependencies update

* fix(BOOK-149): fixed child age dropdown issue, related error message, and Rooms & Guests container height

* updated info button to new variant

* fix(BOOK-149): prevent scrolling of background when modals are open in Tablet mode

* fixed overlay issue and added focus indicator on mobile

* fixed missing space in css

* rebase and fixed icon buttons after update

* simplified to use explicit boolean

* PR comments fixes

* more PR comment fixes

* PR comment fixes

* fixed setIsOpen((prev) => !prev)

* fixed issues with room error not showing properly on mobile

* fixing pr comments

* fixed flickering on GuestRoomModal


Approved-by: Erik Tiekstra
2026-01-12 14:18:51 +00:00

96 lines
1.9 KiB
CSS

.wrapper {
position: sticky;
z-index: var(--booking-widget-z-index);
width: 100%;
&[data-booking-widget-open="true"] {
z-index: var(--booking-widget-open-z-index);
overflow-y: visible;
.formContainer {
left: 0;
bottom: 0;
width: 100%;
z-index: 1;
}
@media screen and (max-width: 767px) {
.backdrop {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 0;
}
}
}
/* Make sure Date Picker is placed on top of other sticky/fixed components */
&:has([data-datepicker-open="true"]),
&:has([data-rooms-open="true"]) {
z-index: var(--booking-widget-open-z-index);
}
}
.formContainer {
display: grid;
grid-template-rows: auto 1fr;
background-color: var(--UI-Input-Controls-Surface-Normal);
border-radius: 0;
gap: var(--Space-x3);
height: calc(100dvh - max(var(--sitewide-alert-sticky-height), 20px));
width: 100%;
padding: var(--Space-x3) var(--Space-x2);
position: fixed;
left: 0;
bottom: -100%;
overflow-y: auto;
transition: bottom 300ms ease;
&:has([data-searchlist-open="true"]) {
overflow-y: visible;
}
}
.compact {
.formContainer {
border-radius: var(--Corner-radius-lg);
}
}
@media screen and (max-width: 767px) {
.formContainer {
border-radius: var(--Corner-radius-lg) var(--Corner-radius-lg) 0 0;
}
}
.close {
background: none;
border: none;
cursor: pointer;
justify-self: flex-end;
padding: 0;
}
@media screen and (min-width: 768px) {
.wrapper {
top: 0;
}
.formContainer {
display: block;
background-color: var(--Base-Surface-Primary-light-Normal);
box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.05);
height: auto;
position: static;
padding: 0;
overflow-y: visible;
&.compactFormContainer {
box-shadow: none;
}
}
.close {
display: none;
}
}