/*
 * Dynamic-pricing booking grid styles
 * ===================================
 * Loaded only when the page is rendered with ?ux=v2 (see space-details.blade.php).
 * Most selectors are prefixed `.dp-` so they can't leak into the legacy tab
 * markup that sits alongside them for the duration of the feature-flag window.
 *
 * The block at the very bottom (".popcalender" overrides) is the one exception:
 * those rules need to override the legacy fixed-width 683px popup so the v2
 * grid has room to breathe. Because this entire file is only loaded when ?ux=v2
 * is active, those legacy overrides won't affect the v1 page.
 *
 * The visual spec for these styles comes from
 *   public/docs/minimum-price-refundable-blueprint.html  §§ 8.1 – 8.8
 * Notable design tokens (matched against resources/sass/_variables.scss):
 *   --dp-primary  = #0f2a5f   (TKO primary)
 *   --dp-accent   = #005c9f
 *   --dp-success  = #4fa851
 *   --dp-warning  = #ffa012
 */

.dp-root {
    --dp-primary: #0f2a5f;
    --dp-accent: #005c9f;
    --dp-success: #4fa851;
    --dp-warning: #ffa012;
    --dp-text: #1d2429;
    --dp-muted: #888;
    --dp-border: #dce1e8;
    --dp-bg-muted: #fafbfc;
    --dp-bg-booked: #ebebeb;
    --dp-bg-best: #f1faf1;
    --dp-bg-peak: #fff5f5;
    --dp-radius: 6px;
    --dp-radius-sm: 4px;
    font-family: 'Nunito', 'Arimo', arial, sans-serif;
    color: var(--dp-text);
}

/* ============= Hourly grid ============= */

.dp-toggle {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--dp-border);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 12px;
}
.dp-toggle button {
    background: transparent;
    border: 0;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dp-text);
    cursor: pointer;
}
.dp-toggle button.is-active {
    background: var(--dp-primary);
    color: #fff;
}

.dp-grid-wrap {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 768px) {
    .dp-grid-wrap { grid-template-columns: 1fr; }
}

.dp-mini-cal {
    background: var(--dp-bg-muted);
    border: 1px solid var(--dp-border);
    border-radius: 8px;
    padding: 10px;
}
.dp-mini-cal .ui-datepicker-inline {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 0.78rem;
}

/* Booked-day marker on the hourly tab's mini calendar.
   beforeShowDay adds this class to any date that has at least one booked slot. */
.dp-mini-cal .dp-mini-cal__day--booked > a,
.dp-mini-cal .dp-mini-cal__day--booked > span {
    position: relative;
    background: rgba(227, 52, 47, 0.08) !important;
    color: #c62828 !important;
}
.dp-mini-cal .dp-mini-cal__day--booked > a::after,
.dp-mini-cal .dp-mini-cal__day--booked > span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #e3342f;
}
.dp-mini-cal .dp-mini-cal__day--booked.ui-datepicker-current-day > a {
    background: var(--dp-primary) !important;
    color: #fff !important;
}

.dp-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    /* Reserve the height of a full day's grid (24 half-hour slots = 6 rows)
       so changing the date doesn't collapse the box to the small "Loading…"
       line and then snap back open — the popup height stays fixed. */
    min-height: 325px;
    align-content: start;
}
/* Loading / empty states fill the reserved height and centre, so they
   occupy the same space the slots will — no layout jump on swap. */
.dp-slot-grid > .dp-loading,
.dp-slot-grid > .dp-empty {
    box-sizing: border-box;
    min-height: 325px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.dp-slot {
    position: relative;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius-sm);
    background: #fff;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.2;
}
.dp-slot__time-start {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--dp-text);
}
.dp-slot__time-end {
    display: block;
    font-size: 0.58rem;
    color: var(--dp-muted);
}
.dp-slot__price {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--dp-primary);
    margin-top: 2px;
}
.dp-slot__label {
    display: block;
    font-size: 0.56rem;
    font-weight: 700;
    color: var(--dp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dp-slot:hover { border-color: var(--dp-accent); }
.dp-slot.is-peak { background: var(--dp-bg-peak); }
.dp-slot.is-best { background: var(--dp-bg-best); }
.dp-slot.is-booked {
    background: var(--dp-bg-booked);
    color: #999;
    cursor: not-allowed;
    opacity: 0.55;
}
.dp-slot.is-booked .dp-slot__price { display: none; }
.dp-slot.is-selected,
.dp-slot.is-in-range {
    background: var(--dp-primary);
    color: #fff;
    border: 2px solid #fff;
}
.dp-slot.is-selected .dp-slot__time-start,
.dp-slot.is-in-range .dp-slot__time-start,
.dp-slot.is-selected .dp-slot__time-end,
.dp-slot.is-in-range .dp-slot__time-end,
.dp-slot.is-selected .dp-slot__price,
.dp-slot.is-in-range .dp-slot__price { color: #fff; }
.dp-slot__badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--dp-primary);
    font-size: 0.48rem;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}
.dp-slot__badge--start { top: -7px; }
.dp-slot__badge--end   { bottom: -7px; }

.dp-legend {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.62rem;
    color: var(--dp-muted);
    flex-wrap: wrap;
}
.dp-legend__swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
}
.dp-legend__swatch--std    { background: #fff; border: 1px solid var(--dp-border); }
.dp-legend__swatch--best   { background: var(--dp-bg-best); border: 1px solid #c8e6c9; }
.dp-legend__swatch--peak   { background: var(--dp-bg-peak); border: 1px solid #ffcdd2; }
.dp-legend__swatch--sel    { background: var(--dp-primary); }
.dp-legend__swatch--booked { background: var(--dp-bg-booked); border: 1px solid #ccc; }

.dp-empty,
.dp-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 12px;
    color: var(--dp-muted);
    font-size: 0.78rem;
}

/* Full-popup loading overlay — shown by dpMaybeShowLoading() when a tab's
   content isn't painted yet, so the popup never opens to a blank/frozen
   panel. Cleared the instant the grid/calendar renders. */
.dp-cal-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: inherit;
}
.dp-cal-loading.is-visible { display: flex; }
.dp-cal-loading__spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dde3ec;
    border-top-color: var(--dp-primary);
    border-radius: 50%;
    animation: dp-spin 0.7s linear infinite;
}
.dp-cal-loading__text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dp-primary);
    letter-spacing: 0.01em;
}
@keyframes dp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .dp-cal-loading__spinner { animation-duration: 1.6s; }
}

