/* Booking date picker (datepicker.js). Colours, fonts and radii come from each site's theme tokens. */
.dp-trigger { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); font: inherit; font-size: 1rem; text-align: start; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.dp-trigger:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.dp-trigger:focus-visible, .dp-trigger[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft, color-mix(in srgb, var(--accent) 15%, transparent)); }
.dp-trigger[aria-invalid="true"] { border-color: var(--danger, #e5484d); }
.dp-trigger__icon { width: 20px; height: 20px; flex: none; color: var(--accent); }
.dp-trigger__value { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dp-trigger__value.is-empty { color: var(--muted); }
.dp-trigger__chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .2s ease; }
.dp-trigger[aria-expanded="true"] .dp-trigger__chev { transform: rotate(180deg); }

.dp { --dp-soft: var(--soft, color-mix(in srgb, var(--accent) 14%, transparent)); --dp-shift: 18px; position: absolute; z-index: 1000; width: 340px; padding: 16px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-family: var(--font-body); line-height: 1.4; box-shadow: var(--shadow), 0 2px 8px rgba(0, 0, 0, .08); animation: dp-pop .2s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .dp { --dp-shift: -18px; }
.dp button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.dp svg { width: 18px; height: 18px; flex: none; }

.dp__head { display: none; }
.dp__quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dp__chip { display: grid; gap: 3px; padding: 9px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.dp__chip b { font: 600 .875rem/1.2 var(--font-display); }
.dp__chip small { font-size: .75rem; color: var(--muted); }
.dp__chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.dp__chip.is-selected { border-color: var(--accent); background: var(--dp-soft); }
.dp__chip.is-selected small { color: var(--accent-text, var(--accent)); }

.dp__nav { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.dp__title { font: 700 1rem/1.2 var(--font-display); }
.dp__step { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.dp__step:hover:not(:disabled) { background: var(--dp-soft); color: var(--accent-text, var(--accent)); }
.dp__step:disabled { opacity: .3; cursor: default; }

.dp__week, .dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp__week span { padding: 4px 0; text-align: center; font-size: .6875rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dp__grid > span { aspect-ratio: 1; }
.dp__grid.is-next { animation: dp-slide .24s ease; }
.dp__grid.is-prev { animation: dp-slide-back .24s ease; }
.dp__day { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; background: transparent; font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.dp__day:hover:not(:disabled) { background: var(--dp-soft); color: var(--accent-text, var(--accent)); }
.dp__day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dp__day:disabled { opacity: .3; cursor: default; }
.dp__day.is-today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent-text, var(--accent)); }
.dp__day.is-today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dp__day.is-selected, .dp__day.is-selected:hover { background: linear-gradient(145deg, var(--btn-1, var(--accent-2)), var(--btn-2, var(--accent))); color: var(--accent-ink); box-shadow: 0 10px 22px -10px var(--accent); }

.dp__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp__hijri { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.dp__hijri svg { width: 16px; height: 16px; color: var(--accent); }
.dp .dp__clear { min-height: 44px; padding: 4px 6px; border: 0; background: none; font-weight: 600; font-size: .875rem; color: var(--accent-text, var(--accent)); cursor: pointer; }

/* Phones: a bottom sheet over a dimmed page. */
.dp-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(6, 8, 12, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: dp-fade .2s ease; }
.dp.dp--sheet { position: fixed; inset: auto 0 0 0; width: auto; max-width: 520px; max-height: 92vh; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); border-bottom: 0; border-radius: 26px 26px 0 0; animation: dp-up .3s cubic-bezier(.2, .8, .2, 1); }
.dp--sheet::before { content: ""; display: block; width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--line-strong); }
.dp--sheet .dp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dp--sheet .dp__head b { font: 700 1.0625rem/1.2 var(--font-display); }
.dp__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--bg-2); cursor: pointer; }
.dp--sheet .dp__day { font-size: 1rem; border-radius: 14px; }

@keyframes dp-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes dp-up { from { transform: translateY(100%); } }
@keyframes dp-fade { from { opacity: 0; } }
@keyframes dp-slide { from { opacity: 0; transform: translateX(var(--dp-shift)); } }
@keyframes dp-slide-back { from { opacity: 0; transform: translateX(calc(var(--dp-shift) * -1)); } }
@media (prefers-reduced-motion: reduce) { .dp, .dp__grid, .dp-backdrop { animation: none !important; } }
