// The card, picker, progress and review section rules come directly from the demo styles.
// These adapters only bridge the existing Contact/FormCard controls.
.booking-ui .venue-booking-confirmation {
  button.add-session { width: 100%; }
  .venue-resource-form-entry + .venue-resource-form-entry { margin-top: var(--inline-gap); }
  // Match the demo's contact-fields grid without changing the shared modal.
  .venue-contact-form {
    .pisell-contact-info-modal-content { height: auto; padding: 0; background: transparent; }
    .pisell-lowcode-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
    .pisell-contact-info-modal-content-name-wrap { display: contents; }
    .pisell-lowcode-form-item { min-width: 0; margin-bottom: 0; }
    .pisell-lowcode-form-item-label > label { color: var(--ink); font-size: var(--font-label); }
    // Email has an affix wrapper; names/phone are bare inputs. Size the outer
    // boxes alike, then let the email's inner input inherit without a second box.
    input.pisell-lowcode-input,
    .pisell-lowcode-input-affix-wrapper {
      box-sizing: border-box;
      height: auto;
      min-height: var(--control-height);
      padding: var(--space-sm);
      border-width: var(--border-width);
      font-family: inherit;
      font-size: max(16px, var(--font-body));
      line-height: var(--line-body);
      font-weight: var(--weight-body);
    }
    .pisell-lowcode-space-compact > .pisell-lowcode-select { height: auto; align-self: stretch; }
    .pisell-lowcode-select-selector { height: 100% !important; align-items: center; }
    // Keep the shared phone control joined; only its outside corners are rounded.
    .pisell-lowcode-space-compact > .pisell-lowcode-input-compact-last-item {
      border-start-start-radius: 0;
      border-end-start-radius: 0;
    }
    .pisell-lowcode-input-affix-wrapper {
      align-items: center;
      border-radius: var(--radius-control); border-color: #aeb8bb;
      > input.pisell-lowcode-input { height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; outline: none; font: inherit; }
      // The inner email input has no box; show the demo's focus ring on its wrapper.
      &:focus-within {
        border-color: var(--focus);
        outline: 3px solid var(--focus);
        outline-offset: 4px;
        box-shadow: none;
      }
      &.pisell-lowcode-input-affix-wrapper-status-error { border-color: var(--error); }
    }
    .venue-contact-form__error { color: var(--primary); margin: var(--space-sm) 0 0; }
  }
}

.booking-ui .modal.venue-resource-form-modal {
  width: 720px;
  max-height: 95vh;
  max-height: 95dvh;
  .modal-heading h2 { max-width: none; }
  .venue-resource-form-body { display: grid; align-content: start; gap: var(--inline-gap); }
  .venue-resource-form-footer { display: flex; justify-content: flex-end; }
}
@media (max-width: 700px) {
  .booking-ui .modal.venue-resource-form-modal.dialog-fullscreen {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding-top: max(var(--space-lg), env(safe-area-inset-top));
    .venue-resource-form-footer > .button { width: 100%; }
  }
}

.booking-ui .modal.venue-holder-create-modal,
.booking-ui .modal.venue-policy-modal {
  width: 720px;
  max-height: 95vh;
  max-height: 95dvh;
  .modal-heading h2 { max-width: none; }
  .venue-holder-create-body { display: grid; align-content: start; gap: var(--inline-gap); }
  .venue-holder-create-footer { display: flex; justify-content: flex-end; }
  .ant-form-item-label > label { color: var(--ink); }
  .ant-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
}
.booking-ui .modal.venue-policy-modal {
  .policy-content { overflow-wrap: anywhere; }
  .policy-content img { max-width: 100%; height: auto; }
  .policy-modal-footer { display: flex; flex-direction: column; gap: var(--space-md); width: 100%; }
  .policy-modal-checkbox { margin: 0; }
}

@media (max-width: 700px) {
  .booking-ui .venue-booking-confirmation .venue-contact-form .pisell-lowcode-form {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }
  .booking-ui .modal.venue-holder-create-modal.dialog-fullscreen,
  .booking-ui .modal.venue-policy-modal.dialog-fullscreen {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding-top: max(var(--space-lg), env(safe-area-inset-top));
    .venue-holder-create-footer > .button { width: 100%; }
  }
}
.booking-ui .venue-booking-holder-step .completion-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  row-gap: var(--space-xs);

  > progress {
    grid-column: 2;
    width: 100%;
    height: 10px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    border: var(--border-width) solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    &::-webkit-progress-bar { background: #fff; }
    &::-webkit-progress-value { background: var(--primary); }
    &::-moz-progress-bar { background: var(--primary); }
  }
}
.booking-ui .venue-booking-holder-step .holder-picker > .field > span {
  overflow-wrap: anywhere;
}
.booking-ui .venue-inline-holder-review .booking-order-detail {
  overflow-wrap: anywhere;
  .text-link {
    max-width: 55%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: right;
  }
}
.booking-ui .venue-holder-skeleton {
  display: grid;
  gap: var(--section-gap);
  .cart-group { display: grid; gap: var(--space-md); }
  span { display: block; background: var(--line); border-radius: var(--radius-control); }
  .venue-holder-skeleton-title { width: 65%; height: var(--font-heading); }
  .venue-holder-skeleton-text { width: 40%; height: var(--font-body); }
  .venue-holder-skeleton-field { min-height: var(--control-height); }
}
.booking-ui .venue-booking-holder-step .booking-item-metadata,
.booking-ui .venue-booking-confirmation .booking-item-metadata {
  display: grid;
  gap: var(--space-2xs);
  > div { display: flex; align-items: center; gap: var(--space-xs); }
  svg { flex-shrink: 0; }
}
.booking-ui .venue-booking-confirmation .booking-item-metadata {
  time { min-width: 0; }
  .venue-review-weekday { white-space: nowrap; }
}

// Keep the heading band height while balancing the space above and below its content.
.booking-ui .venue-booking-confirmation .checkout-module {
  padding-top: calc(var(--card-padding) / 2);
  > .checkout-module-heading { padding-bottom: calc(var(--card-padding) / 2); }
}