/* ============= Daily two-month calendar ============= */

.dp-day-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .dp-day-wrap { grid-template-columns: 1fr; }
}
.dp-month {
    border: 1px solid var(--dp-border);
    border-radius: 6px;
    background: var(--dp-bg-muted);
    padding: 8px;
}
.dp-month__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}
.dp-month__nav {
    background: transparent;
    border: 0;
    color: var(--dp-accent);
    cursor: pointer;
    padding: 2px 8px;
    font-size: 1rem;
}
.dp-month__nav:disabled { color: var(--dp-border); cursor: not-allowed; }
.dp-month table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 0.62rem;
    table-layout: fixed;
}
.dp-month th {
    color: var(--dp-muted);
    font-weight: 600;
    text-align: center;
    padding: 2px 0;
    font-size: 0.54rem;
    text-transform: uppercase;
}
.dp-month td {
    text-align: center;
    padding: 0;
    vertical-align: top;
}
.dp-day {
    border: 1px solid var(--dp-border);
    border-radius: 4px;
    background: #fff;
    padding: 3px 0;
    cursor: pointer;
    min-height: 36px;
}
.dp-day strong { display: block; font-size: 0.78rem; }
.dp-day__price { display: block; font-size: 0.52rem; color: var(--dp-primary); font-weight: 700; }
.dp-day.is-past { background: #eee; color: #aaa; cursor: not-allowed; opacity: 0.4; }
.dp-day.is-booked { background: var(--dp-bg-booked); color: #999; cursor: not-allowed; opacity: 0.5; }
.dp-day.is-booked .dp-day__price { display: none; }
.dp-day.is-best { background: var(--dp-bg-best); }
.dp-day.is-peak { background: var(--dp-bg-peak); }
.dp-day.is-selected,
.dp-day.is-in-range {
    background: var(--dp-primary);
    color: #fff;
}
.dp-day.is-selected .dp-day__price,
.dp-day.is-in-range .dp-day__price { color: #fff; }

/* ============= Right sidebar (rate cards + summary) ============= */

.dp-sidebar { font-size: 0.85rem; }
.dp-sidebar__rates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.dp-sidebar__rate-box {
    border: 1px solid var(--dp-border);
    border-radius: 6px;
    padding: 6px 8px;
    text-align: center;
}
.dp-sidebar__rate-box strong { display: block; font-size: 1.05rem; color: var(--dp-primary); }
.dp-sidebar__rate-box span   { font-size: 0.62rem; color: var(--dp-muted); }
.dp-sidebar__rate-box.is-active { border-color: var(--dp-primary); background: #f0f4ff; }
.dp-sidebar__rate-box.is-muted  { opacity: 0.5; }

.dp-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}
.dp-summary-row + .dp-summary-row { border-top: 1px solid #eef1f5; }
.dp-summary-row__total {
    font-weight: 700;
    color: var(--dp-text);
    border-top: 2px solid var(--dp-border);
    margin-top: 8px;
    padding-top: 10px;
}
.dp-breakdown-toggle {
    display: inline-block;
    background: #17a2b8;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.62rem;
    cursor: pointer;
    border: 0;
}
.dp-breakdown {
    background: var(--dp-bg-muted);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 6px 0;
    font-size: 0.72rem;
    color: var(--dp-text);
    display: none;
}
.dp-breakdown.is-open { display: block; }
.dp-breakdown__row { display: flex; justify-content: space-between; padding: 2px 0; }

.dp-rate-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}
.dp-rate-card {
    position: relative;
    border: 2px solid var(--dp-border);
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.dp-rate-card:hover { border-color: var(--dp-accent); }
.dp-rate-card.is-selected {
    border-color: var(--dp-primary);
    background: #f0f4ff;
}
.dp-rate-card__type {
    font-size: 0.85rem;
    font-weight: 700;
}
.dp-rate-card__price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dp-primary);
    margin: 4px 0;
}
.dp-rate-card__policy { font-size: 0.7rem; color: var(--dp-muted); line-height: 1.4; }
.dp-rate-card__badge {
    position: absolute;
    top: -8px;
    right: 10px;
    background: var(--dp-success);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}
.dp-rate-card__policy-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.68rem;
    color: var(--dp-accent);
    text-decoration: underline;
    cursor: pointer;
}

/* ============= Discount-tip boxes ============= */

.dp-tips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}
.dp-tip {
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid;
    font-size: 0.72rem;
    cursor: pointer;
}
.dp-tip__title { font-weight: 700; margin-bottom: 4px; }
/* No bullet at all — both the browser-default disc AND any inherited
 * Font-Awesome / legacy ::before marker are killed here, and the row
 * gets a small left indent so the text doesn't hug the card edge. */
