.lswh,
.lswh-cal,
.lswh-sticky,
.lswh-modal {
--_accent: var(--lswh-accent, var(--e-global-color-accent, var(--wp--preset--color--primary, #1a1a1a)));
--_accent-text: var(--lswh-accent-text, #fff);
--_radius: var(--lswh-radius, 6px);
--_height: var(--lswh-height, 48px);
--_gap: var(--lswh-gap, 12px);
--_range: color-mix(in srgb, var(--_accent) 14%, #fff);
--_ring: color-mix(in srgb, var(--_accent) 25%, transparent);
}
@supports not (color: color-mix(in srgb, red, blue)) {
.lswh, .lswh-cal, .lswh-sticky, .lswh-modal { --_range: #eeeeee; --_ring: rgba(0, 0, 0, .12); }
} .lswh {
box-sizing: border-box;
width: 100%;
container-type: inline-size;
font-family: var(--lswh-font, inherit);
font-size: var(--lswh-font-size, inherit);
line-height: 1.3;
background: var(--lswh-bg, transparent);
padding: var(--lswh-padding, 0);
border-radius: calc(var(--_radius) * 1.6);
}
.lswh *,
.lswh *::before,
.lswh *::after { box-sizing: border-box; }
.lswh--align-center { margin-left: auto; margin-right: auto; }
.lswh--align-right { margin-left: auto; }
.lswh--shadow-soft { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.lswh--shadow-strong { box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
.lswh .lswh__form {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: var(--_gap);
margin: 0;
padding: 0;
border: 0;
background: none;
}
.lswh .lswh__field {
display: flex;
flex-direction: column;
gap: 6px;
flex: 1 1 110px;
min-width: 0;
margin: 0;
}
.lswh .lswh__field--date { flex: 1.5 1 165px; }
.lswh .lswh__field--submit { flex: 1 0 auto; }
.lswh .lswh__label {
display: block;
margin: 0;
padding: 0;
font-size: .78em;
font-weight: 600;
line-height: 1.2;
letter-spacing: .04em;
text-transform: uppercase;
color: var(--lswh-label, inherit);
opacity: .85;
}
.lswh-sr {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.lswh .lswh__control {
-webkit-appearance: none;
appearance: none;
display: flex;
align-items: center;
gap: 10px;
width: 100%;
max-width: none;
height: var(--_height);
min-height: var(--_height);
margin: 0;
padding: 0 14px;
font: inherit;
font-size: 1em;
font-weight: 400;
line-height: 1.2;
letter-spacing: normal;
text-align: left;
text-transform: none;
color: var(--lswh-field-text, #1a1a1a);
background-color: var(--lswh-field-bg, #fff);
border: 1px solid var(--lswh-border, rgba(0, 0, 0, .18));
border-radius: var(--_radius);
box-shadow: none;
cursor: pointer;
transition: border-color .15s ease, box-shadow .15s ease;
}
.lswh select.lswh__control {
padding-right: 38px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 14px center;
background-size: 12px 8px;
}
.lswh .lswh__control:hover { border-color: color-mix(in srgb, var(--_accent) 55%, transparent); }
.lswh .lswh__control:focus,
.lswh .lswh__control:focus-visible,
.lswh .lswh__control[aria-expanded="true"] {
outline: none;
border-color: var(--_accent);
box-shadow: 0 0 0 3px var(--_ring);
}
.lswh .lswh__icon { flex: 0 0 auto; width: 18px; height: 18px; opacity: .55; }
.lswh .lswh__date-value {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.lswh .lswh__submit {
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: var(--_height);
margin: 0;
font-family: inherit;
white-space: nowrap;
cursor: pointer;
}
.lswh:not(.lswh--theme-button) .lswh__submit {
height: var(--_height);
padding: 0 28px;
font-size: 1em;
font-weight: 600;
line-height: 1;
letter-spacing: .01em;
text-transform: none;
color: var(--_accent-text);
background: var(--_accent);
border: 0;
border-radius: var(--_radius);
box-shadow: none;
transition: filter .15s ease, transform .1s ease;
}
.lswh:not(.lswh--theme-button) .lswh__submit:hover { filter: brightness(.9); }
.lswh:not(.lswh--theme-button) .lswh__submit:active { transform: translateY(1px); }
.lswh .lswh__submit:focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; } .lswh--vertical .lswh__form {
display: grid;
grid-template-columns: 1fr 1fr;
}
.lswh--vertical .lswh__field--submit { grid-column: 1 / -1; } @container (max-width: 620px) {
.lswh--horizontal .lswh__form { display: grid; grid-template-columns: 1fr 1fr; }
.lswh--horizontal .lswh__field--submit { grid-column: 1 / -1; }
}
@container (max-width: 380px) {
.lswh .lswh__icon { display: none; }
.lswh .lswh__control { padding-left: 12px; }
}
@supports not (container-type: inline-size) {
@media (max-width: 640px) {
.lswh--horizontal .lswh__form { display: grid; grid-template-columns: 1fr 1fr; }
.lswh--horizontal .lswh__field--submit { grid-column: 1 / -1; }
}
} .lswh-cal {
position: absolute;
top: 0;
left: 0;
z-index: 100000;
box-sizing: border-box;
width: max-content;
max-width: calc(100vw - 16px);
padding: 18px 18px 14px;
font-size: 15px;
line-height: 1.2;
color: #1a1a1a;
background: #fff;
border-radius: 14px;
box-shadow: 0 20px 56px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
-webkit-font-smoothing: antialiased;
}
.lswh-cal[hidden], .lswh-backdrop[hidden], .lswh-modal[hidden] { display: none !important; }
.lswh-cal *, .lswh-cal *::before, .lswh-cal *::after { box-sizing: border-box; }
.lswh-cal__months { position: relative; display: flex; gap: 32px; }
.lswh-cal__title {
margin: 0 0 12px;
padding: 0 40px;
font-size: 1em;
font-weight: 600;
line-height: 36px;
text-align: center;
text-transform: capitalize;
}
.lswh-cal__nav {
position: absolute;
top: 0;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
margin: 0;
padding: 0;
color: inherit;
background: transparent;
border: 0;
border-radius: 50%;
cursor: pointer;
}
.lswh-cal__prev { left: 0; }
.lswh-cal__next { right: 0; }
.lswh-cal__nav:hover:not(:disabled) { background: #f1f1f1; }
.lswh-cal__nav:disabled { opacity: .25; cursor: default; }
.lswh-cal__nav:focus-visible { outline: 2px solid var(--_accent); outline-offset: 1px; }
.lswh-cal__grid {
display: grid;
grid-template-columns: repeat(7, 42px);
row-gap: 2px;
}
.lswh-cal__dow {
padding: 2px 0 8px;
font-size: .72em;
font-weight: 600;
text-align: center;
text-transform: uppercase;
color: #8a8a8a;
}
.lswh-cal__day {
-webkit-appearance: none;
appearance: none;
position: relative;
display: block;
width: 42px;
height: 42px;
margin: 0;
padding: 0;
font: inherit;
font-size: .92em;
color: inherit;
background: transparent;
border: 0;
border-radius: 0;
cursor: pointer;
}
.lswh-cal__day > span {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
border-radius: 50%;
transition: background-color .1s ease;
}
.lswh-cal__day:hover:not([aria-disabled="true"]) > span { background: #efefef; }
.lswh-cal__day:focus { outline: none; }
.lswh-cal__day:focus-visible > span { box-shadow: inset 0 0 0 2px var(--_accent); }
.lswh-cal__day.is-today > span { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lswh-cal__day[aria-disabled="true"] { color: #c8c8c8; cursor: default; }
.lswh-cal__day.is-closed > span { text-decoration: line-through; }
.lswh-cal__day.is-muted { color: #9a9a9a; }
.lswh-cal__day.is-range { background: var(--_range); }
.lswh-cal__day.is-start.has-range { background: linear-gradient(90deg, transparent 50%, var(--_range) 50%); }
.lswh-cal__day.is-end { background: linear-gradient(90deg, var(--_range) 50%, transparent 50%); }
.lswh-cal__day.is-start > span,
.lswh-cal__day.is-end > span,
.lswh-cal__day.is-start:hover > span,
.lswh-cal__day.is-end:hover > span {
font-weight: 600;
color: var(--_accent-text);
background: var(--_accent);
}
.lswh-cal__foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: 12px;
padding-top: 12px;
font-size: .88em;
border-top: 1px solid #eee;
}
.lswh-cal__info { color: #555; }
.lswh-cal__done {
flex: 0 0 auto;
margin: 0;
padding: 9px 20px;
font: inherit;
font-weight: 600;
color: var(--_accent-text);
background: var(--_accent);
border: 0;
border-radius: var(--_radius);
cursor: pointer;
}
.lswh-cal__done:hover { filter: brightness(.9); } .lswh-cal.is-sheet {
position: fixed;
top: auto !important;
right: 0;
bottom: 0;
left: 0 !important;
width: 100%;
max-width: none;
max-height: 92vh;
overflow-y: auto;
padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
border-radius: 20px 20px 0 0;
animation: lswh-up .22s ease-out;
}
.lswh-cal.is-sheet .lswh-cal__months { display: block; }
.lswh-cal.is-sheet .lswh-cal__grid { grid-template-columns: repeat(7, 1fr); }
.lswh-cal.is-sheet .lswh-cal__day { width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 54px; font-size: 1em; }
.lswh-cal.is-sheet .lswh-cal__done { padding: 12px 24px; }
.lswh-backdrop {
position: fixed;
inset: 0;
z-index: 99999;
background: rgba(0, 0, 0, .4);
}
html.lswh-lock, html.lswh-lock body { overflow: hidden; }
@keyframes lswh-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } } .lswh-sticky {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 9990;
display: none;
padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
font-family: var(--lswh-font, inherit);
background: #fff;
box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
transition: transform .25s ease;
}
@media (max-width: 768px) {
.lswh-sticky { display: block; }
}
.lswh-sticky.is-hidden { transform: translateY(115%); }
.lswh-sticky__btn {
display: block;
width: 100%;
height: 50px;
margin: 0;
font: inherit;
font-size: 16px;
font-weight: 700;
color: var(--_accent-text);
background: var(--_accent);
border: 0;
border-radius: var(--_radius);
cursor: pointer;
}
.lswh-modal {
position: fixed;
inset: 0;
z-index: 99990;
display: flex;
align-items: flex-end;
justify-content: center;
font-family: var(--lswh-font, inherit);
background: rgba(0, 0, 0, .45);
}
.lswh-modal__panel {
width: 100%;
max-width: 520px;
max-height: 92vh;
overflow-y: auto;
padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
color: #1a1a1a;
background: #fff;
border-radius: 20px 20px 0 0;
animation: lswh-up .22s ease-out;
}
@media (min-width: 769px) {
.lswh-modal { align-items: center; }
.lswh-modal__panel { border-radius: 16px; padding: 22px; }
}
.lswh-modal__head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
}
.lswh-modal__title { font-size: 1.15em; font-weight: 700; }
.lswh-modal__close {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin: 0;
padding: 0;
color: inherit;
background: #f2f2f2;
border: 0;
border-radius: 50%;
cursor: pointer;
}
.lswh-modal .lswh { color: #1a1a1a; }
@media (prefers-reduced-motion: reduce) {
.lswh-cal.is-sheet, .lswh-modal__panel { animation: none; }
.lswh-sticky { transition: none; }
}