/* Mobile-first request-to-book composition. Loaded after the desktop workspace. */
.pxab-request-mobile-summary-toggle {
  display: none;
}

@media (max-width: 900px) {
  .pxab-request-booking {
    width: 100%;
    max-width: 100%;
    padding: 18px 12px 72px !important;
    overflow-x: clip;
  }

  .pxab-request-booking,
  .pxab-request-booking * {
    min-width: 0;
  }

  .pxab-request-booking > .pxab-request-booking__header {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .pxab-request-booking > .pxab-request-booking__header h1 {
    margin-bottom: 5px;
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .pxab-request-booking > .pxab-request-booking__header p:not(.pxab-request-booking__eyebrow) {
    font-size: .9rem;
    line-height: 1.45;
  }

  .pxab-request-booking > .pxab-request-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step,
  .pxab-request-booking > .pxab-request-steps .pxab-request-step__link {
    min-height: 58px !important;
    border-radius: 12px !important;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step {
    align-items: stretch !important;
    justify-content: center !important;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step__link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: center !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 6px !important;
    padding: 8px !important;
    text-align: center !important;
  }

  .pxab-request-booking .pxab-request-step__number {
    width: 26px;
    height: 26px;
    font-size: .7rem;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step__label {
    overflow-wrap: anywhere;
    font-size: clamp(.68rem, 2.8vw, .79rem) !important;
    line-height: 1.15;
  }

  .pxab-request-booking__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  .pxab-request-booking__main {
    order: 1;
  }

  .pxab-request-booking__summary-shell {
    order: 2 !important;
    width: 100%;
  }

  .pxab-request-booking-progress {
    display: none !important;
  }

  .pxab-request-mobile-summary-toggle:not([hidden]) {
    appearance: none !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0;
    padding: 12px 14px !important;
    border: 1px solid var(--pxab-single-border, #e5e7eb) !important;
    border-radius: 14px !important;
    background: var(--pxab-single-card-bg, #fff) !important;
    color: var(--pxab-single-text, #111827) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
    text-align: left;
  }

  .pxab-request-mobile-summary-toggle > span:first-child {
    display: grid;
    gap: 2px;
  }

  .pxab-request-mobile-summary-toggle strong {
    font-size: .94rem;
  }

  .pxab-request-mobile-summary-toggle small {
    color: var(--pxab-single-muted, #4b5563);
    font-size: .78rem;
    line-height: 1.35;
  }

  .pxab-request-mobile-summary-toggle__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    transition: transform .18s ease;
  }

  .pxab-request-mobile-summary-toggle__icon .pxab-icon {
    width: 18px;
    height: 18px;
  }

  .pxab-request-mobile-summary-toggle[aria-expanded="true"] .pxab-request-mobile-summary-toggle__icon {
    transform: rotate(180deg);
  }

  .pxab-request-booking__summary-stack {
    gap: 10px !important;
  }

  .pxab-request-booking__summary-shell .pxab-request-booking__summary {
    width: 100%;
    margin-top: 10px;
    padding: 16px !important;
    overflow: hidden;
  }

  .pxab-request-summary__header {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .pxab-request-summary__details > div,
  .pxab-request-review > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
  }

  .pxab-request-summary__details dd,
  .pxab-request-review span {
    text-align: left !important;
  }

  .pxab-request-booking .pxab-card,
  .pxab-request-flow__stage-footer {
    width: 100%;
    padding: 15px !important;
    border-radius: 14px !important;
  }

  .pxab-request-booking .pxab-field-grid,
  .pxab-request-booking .pxab-date-grid,
  .pxab-request-booking :where(.pxab-addon-grid, .pxab-addons-grid, .pxab-addon-options, .pxab-payment-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pxab-request-selection-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 5px 10px !important;
    padding: 12px !important;
  }

  .pxab-request-selection-row > span {
    grid-column: 1;
  }

  .pxab-request-selection-row > strong {
    grid-column: 1;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .pxab-request-selection-row > em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end !important;
    padding: 7px 10px !important;
  }

  .pxab-request-flow__stage-footer,
  .pxab-request-flow__actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .pxab-request-flow__stage-footer .pxab-request-flow__next,
  .pxab-request-flow__actions :where(.pxab-button, .pxab-submit),
  .pxab-request-booking .pxab-submit {
    width: 100% !important;
    min-width: 0 !important;
  }

  .pxab-request-booking :where(input, select, textarea, button) {
    max-width: 100%;
  }

  .pxab-request-booking :where(.pxab-price-breakdown, .pxab-request-price-summary, .pxab-request-currency-preview, .pxab-selected-addons, .pxab-addons__summary) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .pxab-request-modal {
    align-items: end !important;
    place-items: end center !important;
    padding: 0 !important;
  }

  .pxab-request-modal__panel,
  .pxab-request-modal__panel--calendar,
  .pxab-request-modal__panel--policy {
    width: 100% !important;
    max-width: none !important;
    max-height: min(92dvh, 900px) !important;
    margin: 0 !important;
    padding: 18px 14px calc(16px + env(safe-area-inset-bottom)) !important;
    border-radius: 22px 22px 0 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain;
  }

  .pxab-request-modal__header {
    position: sticky;
    z-index: 3;
    top: -18px;
    margin: -18px -14px 14px !important;
    padding: 16px 14px 12px;
    background: #fff;
  }

  .pxab-request-modal .pxab-date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pxab-request-modal .pxab-calendar-months {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .pxab-request-modal .pxab-calendar-month:nth-child(n + 2) {
    display: none;
  }

  .pxab-request-modal__footer {
    position: sticky;
    z-index: 3;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px !important;
    margin: 18px -14px calc(-16px - env(safe-area-inset-bottom)) !important;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--pxab-single-border, #e5e7eb);
  }

  .pxab-request-modal__footer button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .pxab-price-modal,
  .pxab-currency-modal {
    padding: 10px !important;
  }
}

@media (max-width: 390px) {
  .pxab-request-booking > .pxab-request-steps .pxab-request-step__link {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
  }

  .pxab-request-booking .pxab-request-step__number {
    width: 24px;
    height: 24px;
  }

  .pxab-request-modal .pxab-date-grid,
  .pxab-request-modal__footer {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pxab-request-mobile-summary-toggle__icon {
    transition: none;
  }
}

/* Compact mobile step navigation: stage actions live in the active panel footer. */
@media (max-width: 900px) {
  .pxab-ui.pxab-request-booking > .pxab-request-steps .pxab-request-step.is-active .pxab-request-step__action {
    display: none !important;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step {
    min-height: 78px !important;
  }

  .pxab-request-booking > .pxab-request-steps .pxab-request-step__link {
    width: 100% !important;
    min-height: 76px !important;
  }
}