.dp-tip ul    { margin: 0; padding-left: 0 !important; font-size: 0.68rem; line-height: 1.35; list-style: none !important; }
.dp-tip li    { padding: 1px 0 1px 6px !important; position: relative; }
.dp-tip li::before,
.dp-tip li::after { content: none !important; display: none !important; }
.dp-tip--early { background: #f1faf1; border-color: #c8e6c9; color: #2e7d32; }
.dp-tip--duration { background: #e3f2fd; border-color: #90caf9; color: var(--dp-accent); }
/* Soft lavender for the cancellation-policy tip — distinct from the
 * discount tips (green/blue) so it reads as "protection / policy" info
 * rather than another savings nudge. */
.dp-tip--refund { background: #f4eefb; border-color: #d6c5ee; color: #5e35b1; }

/* ============= Toast (range refused) ============= */

.dp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.82rem;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    z-index: 9999;
}
.dp-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============= Legacy popcalender overrides (v2 only) =============
 * The popcalender popup that hosts the grid is hard-coded to 683px wide
 * in style_6.css line 4734 with `left: -690px !important` to fly out left
 * from its anchor. The v2 grid needs more room, so we widen it here.
 * These rules only land when ?ux=v2 is on the URL (this whole file is gated).
 */

/* Popup: positioned via JS in the v2 script (dpPositionPopup at the bottom of
 * space-details.blade.php). When the user clicks one of the rate boxes, JS
 * measures the rate box's position via getBoundingClientRect() and sets the
 * popup's top/left so it sits to the LEFT of the rate box, anchored to the
 * viewport (position: fixed) so it stays put as the page scrolls. Falls back
 * to viewport-centered when there isn't enough room to the left.
 *
 * Defaults below are just the LOOK of the popup; the geometry is JS-driven. */
.popcalender {
    width: 660px !important;
    max-width: calc(100vw - 32px) !important;
    /* Absolute (not fixed) so the popup scrolls with the page — when the
     * popup is taller than the viewport, the user can scroll the page
     * naturally to reveal the rules tip cards at the bottom. JS detaches
     * the popup to <body> at open time so absolute is document-relative
     * instead of bound to the sticky-sidebar ancestor. */
    position: absolute !important;
    right: auto !important;
    padding: 0 !important;
    /* Below Bootstrap's modal stack (.modal-backdrop=1040, .modal=1050) so
     * the discount-tier popups (Plan Ahead, Book Longer, Cancel Early)
     * float above the popcalender when clicked from its tip cards. Still
     * well above ordinary page content. */
    z-index: 1030 !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: 0 4px 18px rgba(15, 42, 95, 0.18) !important;
}
/* Centered fallback: only when JS hasn't pinned the popup to the rate box.
 * Once .dp-popup-anchored is added, the inline top/left from dpPositionPopup
 * must win, so this selector excludes the anchored state. */
.popcalender:not(.dp-popup-anchored) {
    top: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}
.popcalender.dp-popup-anchored {
    transform: none !important;
}
/* When JS pins the popup beside the rate box, it removes the centering
 * transform via inline style and adds .dp-popup-anchored — reveal the arrow. */
.popcalender::before,
.popcalender::after { display: none !important; }
.popcalender.dp-popup-anchored::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    right: -12px !important;
    top: var(--dp-arrow-top, 24px) !important;
    border-top: 12px solid transparent !important;
    border-bottom: 12px solid transparent !important;
    border-left: 12px solid #fff !important;
    border-right: none !important;
    z-index: 2 !important;
}
.popcalender.dp-popup-anchored::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    right: -14px !important;
    top: calc(var(--dp-arrow-top, 24px) - 2px) !important;
    border-top: 14px solid transparent !important;
    border-bottom: 14px solid transparent !important;
    border-left: 14px solid #dce1e8 !important;
    border-right: none !important;
    z-index: 1 !important;
}

/* Hourly / Daily pill: STICKY at the top of the scrollable popup.
 * The popup has overflow-y: auto + max-height; without `position: sticky`
 * the tabs scroll out of view when the user wheels down, leaving the
 * calendar/slots at the top of the visible area while the tabs disappear
 * above the viewport — which reads as "tabs are under the content". */
/* The legacy `style.css:4816` selector `.popcalender.forhourlytab .nav-tabs`
 * absolutely-positions the nav-tabs in the top-right corner (right:90px;
 * top:40px) whenever the popup gets the `forhourlytab` class (added by JS
 * at space-details.blade.php:1549). It has specificity (0,3,0) — higher
 * than our `.popcalender .nav-tabs` (0,2,0). Match BOTH forms here so
 * the !important + load-order combo on equal specificity wins. */
/* Tab pill — bordered, button-like, with breathing room on all sides.
 * `position: sticky` with negative top so it floats above scroll without
 * touching the popup edge. Matching .popcalender.forhourlytab .nav-tabs as
 * well to override the legacy absolute-positioning rule from style.css:4816. */
