pxsol-booking-search-widget
Version:
Embeddable booking engine search widget with React and Web Component builds.
1,474 lines (1,473 loc) • 28.8 kB
CSS
/* src/Widget.module.css */
.title {
font-size: 1rem;
margin: 0 0 0.5rem 0;
}
.container {
width: 100%;
}
.searchBar {
position: relative;
display: grid;
grid-template-columns: 1fr;
gap: 6px;
background: #ffffff;
padding: 8px;
border-radius: 10px;
border: 1px solid rgba(15, 23, 42, 0.08);
box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
transition: box-shadow 160ms ease, border-color 160ms ease;
}
@media (min-width: 600px) {
.searchBar {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
padding: 8px 10px;
}
}
@media (min-width: 768px) {
.searchBar {
grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(190px, 1fr);
grid-template-areas: "a b c d";
align-items: stretch;
background: #ffffff;
border-radius: 10rem;
column-gap: 8px;
padding: 8px 10px;
box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}
.searchBar.noPromoCode {
grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(160px, 0.9fr);
}
.actions {
grid-area: d;
display: flex;
align-items: center;
gap: 12px;
width: 100%;
height: auto;
justify-content: flex-end;
}
.promoInput {
width: 100%;
}
}
.segment {
position: relative;
border-radius: 8px;
padding: 5px 7px;
z-index: auto;
cursor: pointer;
background: rgba(255, 255, 255, 0.92);
border: 1px solid transparent;
transition:
background-color 160ms ease,
box-shadow 160ms ease,
border-color 160ms ease;
}
.segment:hover {
background-color: rgba(248, 250, 252, 0.95);
border-color: rgba(15, 23, 42, 0.12);
box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
.segmentActive {
background: rgba(246, 248, 252, 0.96);
border-color: var(--accent-border, rgba(31, 41, 55, 0.28));
box-shadow: 0 0 0 1px var(--accent-border, rgba(31, 41, 55, 0.28));
z-index: 5;
}
.fadeIn {
animation: fadeIn 220ms ease both;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateX(0);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeSlideInLeft {
from {
opacity: 0;
transform: translateX(-12px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeSlideInRight {
from {
opacity: 0;
transform: translateX(12px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.bgFadeIn {
animation: fadeIn 220ms ease both;
}
.bgFadeInFromLeft {
animation: fadeSlideInLeft 260ms ease both;
}
.bgFadeInFromRight {
animation: fadeSlideInRight 260ms ease both;
}
.segmentBg {
position: absolute;
inset: 0;
background: var(--accent-surface, rgba(31, 41, 55, 0.08));
border: 1px solid var(--accent-border, rgba(31, 41, 55, 0.18));
box-shadow: none;
border-radius: inherit;
opacity: 0;
transition: opacity 200ms ease;
z-index: 0;
pointer-events: none;
}
.segmentActive .segmentBg {
opacity: 1;
}
.segment > :not(.segmentBg) {
z-index: 1;
}
@media (min-width: 768px) {
.segment {
border: none;
border-radius: 10rem;
padding: 6px 10px;
min-width: 0;
}
}
.segmentLabel {
position: relative;
display: block;
font-size: 10px;
font-weight: 600;
color: #6b7280;
margin-bottom: 1px;
white-space: nowrap;
}
.segmentButton {
all: unset;
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 13px;
line-height: 1.35;
color: #111827;
cursor: pointer;
padding: 1px 0;
position: relative;
border-radius: 10px;
transition: color 180ms ease;
white-space: normal;
overflow-wrap: anywhere;
flex-wrap: wrap;
width: 100%;
text-align: left;
user-select: none;
min-height: 22px;
}
.segmentButton:focus-visible {
outline: 2px solid var(--accent-outline, rgba(31, 41, 55, 0.45));
outline-offset: 2px;
}
.segmentButton[aria-pressed=true] {
color: #0f172a;
}
.inputBare {
width: 100%;
border: none;
outline: none;
background: transparent;
font-size: 14px;
padding: 2px 0;
}
.suggestions {
position: absolute;
z-index: 20;
top: 100%;
left: 0;
right: 0;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 12px;
margin-top: 6px;
box-shadow: 0 10px 30px rgba(17, 24, 39, 0.14);
padding: 6px;
max-height: 260px;
overflow: auto;
}
.suggestionItem {
display: flex;
width: 100%;
text-align: left;
background: transparent;
border: none;
padding: 10px 8px;
border-radius: 10px;
cursor: pointer;
font-size: 14px;
}
.suggestionItem:hover {
background: #f3f4f6;
}
.popover {
position: absolute;
z-index: 100;
top: calc(100% + 6px);
left: 0;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 16px;
box-shadow: 0 10px 30px rgba(17, 24, 39, 0.14);
padding: 12px;
min-width: 280px;
}
.popoverRow {
display: grid;
grid-template-columns: 1fr;
gap: 8px;
}
@media (min-width: 480px) {
.popoverRow {
grid-template-columns: 1fr 1fr;
}
}
.popoverActions {
display: flex;
justify-content: flex-end;
margin-top: 8px;
}
.secondaryBtn {
background: transparent;
border: 1px solid rgba(17, 24, 39, 0.2);
color: #111827;
border-radius: 999px;
padding: 6px 12px;
cursor: pointer;
}
.actions {
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: 0.75rem;
align-items: stretch;
width: 100%;
position: relative;
z-index: 0;
}
.promoRow {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
flex: 1 1 auto;
position: relative;
z-index: 1;
}
.promoInput {
background: #ffffff;
border: 1px solid rgba(15, 23, 42, 0.14);
border-radius: 10px;
padding: 6px 9px;
font-size: 13px;
color: #111827;
min-width: 140px;
transition: border-color 160ms ease, box-shadow 160ms ease;
}
.promoInput:focus {
border-color: var(--accent-border, rgba(31, 41, 55, 0.28));
box-shadow: 0 0 0 3px var(--accent-surface, rgba(31, 41, 55, 0.12));
}
.searchBtn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--primary-color, #1f2937);
color: #fff;
border: none;
border-radius: 10px;
padding: 8px 14px;
cursor: pointer;
box-shadow: 0 8px 20px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.28));
width: 100%;
transition:
transform 160ms ease,
box-shadow 160ms ease,
filter 160ms ease;
}
.searchBtn:hover {
transform: translateY(-1px);
box-shadow: 0 12px 24px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.32));
filter: brightness(1.05);
}
.searchBtn:active {
transform: translateY(0);
box-shadow: 0 6px 16px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.26));
filter: brightness(0.95);
}
@media (min-width: 768px) {
.actions {
flex-direction: row;
align-items: flex-start;
gap: 10px;
width: 100%;
padding-inline-end: 12px;
justify-content: flex-end ;
}
.searchBtn {
max-width: 168px;
padding: 8px 16px;
}
}
.searchText {
font-weight: 600;
}
.spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.searchBtn:disabled {
opacity: 0.8;
cursor: not-allowed;
}
.advanced {
margin-top: 10px;
}
.redirectRow {
display: flex;
gap: 8px;
align-items: center;
}
.visuallyHidden {
position: absolute ;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.stickyMiniMobile {
position: fixed;
bottom: 10px;
left: 10px;
z-index: 1000;
background: var(--primary-color, #1f2937);
color: #fff;
border: none;
border-radius: 10px;
padding: 9px 14px;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 0 6px 16px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.28));
cursor: pointer;
font-weight: 600;
font-size: 13px;
transition: all 200ms ease, filter 200ms ease;
}
.stickyMiniMobileTop {
bottom: auto;
top: 20px;
}
.stickyMiniMobile:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.32));
filter: brightness(1.05);
}
.stickyMiniMobile:active {
transform: translateY(0);
filter: brightness(0.95);
}
@media (min-width: 768px) {
.stickyMiniMobile {
display: none;
}
}
.stickyBar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
background: #fff;
border-bottom: 1px solid rgba(17, 24, 39, 0.12);
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
padding: 8px;
display: none;
}
@media (min-width: 768px) {
.stickyBar {
display: block;
}
}
.stickyBarButton {
all: unset;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
max-width: 1000px;
margin: 0 auto;
cursor: pointer;
}
.stickyBarMini {
display: flex;
align-items: center;
background: rgba(248, 250, 252, 0.95);
border: 1px solid rgba(17, 24, 39, 0.1);
border-radius: 14px;
padding: 0;
gap: 0;
box-shadow: none;
transition: all 200ms ease;
}
.stickyBarButton:hover .stickyBarMini {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.stickyBarSearchBtn {
all: unset;
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--primary-color, #1f2937);
color: #fff ;
border: none;
border-radius: 12px;
padding: 6px 12px;
cursor: pointer;
font-size: 13px;
font-weight: 600;
box-shadow: 0 4px 12px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.24));
transition: all 200ms ease, filter 200ms ease;
white-space: nowrap;
margin-inline: 8px;
}
.stickyBarSearchBtn:hover {
transform: translateY(-1px);
box-shadow: 0 6px 16px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.28));
filter: brightness(1.05);
color: #fff ;
}
.stickyBarSearchBtn:active {
transform: translateY(0);
filter: brightness(0.95);
color: #fff ;
}
.stickyBarSearchBtn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none ;
color: #fff ;
}
.stickyBarSegment {
display: flex;
flex-direction: column;
padding: 6px 12px;
gap: 1px;
position: relative;
flex: 1 1 0;
min-width: 0;
}
.stickyBarSegment:not(:last-child) {
border-right: 1px solid rgba(17, 24, 39, 0.12);
}
.stickyBarLabel {
font-size: 10px;
font-weight: 600;
color: #6b7280;
}
.stickyBarValue {
font-size: 12px;
color: #111827;
font-weight: 500;
line-height: 1.3;
white-space: normal;
overflow-wrap: anywhere;
}
.stickyBarButton svg {
flex-shrink: 0;
color: #111827;
}
.calendarOverlayHost {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
z-index: 1200;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 16px 8px 24px;
}
.calendarOverlayHost > div {
width: 100%;
max-width: 900px;
}
.groups {
display: grid;
gap: 0.75rem;
border: 1px dashed rgba(17, 24, 39, 0.15);
padding: 0.75rem;
border-radius: 8px;
}
.group {
display: grid;
gap: 0.5rem;
}
.groupControls {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.groupControls label {
flex: 1;
min-width: 120px;
}
.summary {
font-size: 0.85rem;
opacity: 0.8;
}
.secondaryBtn {
background: transparent;
border: 1px solid rgba(17, 24, 39, 0.2);
color: inherit;
border-radius: 999px;
padding: 0.55rem 1rem;
cursor: pointer;
}
.error {
color: #dc2626;
font-size: 0.85rem;
font-weight: 500;
padding: 10px 16px;
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: 8px;
margin-top: 12px;
display: flex;
align-items: center;
gap: 8px;
}
.error::before {
content: "\26a0\fe0f";
font-size: 1.2rem;
}
.actions {
display: flex;
justify-content: space-between;
gap: 0.75rem;
align-items: center;
}
@media (max-width: 767px) {
.searchBar {
display: none;
}
.searchBar.mobileExpanded {
display: grid;
position: relative;
}
.actions {
width: 100%;
height: auto;
}
.searchBtn {
width: 100%;
justify-content: center;
min-height: 44px;
}
}
.mobileReserveButton {
display: none;
}
@media (max-width: 767px) {
.mobileReserveButton {
display: inline-flex;
align-items: center;
gap: 8px;
background: var(--primary-color, #1f2937);
color: #fff;
border: none;
border-radius: 10px;
padding: 12px 18px;
cursor: pointer;
box-shadow: 0 6px 16px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.28));
width: 100%;
font-weight: 600;
font-size: 16px;
transition: all 200ms ease, filter 200ms ease;
justify-content: center;
}
.mobileReserveButton:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px var(--primary-shadow-rgba, rgba(31, 41, 55, 0.32));
filter: brightness(1.05);
}
.mobileReserveButton:active {
transform: translateY(0);
filter: brightness(0.95);
}
.mobileReserveButton:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none ;
}
.mobileCloseButton {
position: absolute;
top: 10px;
right: 10px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.05);
border: none;
border-radius: 50%;
font-size: 24px;
color: #6b7280;
cursor: pointer;
z-index: 100;
transition: all 150ms ease;
padding: 0;
line-height: 1;
}
.mobileCloseButton:hover {
background: rgba(0, 0, 0, 0.1);
color: #111827;
}
.mobileCloseButton:active {
background: rgba(0, 0, 0, 0.15);
}
}
.guestsModal {
padding: 0;
min-width: 320px;
max-width: 400px;
}
@media (max-width: 480px) {
.popover {
left: 50%;
right: auto;
transform: translateX(-50%);
width: calc(100vw - 24px);
min-width: 0;
box-sizing: border-box;
}
.guestsModal {
width: 100%;
max-width: none;
min-width: 0;
}
}
.guestsHeader {
padding: 16px 20px 12px;
border-bottom: 1px solid rgba(17, 24, 39, 0.1);
}
.guestsTitle {
font-size: 16px;
font-weight: 600;
color: #111827;
margin: 0 0 4px 0;
}
.guestsSubtitle {
font-size: 13px;
color: #6b7280;
margin: 0;
}
.guestsContent {
padding: 16px 20px;
}
.roomGroup {
background: transparent;
border: none;
border-radius: 0;
padding: 16px 0;
margin-bottom: 0;
}
.roomGroup:last-child {
margin-bottom: 0;
}
.roomHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.roomTitle {
font-size: 14px;
font-weight: 600;
color: #111827;
margin: 0;
}
.removeRoomBtn {
background: transparent;
border: 1px solid rgba(239, 68, 68, 0.3);
color: #dc2626;
border-radius: 6px;
padding: 4px 8px;
font-size: 12px;
cursor: pointer;
transition: all 150ms ease;
}
.removeRoomBtn:hover {
background: rgba(239, 68, 68, 0.05);
border-color: rgba(239, 68, 68, 0.5);
}
.counterGroup {
display: flex;
flex-direction: column;
gap: 0;
}
.counterItem {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 16px;
margin-bottom: 16px;
border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}
.counterItem:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.counterText {
flex: 1;
display: flex;
flex-direction: column;
}
.ageHelperText {
font-size: 11px;
color: #9ca3af;
margin-top: 4px;
padding-left: 4px;
}
.counterLabel {
font-size: 13px;
font-weight: 500;
color: #374151;
margin-bottom: 2px;
}
.counterDescription {
font-size: 12px;
color: #9ca3af;
margin-bottom: 0;
}
.counterControl {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 8px;
padding: 8px 12px;
min-width: 100px;
}
.counterBtn {
background: transparent;
border: none;
color: #6b7280;
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: all 150ms ease;
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
}
.counterBtn:hover {
background: rgba(17, 24, 39, 0.05);
color: #111827;
}
.counterBtn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.counterValue {
font-size: 14px;
font-weight: 500;
color: #111827;
min-width: 20px;
text-align: center;
}
.childrenAgesInput {
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 8px;
padding: 8px 12px;
font-size: 14px;
color: #111827;
width: 100%;
}
.childrenAgesInput::placeholder {
color: #9ca3af;
}
.ageSelectGrid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
margin-top: 8px;
}
.select {
position: relative;
}
.selectButton {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 8px;
padding: 8px 12px;
font-size: 14px;
color: #111827;
cursor: pointer;
}
.selectOptions {
position: absolute;
z-index: 25;
top: calc(100% + 6px);
left: 0;
right: 0;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.12);
border-radius: 8px;
box-shadow: 0 10px 30px rgba(17, 24, 39, 0.14);
max-height: 220px;
overflow: auto;
}
.selectOption {
width: 100%;
text-align: left;
padding: 8px 12px;
background: transparent;
border: none;
cursor: pointer;
}
.selectOption:hover {
background: rgba(17, 24, 39, 0.05);
}
.addRoomBtn {
background: transparent;
border: 1px dashed rgba(17, 24, 39, 0.3);
color: #6b7280;
border-radius: 8px;
padding: 12px;
cursor: pointer;
transition: all 150ms ease;
width: 100%;
font-size: 14px;
margin-top: 8px;
}
.addRoomBtn:hover {
border-color: rgba(17, 24, 39, 0.5);
color: #111827;
background: rgba(17, 24, 39, 0.02);
}
.guestsSummary {
background: rgba(17, 24, 39, 0.02);
border: 1px solid rgba(17, 24, 39, 0.08);
border-radius: 8px;
padding: 12px;
margin-top: 16px;
}
.guestsSummaryText {
font-size: 13px;
color: #6b7280;
margin: 0;
text-align: center;
}
.guestsActions {
padding: 16px 20px;
border-top: 1px solid rgba(17, 24, 39, 0.1);
display: flex;
justify-content: flex-end;
}
.doneBtn {
background: var(--primary-color, #1f2937);
color: #fff;
border: none;
border-radius: 10px;
padding: 9px 18px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease, filter 150ms ease;
}
.doneBtn:hover {
transform: translateY(-1px);
filter: brightness(1.05);
}
.doneBtn:active {
transform: translateY(0);
filter: brightness(0.95);
}
.nightAdjustment {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.1);
border-radius: 12px;
margin-bottom: 12px;
}
.nightAdjustmentLabel {
font-size: 14px;
font-weight: 500;
color: #374151;
white-space: nowrap;
}
.nightAdjustmentControls {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
}
.nightAdjustmentBtn {
background: #f3f4f6;
border: 1px solid rgba(17, 24, 39, 0.12);
color: #111827;
border-radius: 8px;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 150ms ease;
font-size: 18px;
font-weight: 600;
}
.nightAdjustmentBtn:hover:not(:disabled) {
background: #e5e7eb;
border-color: rgba(17, 24, 39, 0.2);
}
.nightAdjustmentBtn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.nightAdjustmentValue {
font-size: 16px;
font-weight: 600;
color: #111827;
min-width: 32px;
text-align: center;
}
.mobileStickyModal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.55);
z-index: 1100;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 16px;
overflow-y: auto;
animation: fadeIn 200ms ease;
}
.mobileStickyModalContent {
width: 100%;
max-width: 500px;
background: #fff;
border-radius: 16px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
margin: auto;
max-height: 90vh;
display: flex;
flex-direction: column;
animation: slideUp 300ms ease;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.mobileStickyModalHeader {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
border-bottom: 1px solid rgba(17, 24, 39, 0.1);
position: sticky;
top: 0;
background: #fff;
border-radius: 16px 16px 0 0;
z-index: 10;
}
.mobileStickyModalTitle {
font-size: 18px;
font-weight: 600;
color: #111827;
margin: 0;
}
.mobileStickyModalClose {
all: unset;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background: rgba(17, 24, 39, 0.05);
cursor: pointer;
transition: all 150ms ease;
color: #6b7280;
}
.mobileStickyModalClose:hover {
background: rgba(17, 24, 39, 0.1);
color: #111827;
}
.mobileStickyCalendar {
padding: 0 16px 16px;
max-height: calc(90vh - 200px);
overflow-y: auto;
}
/* src/components/Calendar.module.css */
.calendarOverlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 20px;
}
.calendarModal {
background: #ffffff;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
max-width: 900px;
width: 755px;
max-height: 90vh;
overflow: hidden;
display: flex;
flex-direction: column;
position: absolute;
margin-top: 30px;
z-index: 1;
}
.calendarHeader {
display: flex;
justify-content: center;
align-items: center;
padding: 20px 24px;
border-bottom: 1px solid #e5e7eb;
}
.navButton {
background: #ffffff;
border: 1px solid #e5e7eb;
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #374151;
padding: 0;
border-radius: 999px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
margin: 0 8px;
}
.navButton:hover {
background: #f3f4f6;
border-color: #d1d5db;
}
.calendarHeader > h2 {
margin: 0 20px;
}
.calendarHeader .closeButton {
margin-left: auto;
}
.calendarHeader h2 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #111827;
}
.closeButton {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #6b7280;
padding: 4px;
border-radius: 50%;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.closeButton:hover {
background-color: #f3f4f6;
color: #111827;
}
.calendarContent {
flex: 1;
overflow-y: auto;
padding: 20px 24px;
}
.monthCards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 0;
}
.monthCard {
position: relative;
background: transparent;
border-radius: 0;
padding: 20px;
border: none;
box-shadow: none;
}
.monthCard:not(:last-child)::after {
content: "";
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 1px;
background-color: #e5e7eb;
}
.monthHeader {
margin-bottom: 16px;
}
.monthTitle {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #111827;
}
.calendarGrid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 4px;
}
.dayHeader {
display: flex;
align-items: center;
justify-content: center;
height: 32px;
font-size: 12px;
font-weight: 600;
color: #6b7280;
text-transform: uppercase;
}
.dayButton {
display: flex;
align-items: center;
justify-content: center;
height: 40px;
width: 40px;
border: none;
background: transparent;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
color: #374151;
transition: all 0.2s ease;
position: relative;
}
.dayButton:hover:not(.disabled) {
background-color: #f3f4f6;
color: #111827;
}
.dayButton:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
.otherMonth {
color: #d1d5db;
visibility: hidden;
}
.pastDay {
color: #d1d5db;
text-decoration: line-through;
opacity: 0.5;
}
.today {
background-color: #dbeafe;
color: #1d4ed8;
font-weight: 600;
}
.weekend {
background-color: var(--calendar-weekend-bg, transparent);
}
.today:hover {
background-color: #bfdbfe;
}
.selected {
background-color: #111827;
color: white;
font-weight: 600;
}
.selected:hover {
background-color: #374151;
}
.checkIn {
background-color: #111827;
color: white;
font-weight: 600;
z-index: 2;
position: relative;
transition: background-color 0.2s ease, color 0.2s ease;
}
.checkOut {
background-color: #111827;
color: white;
font-weight: 600;
z-index: 2;
position: relative;
transition: background-color 0.2s ease, color 0.2s ease;
}
.inRange {
background-color: var(--calendar-range-bg, #e5e7eb);
color: #111827;
position: relative;
}
.inRange::before {
content: "";
position: absolute;
top: 0;
left: -2px;
right: -2px;
bottom: 0;
background-color: var(--calendar-range-bg, #e5e7eb);
z-index: -1;
}
.checkIn::after {
content: none;
}
.checkOut::before {
content: none;
}
.disabled {
color: #d1d5db;
cursor: not-allowed;
background-color: transparent;
}
.disabled:hover {
background-color: transparent;
color: #d1d5db;
}
.calendarFooter {
padding: 20px 24px;
border-top: 1px solid #e5e7eb;
display: flex;
flex-direction: column;
gap: 16px;
background-color: #fafafa;
}
.calendarFooterTop {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
}
.dateSummary {
display: flex;
gap: 24px;
}
.selectedDate {
display: flex;
flex-direction: column;
gap: 4px;
}
.dateLabel {
font-size: 12px;
font-weight: 500;
color: #6b7280;
text-transform: uppercase;
}
.dateValue {
font-size: 14px;
font-weight: 600;
color: #111827;
}
.doneButton {
background: var(--primary-color, #111827);
color: white;
border: none;
border-radius: 8px;
padding: 10px 20px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s;
}
.doneButton:hover {
background-color: var(--primary-color-hover, #374151);
}
.nightAdjustment {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: #fff;
border: 1px solid rgba(17, 24, 39, 0.1);
border-radius: 12px;
margin-bottom: 12px;
}
.nightAdjustmentLabel {
font-size: 14px;
font-weight: 500;
color: #374151;
white-space: nowrap;
}
.nightAdjustmentControls {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
}
.nightAdjustmentBtn {
background: #f3f4f6;
border: 1px solid rgba(17, 24, 39, 0.12);
color: #111827;
border-radius: 8px;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 150ms ease;
font-size: 18px;
font-weight: 600;
}
.nightAdjustmentBtn:hover:not(:disabled) {
background: #e5e7eb;
border-color: rgba(17, 24, 39, 0.2);
}
.nightAdjustmentBtn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.nightAdjustmentValue {
font-size: 16px;
font-weight: 600;
color: #111827;
min-width: 48px;
text-align: center;
}
@media (max-width: 768px) {
.calendarOverlay {
padding: 10px;
}
.calendarModal {
max-height: 95vh;
width: calc(100vw - 24px);
left: 50%;
transform: translateX(-50%);
right: auto;
margin-top: 12px;
z-index: 1000;
}
.calendarHeader {
padding: 16px 20px;
}
.calendarContent {
padding: 16px 20px;
}
.monthCard {
padding: 16px;
}
.calendarFooter {
padding: 16px 20px;
flex-direction: column;
gap: 16px;
align-items: stretch;
}
.nightAdjustment {
width: 100%;
}
.nightAdjustmentControls {
margin-left: 0;
justify-content: center;
}
.calendarFooterTop {
flex-direction: column;
align-items: stretch;
}
.dateSummary {
justify-content: center;
gap: 16px;
width: 100%;
}
.doneButton {
width: 100%;
}
.monthCard:not(:last-child)::after {
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: auto;
height: 1px;
width: 100%;
}
.monthCards {
gap: 1px;
}
.dayButton {
height: 36px;
width: 36px;
font-size: 13px;
}
}
@media (max-width: 480px) {
.calendarGrid {
gap: 2px;
}
.dayButton {
height: 32px;
width: 32px;
font-size: 12px;
}
.monthCards {
gap: 16px;
}
.calendarModal {
width: calc(100vw - 16px);
border-radius: 12px;
}
}
/*# sourceMappingURL=index.css.map */