/* Tab pill — compact segmented control. Sits on a light grey track inside
 * the popup header so the two options read as a connected toggle, with the
 * active option lifted into a white "chip" that clearly signals selection.
 * Width is intrinsic (auto), centered, never full-width. */
.popcalender .nav-tabs,
.popcalender.forhourlytab .nav-tabs {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    z-index: 5 !important;
    display: inline-flex !important;
    width: auto !important;
    float: none !important;
    margin: 14px auto 14px auto !important;
    padding: 4px !important;
    background: #eef1f7 !important;
    border: 0 !important;
    border-radius: 999px !important;
    overflow: visible !important;
    box-shadow: none !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
}
/* Centering wrapper — `.nav-tabs` is now inline-flex so we wrap it in a
 * centered block via its parent's text-align. */
.popcalender > .nav-tabs,
.popcalender.forhourlytab > .nav-tabs {
    display: flex !important;
    width: max-content !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.popcalender .nav-item,
.popcalender.forhourlytab .nav-item {
    flex: 0 0 auto !important;
    max-width: none !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    display: block !important;
}
.popcalender .nav-item a,
.popcalender.forhourlytab .nav-item a {
    display: block !important;
    padding: 8px 22px !important;
    font-family: 'Josefin Sans', 'Nunito', sans-serif !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    border: 0 !important;
    background: transparent !important;
    color: #5a6473 !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s !important;
}
.popcalender .nav-item:first-child a,
.popcalender.forhourlytab .nav-item:first-child a {
    border-right: 0 !important;
}
.popcalender .nav-item a:hover,
.popcalender.forhourlytab .nav-item a:hover {
    color: #0f2a5f !important;
    background: rgba(255, 255, 255, 0.6) !important;
}
.popcalender .nav-item a.active,
.popcalender.forhourlytab .nav-item a.active {
    background: #fff !important;
    color: #0f2a5f !important;
    font-size: 0.85rem !important;
    border: 0 !important;
    box-shadow: 0 1px 3px rgba(15, 42, 95, 0.18) !important;
}

/* Tab content sits flush directly below the pill, normal block flow. */
.popcalender .tab-content,
.popcalender #myTabContent {
    padding: 0 16px 16px 16px !important;
    margin: 0 !important;
}
.popcalender .tab-content > .tab-pane { padding: 0 !important; }

/* Defensive: a few mini-calendar header bits sometimes get suppressed by
 * old datepicker theming on top of position:fixed. Force visibility so the
 * month title + prev/next arrows + day-of-week row are always shown. */
.popcalender .dp-mini-cal .ui-datepicker-header {
    display: block !important;
    background: transparent !important;
    border: 0 !important;
    padding: 4px 0 8px 0 !important;
    text-align: center !important;
    position: relative !important;
}
.popcalender .dp-mini-cal .ui-datepicker-title {
    font-weight: 700 !important;
    color: #0f2a5f !important;
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
}
.popcalender .dp-mini-cal .ui-datepicker-prev,
.popcalender .dp-mini-cal .ui-datepicker-next {
    display: block !important;
    position: absolute !important;
    top: 4px !important;
    cursor: pointer !important;
    background: transparent !important;
    border: 0 !important;
    color: #0f2a5f !important;
    width: 22px;
    height: 22px;
}
.popcalender .dp-mini-cal .ui-datepicker-prev { left: 0 !important; }
.popcalender .dp-mini-cal .ui-datepicker-next { right: 0 !important; }
.popcalender .dp-mini-cal .ui-datepicker-calendar thead th {
    color: #888 !important;
    font-weight: 600 !important;
    font-size: 0.74rem !important;
    text-transform: none !important;
    padding: 6px 2px !important;
}

/* Calendar 240px / slot grid takes the rest. With the popup at 660px wide
 * the remaining slot column is roughly 660 - 32 padding - 240 - 16 gap = 372px,
 * which comfortably fits 4 cards × 84px + 3 gaps. */
.popcalender .dp-grid-wrap {
    grid-template-columns: 240px 1fr !important;
    gap: 16px !important;
    align-items: start;
}
.popcalender .dp-slot-grid {
    grid-template-columns: repeat(4, minmax(0, 84px)) !important;
    gap: 5px !important;
    justify-content: start !important;
}
.popcalender .dp-slot { padding: 5px 3px !important; min-width: 0 !important; max-width: 84px !important; }
.popcalender .dp-slot__time-start { font-size: 0.62rem !important; }
.popcalender .dp-slot__time-end   { font-size: 0.56rem !important; }
.popcalender .dp-slot__price      { font-size: 0.72rem !important; margin-top: 2px !important; }
.popcalender .dp-slot__label      { font-size: 0.48rem !important; }
.popcalender #dpHourlyHeading     { font-size: 0.78rem !important; margin-bottom: 6px !important; }

/* Start/End dropdown row. Default = two-column grid; the .dp-time-picker--full
 * variant stretches across the whole popup so Start hugs the left edge and
 * End hugs the right edge, sitting above the calendar + slot grid. */
.popcalender .dp-time-picker {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin: 0 0 12px 0 !important;
    max-width: 420px !important;
}
.popcalender .dp-time-picker--full {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    align-items: end !important;
    padding: 10px 0 14px 0 !important;
    border-bottom: 1px solid #eef1f5 !important;
    margin-bottom: 14px !important;
    max-width: none !important;
}
.popcalender .dp-time-picker__field { min-width: 0 !important; }
.popcalender .dp-time-picker__field label {
    display: block !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: #1d2429 !important;
    margin-bottom: 4px !important;
    text-transform: none !important;
}
.popcalender .dp-time-picker__field select {
    width: 100% !important;
    height: auto !important;
    padding: 7px 10px !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
    border: 1px solid #dce1e8 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #1d2429 !important;
    box-shadow: none !important;
}
.popcalender .dp-time-picker__field select:focus {
    outline: 0 !important;
    border-color: #0f2a5f !important;
    box-shadow: 0 0 0 2px rgba(15, 42, 95, 0.12) !important;
}

/* Confirm / Clear bar below the slot grid. */
.popcalender .dp-confirm-bar {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eef1f5 !important;
}
.popcalender .dp-confirm-btn {
    background: #0f2a5f !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-family: 'Josefin Sans', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
}
.popcalender .dp-confirm-btn:hover { background: #1262a2 !important; }
.popcalender .dp-confirm-btn:disabled {
    background: #cfd4dc !important;
    cursor: not-allowed !important;
}
.popcalender .dp-confirm-btn--secondary {
    background: #fff !important;
    color: #0f2a5f !important;
    border: 1px solid #0f2a5f !important;
}
.popcalender .dp-confirm-btn--secondary:hover { background: #f4f6fa !important; }

/* Mini calendar — equal-width square-ish boxes for every date.
 * `table-layout: fixed` + 14.28% width per column keeps the 7 cells uniform
 * regardless of single-digit vs two-digit date numbers. The .ui-state-default
 * (the actual clickable day) is styled as a centered box with subtle border. */
.popcalender .dp-mini-cal { padding: 12px !important; }
.popcalender .dp-mini-cal .ui-datepicker-inline,
.popcalender .dp-mini-cal .ui-datepicker {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.82rem !important;
}
.popcalender .dp-mini-cal .ui-datepicker-calendar {
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 3px !important;
    width: 100% !important;
}
.popcalender .dp-mini-cal .ui-datepicker-calendar td {
    width: 14.28% !important;        /* 1/7 of the row */
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.popcalender .dp-mini-cal .ui-state-default {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;   /* keep date cells square */
    padding: 0 !important;
    line-height: 1.6 !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #1d2429 !important;
    background: #fff !important;
    border: 1px solid #e4e7e7 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s !important;
}
.popcalender .dp-mini-cal .ui-state-default:hover {
    background: #f0f4ff !important;
    border-color: #0f2a5f !important;
    color: #0f2a5f !important;
}
.popcalender .dp-mini-cal .ui-state-active,
.popcalender .dp-mini-cal .ui-state-default.ui-state-active {
    background: #0f2a5f !important;
    color: #fff !important;
    border-color: #0f2a5f !important;
}
.popcalender .dp-mini-cal .ui-state-disabled .ui-state-default {
    background: #f5f5f5 !important;
    color: #bbb !important;
    border-color: #eee !important;
    cursor: not-allowed !important;
}

/* Two-month daily calendar — even tighter. */
.popcalender .dp-day-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
.popcalender .dp-month    { min-width: 0 !important; padding: 6px !important; }
.popcalender .dp-month__header { margin-bottom: 4px !important; font-size: 0.75rem !important; }
.popcalender .dp-month table { font-size: 0.55rem !important; }
.popcalender .dp-day { padding: 2px 0 !important; min-height: 28px !important; }
.popcalender .dp-day strong { font-size: 0.66rem !important; }
.popcalender .dp-day__price { font-size: 0.5rem !important; }

/* Legend even smaller. */
.popcalender .dp-legend { font-size: 0.58rem !important; gap: 8px !important; }
.popcalender .dp-legend__swatch { width: 7px !important; height: 7px !important; }

/* Tip boxes — tighter. */
.popcalender .dp-tip       { padding: 6px 8px !important; font-size: 0.68rem !important; }
.popcalender .dp-tip__title { font-size: 0.72rem !important; margin-bottom: 2px !important; }
.popcalender .dp-tip ul    { font-size: 0.64rem !important; line-height: 1.3 !important; }
.popcalender .dp-tip li    { padding: 0 0 0 4px !important; }

/* Tip boxes live INSIDE the popcalender now (moved out of the right sidebar).
 * The dpTips block's wrapper is the .dp-root immediately followed by alrt_ontent;
 * we pad it to mirror tab-content's horizontal gutter (popup itself is padding:0
 * so the pill sits flush at the very top). */
.popcalender #dpTips {
    margin: 0 16px 16px 16px !important;
    border-top: 1px solid #eef1f5;
    padding-top: 10px;
}

/* Below the desktop sweet-spot of 660px the popup width drops to 92vw so it
 * leaves a healthy gutter on small viewports. Layout stays SIDE-BY-SIDE
 * (mini-calendar + slot grid) all the way down to 769px — only the popup
 * width changes — so the booking experience reads identically to desktop
 * for tablet-landscape and narrow laptops. */
@media (max-width: 1100px) {
    .popcalender {
        width: 92vw !important;
        max-width: 720px !important;
    }
}

/* ===== Stacked mobile layout (≤ 768px) =====
   At and below 768px the desktop mini-calendar (~280px tall) is hidden,
   replaced by a native HTML5 date input row, and the slot grid drops
   below it in a single column. The slot grid uses auto-fit/minmax so it
   renders 3, 4, 5+ columns depending on available width with the same
   84px cell size + 5px gap as desktop — no excess whitespace, no wasted
   cells. */
.dp-mobile-datebar { display: none; }
@media (max-width: 768px) {
    .popcalender .dp-grid-wrap       { grid-template-columns: 1fr !important; }
    .popcalender .dp-grid-wrap__cal  { display: none !important; }
    .popcalender .dp-slot-grid {
        /* Explicit breakpoint cascade for cleanly-stepped column counts.
         * Auto-fit can't pick exactly 5 cols at 768 AND 3 cols at 400 from
         * a single minmax min (the math overlaps), so step it down by
         * media query. Cells stay equal-width via 1fr — no wasted space.
         * Default tier here is 5 cols (768→600 range). */
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 5px !important;
        justify-content: stretch !important;
    }
    .popcalender .dp-slot { max-width: none !important; }
    .popcalender .dp-tips { grid-template-columns: 1fr !important; }

    .dp-mobile-datebar {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        margin: 0 0 10px;
        background: #f4f7fb;
        border: 1px solid #e6ebf2;
        border-radius: 10px;
    }
    .dp-mobile-datebar label {
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--dp-text, #0f2a5f);
        margin: 0;
        white-space: nowrap;
    }
    .dp-mobile-datebar .dp-mobile-date {
        flex: 1;
        min-height: 38px;
        padding: 6px 10px;
        border: 1px solid #cfd6df;
        border-radius: 8px;
        font-size: 0.92rem;
        font-family: inherit;
        background: #fff;
        color: #1d2429;
    }
    .dp-mobile-datebar .dp-mobile-date:focus {
        outline: none;
        border-color: var(--dp-accent, #1262a2);
        box-shadow: 0 0 0 3px rgba(18, 98, 162, 0.18);
    }
    .popcalender .tab-content     { padding-top: 12px !important; }
    .popcalender .dp-confirm-bar  { flex-wrap: wrap; gap: 8px; }
    .popcalender .dp-confirm-btn  { flex: 1; min-width: 0; }
    .popcalender .dp-time-picker  { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .popcalender .dp-time-picker label { font-size: 0.74rem !important; }
}
/* Step the slot grid column count down so the cells stay readable as the
 * viewport shrinks — no wasted side-space, no over-cramped cells. */
@media (max-width: 600px) {
    .popcalender .dp-slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
    .popcalender .dp-slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 360px) {
    .popcalender .dp-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
/* Very narrow phones — tighten cell padding so 2–3 cols still fit cleanly. */
@media (max-width: 400px) {
    .popcalender .dp-slot-cell        { padding: 6px 4px !important; font-size: 0.72rem !important; }
    .popcalender .dp-slot-cell strong { font-size: 0.78rem !important; }
}

/* =============================================================
   Tier-discount popups — Early Booking + Duration discount.
   Each modal opens from the tip box inside the popcalender.
   Layout: gradient header band → list of percentage-badge tier
   cards → quick-example panel with the actual room rate.
   Best tier visually anchors with the brand green; lesser
   discount tiers fade to blue; the "no discount" tier is grey.
   ============================================================= */
.dp-pop .modal-dialog { max-width: 460px; }
.dp-pop .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 42, 95, 0.25);
}
.dp-pop .modal-header {
    position: relative;
    padding: 28px 28px 22px;
    border: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.dp-pop--early .modal-header { background: linear-gradient(180deg, #e8f7eb 0%, #d6f0db 100%); }
.dp-pop--duration .modal-header { background: linear-gradient(180deg, #e8f1fb 0%, #d6e7f4 100%); }
.dp-pop--refund .modal-header { background: linear-gradient(180deg, #f1ebfa 0%, #e3d8f4 100%); }
/* Partial-refund tier (any % between 0 and 100) gets a purple tile — the
   green is reserved for "full refund" and grey for "no refund" so the three
   states read at a glance. */
.dp-pop--refund .dp-pop-tier--mid .dp-pop-tier__badge {
    background: linear-gradient(135deg, #7e57c2 0%, #5e35b1 100%);
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.22);
}
.dp-pop--refund .dp-pop-tier--mid {
    background: #f6f1fc;
    border-color: #e0d2f0;
}
.dp-pop__icon {
    width: 42px; height: 42px; display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 26px;
    margin-bottom: 4px;
}
.dp-pop__title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #0f2a5f;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.dp-pop__sub {
    font-size: 14px;
    color: #5a6473;
    margin: 0;
    line-height: 1.4;
}
/* Close button — pure white circle with a hand-drawn X built from
   two pseudo-element bars (no SVG file, no glyph-rendering fuzz). The
   default Bootstrap `×` glyph is hidden via font-size:0 / color:transparent
   so the markup stays drop-in compatible. Hover rotates the whole button
   90° so the X spins into a + and back, with a soft scale + lift. */
.dp-pop .close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(15, 42, 95, 0.08);
    opacity: 1;
    font-size: 0;
    color: transparent;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(15, 42, 95, 0.12);
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.dp-pop .close > span { display: none; }
.dp-pop .close::before,
.dp-pop .close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: #5a6473;
    border-radius: 2px;
    transition: background 0.18s;
}
.dp-pop .close::before { transform: translate(-50%, -50%) rotate(45deg); }
.dp-pop .close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.dp-pop .close:hover {
    background: #fff;
    border-color: rgba(15, 42, 95, 0.18);
    box-shadow: 0 8px 20px rgba(15, 42, 95, 0.18);
    transform: scale(1.08) rotate(90deg);
}
.dp-pop .close:hover::before,
.dp-pop .close:hover::after { background: #0f2a5f; }
.dp-pop .close:active {
    transform: scale(0.94) rotate(90deg);
    box-shadow: 0 2px 6px rgba(15, 42, 95, 0.12);
    transition-duration: 0.08s;
}
.dp-pop .close:focus,
.dp-pop .close:focus-visible {
    outline: none;
    box-shadow: 0 4px 12px rgba(15, 42, 95, 0.12),
                0 0 0 3px rgba(18, 98, 162, 0.28);
}

.dp-pop .modal-body { padding: 22px 28px 24px; background: #fff; }

/* Tier card row */
.dp-pop-tier {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #fafbfd;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}
.dp-pop-tier:last-child { margin-bottom: 0; }
.dp-pop-tier__badge {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, #5fb866 0%, #4a9e51 100%);
    box-shadow: 0 4px 12px rgba(74, 158, 81, 0.25);
    flex-shrink: 0;
    letter-spacing: -0.02em;
}
.dp-pop-tier__body { flex: 1; min-width: 0; }
.dp-pop-tier__label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #1d2429;
    line-height: 1.25;
    margin: 0 0 2px;
}
.dp-pop-tier__caption {
    font-size: 13px;
    color: #6a7383;
    margin: 0;
    line-height: 1.35;
}

/* "Best" tier — full green emphasis */
.dp-pop-tier--best {
    background: #f1f9f2;
    border-color: #cfe7d2;
}
/* "Mid" tiers — subtle blue */
.dp-pop-tier--mid {
    background: #f1f6fd;
    border-color: #d9e6f5;
}
.dp-pop-tier--mid .dp-pop-tier__badge {
    background: linear-gradient(135deg, #1d6cc7 0%, #154f9b 100%);
    box-shadow: 0 4px 12px rgba(21, 79, 155, 0.22);
}
/* "Zero" tier — grey, faded */
.dp-pop-tier--zero {
    background: #f7f8fa;
    border-color: #ebeef3;
    opacity: 0.85;
}
.dp-pop-tier--zero .dp-pop-tier__badge {
    background: #dadfe6;
    color: #8b95a3;
    box-shadow: none;
}
.dp-pop-tier--zero .dp-pop-tier__label,
.dp-pop-tier--zero .dp-pop-tier__caption { color: #8b95a3; }

/* Quick-example panel */
.dp-pop-example {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f4f8fd;
    border: 1px solid #dbe6f3;
}
.dp-pop-example__eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: #6a7383;
    margin: 0 0 6px;
}
.dp-pop-example__eyebrow .dp-pop-example__sparkle {
    color: #f5b400;
    margin-right: 3px;
}
.dp-pop-example__scenario {
    font-size: 15px;
    color: #1d2429;
    margin: 0 0 4px;
    line-height: 1.4;
}
.dp-pop-example__scenario strong { color: #0f2a5f; font-weight: 700; }
.dp-pop-example__result {
    font-size: 15px;
    margin: 0;
    line-height: 1.4;
    color: #6a7383;
}
.dp-pop-example__result strong {
    color: #2e8b57;
    font-weight: 800;
    font-size: 18px;
    margin-right: 4px;
}
.dp-pop-example--empty {
    background: #f7f8fa;
    border-color: #ebeef3;
    color: #8b95a3;
    text-align: center;
    font-size: 13px;
}

/* ===== Mobile refinements for the dp-pop modals =====
   Tighter paddings, smaller header icon, snug tier cards, and a soft
   slide-up entry so the popup reads like a native bottom-sheet panel
   without losing its centered-card identity. */
@media (max-width: 768px) {
    /* 16px gutter on phones — Bootstrap default 0.5rem (8px) felt cramped
       against the close button + tier-card edges. */
    .dp-pop .modal-dialog        { margin: 16px auto; max-width: calc(100vw - 32px); }
    .dp-pop .modal-content       { border-radius: 16px; }
    .dp-pop .modal-header        { padding: 22px 22px 18px; }
    .dp-pop .modal-body          { padding: 18px 20px 20px; }
    .dp-pop__icon                { width: 38px; height: 38px; font-size: 22px; }
    .dp-pop__title               { font-size: 20px; }
    .dp-pop__sub                 { font-size: 13px; }

    .dp-pop .close               { width: 34px; height: 34px; top: 14px; right: 14px; }
    .dp-pop .close::before,
    .dp-pop .close::after        { width: 12px; }

    .dp-pop-tier                 { padding: 10px 12px; gap: 12px; margin-bottom: 8px; }
    .dp-pop-tier__badge          { width: 46px; height: 46px; font-size: 15px; border-radius: 11px; }
    .dp-pop-tier__label          { font-size: 14.5px; }
    .dp-pop-tier__caption        { font-size: 12.5px; line-height: 1.35; }

    .dp-pop-example              { margin-top: 14px; padding: 12px 14px; border-radius: 12px; }
    .dp-pop-example__eyebrow     { font-size: 12px; margin-bottom: 4px; }
    .dp-pop-example__scenario    { font-size: 14px; }
    .dp-pop-example__result      { font-size: 14px; }
    .dp-pop-example__result strong { font-size: 17px; }

    /* Slide-up entry — subtle 12px translate on the dialog inside the
       fade transition. Keeps Bootstrap's opacity transition intact. */
    .dp-pop.fade .modal-dialog   { transform: translateY(12px); transition: transform 0.18s ease-out; }
    .dp-pop.show .modal-dialog   { transform: translateY(0); }
}
/* Smallest phones — squeeze one more notch so even at 320×568 the popup
   never overflows the viewport horizontally. */
@media (max-width: 380px) {
    .dp-pop .modal-header        { padding: 18px 18px 14px; }
    .dp-pop .modal-body          { padding: 14px 16px 16px; }
    .dp-pop__title               { font-size: 18px; }
    .dp-pop__sub                 { font-size: 12.5px; }
    .dp-pop-tier                 { padding: 9px 10px; gap: 10px; }
    .dp-pop-tier__badge          { width: 42px; height: 42px; font-size: 14px; }
    .dp-pop-tier__label          { font-size: 14px; }
    .dp-pop-tier__caption        { font-size: 12px; }
}

/* ============================================================
   Mobile booking UX (≤ 768px)
   1. The picker popup renders as a fixed BOTTOM SHEET — slides up
      from the bottom edge with a dimmed backdrop and locked page
      scroll, instead of the desktop absolute-positioned popup.
   2. A floating reserve bar stays fixed at the bottom of the
      viewport so the primary action is always reachable:
        · nothing confirmed → "From $X/hr" + Check availability
        · slot confirmed    → total + date/time + Reserve Now
   Selectors are doubled (.popcalender.popcalender) to outrank the
   desktop base rules (.popcalender:not(.dp-popup-anchored)) at
   equal specificity — later in file wins.
   ============================================================ */

/* Hidden outside mobile. */
.dp-sheet-head     { display: none; }
.dp-sheet-backdrop { display: none; }
.dp-mbar           { display: none; }

@media (max-width: 768px) {

    /* ----- Bottom sheet ----- */
    body.dp-sheet-open { overflow: hidden !important; }

    .dp-sheet-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1029;              /* just under the sheet (1030) */
        background: rgba(13, 25, 48, 0.5);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
    body.dp-sheet-open .dp-sheet-backdrop { display: block; }

    .popcalender.popcalender {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 18px 18px 0 0 !important;
        box-shadow: 0 -12px 40px rgba(15, 42, 95, 0.3) !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
        /* `translate` (not `transform`) so the entry animation can't be
           beaten by the transform:none !important above. */
        animation: dp-sheet-up 0.28s ease-out;
    }
    @keyframes dp-sheet-up {
        from { translate: 0 48px; opacity: 0.5; }
        to   { translate: 0 0;    opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
        .popcalender.popcalender { animation: none; }
    }

    /* Grab handle + close ✕, sticky so they stay reachable while the
       sheet content scrolls. */
    .popcalender .dp-sheet-head {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        z-index: 40;
        background: #fff;
        padding: 12px 0 8px;
        border-radius: 18px 18px 0 0;
    }
    .dp-sheet-head__grab {
        width: 44px;
        height: 4px;
        border-radius: 999px;
        background: #d4dae3;
    }
    .dp-sheet-head__close {
        position: absolute;
        top: 8px;
        right: 10px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: #f0f2f6;
        color: #55606e;
        font-size: 21px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .dp-sheet-head__close:active { background: #e2e6ec; }

    /* ----- Floating reserve bar ----- */
    .dp-mbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1025;              /* under the sheet backdrop (1029) */
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border-top: 1px solid #e6eaf0;
        box-shadow: 0 -6px 24px rgba(15, 42, 95, 0.12);
    }
    /* The sheet covers the screen and Bootstrap modals (add-ons prompt,
       tier popups) bring their own CTA — hide the bar under both. */
    body.dp-sheet-open .dp-mbar,
    body.modal-open .dp-mbar { display: none; }
    /* Keep the page's real footer content reachable above the bar. */
    body.dp-has-mbar { padding-bottom: 76px; }
    /* The theme's back-to-top bubble sits exactly over the bar's CTA —
       the bar owns the bottom edge on mobile, so hide it here. */
    body.dp-has-mbar .back-to-top { display: none !important; }

    .dp-mbar__info  { flex: 1; min-width: 0; }
    .dp-mbar__price { font-size: 16px; color: #1d2429; line-height: 1.25; white-space: nowrap; }
    .dp-mbar__price strong { font-weight: 700; color: #0f2a5f; }
    .dp-mbar__unit  { font-size: 12px; color: #5a6473; font-weight: 500; }
    .dp-mbar__meta  {
        font-size: 11.5px;
        color: #5a6473;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dp-mbar.is-confirmed .dp-mbar__meta { color: #2e7d32; font-weight: 600; }
    .dp-mbar__cta {
        border: 0;
        border-radius: 10px;
        background: #0f2a5f;
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        padding: 13px 20px;
        white-space: nowrap;
        cursor: pointer;
        transition: background 0.15s;
    }
    .dp-mbar__cta:active { background: #1262a2; }

    /* Post-confirm attention pulse on the real Reserve button so the eye
       lands on it after the auto-scroll. Removed by JS after ~2.4s. */
    .dp-attn {
        animation: dp-attn-pulse 0.8s ease-out 3;
    }
    @keyframes dp-attn-pulse {
        0%   { box-shadow: 0 0 0 0 rgba(18, 98, 162, 0.55); }
        100% { box-shadow: 0 0 0 14px rgba(18, 98, 162, 0); }
    }
}
