.prebook-modal--profile {
  --sf-bg: var(--color-surface);
  --sf-fill: var(--color-control);
  --sf-fill-elevated: var(--color-control-hover);
  --sf-separator: var(--color-border-subtle);
  --sf-label: var(--color-text-muted);
  --sf-text: var(--color-text);
  --sf-radius-field: 12px;
  --sf-font:
    -apple-system, blinkmacsystemfont, "SF Pro Text", "SF Pro Display",
    system-ui, sans-serif;
  --prebook-profile-preview-width: 360px;
}

.prebook-modal--profile .prebook-modal__panel:not(.prebook-modal__panel--success) {
  width: min(100%, 100%);
  max-height: min(92dvh, 820px);
}

.prebook-modal--profile.prebook-modal--profile-desktop .prebook-modal__panel:not(
    .prebook-modal__panel--success
  ) {
  width: min(calc(100vw - 48px), 1040px);
  max-height: min(88dvh, 820px);
}

.prebook-modal__profile-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.prebook-modal__profile-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.prebook-modal__preview-column {
  min-width: 0;
}

.prebook-profile-pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.prebook-profile-pane__intro {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prebook-profile-pane__lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--pb-text);
}

.prebook-profile-pane__copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--pb-text);
}

.prebook-profile-pane__form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 20px;
}

.prebook-profile-pane__form.profile-container--embedded,
.profile-container.profile-container--embedded {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.prebook-profile-pane__form .profile-form-card {
  gap: 1rem;
}

.prebook-profile-pane__form .profile-form-group__title {
  font-family: var(--sf-font);
  font-size: 13px;
}

.prebook-profile-pane__form .profile-form-group__body {
  border-radius: var(--sf-radius-field);
  background: var(--sf-fill);
}

.prebook-profile-pane__form .profile-form-field label,
.prebook-profile-pane__form .profile-form-toggle-row__label,
.prebook-profile-pane__form .profile-form-field input[type="text"],
.prebook-profile-pane__form .profile-form-field input[type="email"] {
  font-family: var(--sf-font);
}

.prebook-profile-pane__form .profile-country-field__trigger,
.prebook-profile-pane__form .intl-phone-input {
  border: none;
  border-radius: 10px;
  background: var(--sf-bg);
  box-shadow: inset 0 0 0 1px var(--sf-separator);
}

.prebook-profile-pane__error {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgb(255 59 48 / 10%);
  color: #c41e12;
  font-size: 13px;
  line-height: 1.4;
}

.prebook-modal--profile .prebook-country-picker__menu {
  z-index: 10160;
}

.prebook-modal--profile .profile-country-sheet {
  z-index: 10170;
}

.prebook-modal--profile-desktop .prebook-modal__profile-shell {
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

.prebook-modal--profile-desktop .prebook-modal__profile-column {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 28px 10px;
  border-right: 0.5px solid var(--pb-separator);
}

.prebook-modal--profile-desktop .prebook-modal__preview-column {
  flex: 0 0 var(--prebook-profile-preview-width);
  width: var(--prebook-profile-preview-width);
  display: flex;
  align-items: stretch;
  padding: 20px 24px 24px;
  background: var(--pb-preview-bg);
}

.prebook-modal--profile-desktop .prebook-modal__preview-column .prebook-modal__trip {
  align-self: flex-start;
  width: 100%;
  margin: 0;
  padding: 20px;
  border-radius: 16px;
  background: var(--pb-surface);
  box-shadow: 0 1px 0 rgb(0 0 0 / 4%);
}

.prebook-modal--profile-desktop .prebook-profile-pane__footer {
  margin-top: auto;
  padding: 6px 0 4px;
  border-top: 0.5px solid var(--pb-separator);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Mobile profile — framed to visualViewport on <768px; rigid flex column:
   toolbar (fixed) | scroll (flex) | footer (fixed above keyboard). */
.prebook-modal--profile-mobile .prebook-modal__panel:not(.prebook-modal__panel--success) {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgb(0 0 0 / 12%);
}

.prebook-modal--profile-mobile .prebook-modal__toolbar--profile {
  flex-shrink: 0;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 0.5px solid var(--pb-separator);
  background: var(--pb-bg);
}

.prebook-modal--profile-mobile .prebook-modal__toolbar--profile .prebook-modal__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  line-height: 1.25;
}

.prebook-modal--profile-mobile .prebook-modal__profile-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: 12px;
  scroll-padding-bottom: 24px;
  padding: 10px 16px 20px;
}

.prebook-profile-mobile__instruction {
  margin: 4px 0 18px;
  padding: 0;
  font-family: var(--sf-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--pb-text);
}

.prebook-modal--profile-mobile .prebook-modal__trip--profile-inline {
  margin: 0 0 6px;
  padding: 14px 16px;
}

.prebook-modal--profile-mobile .prebook-modal__trip--profile-inline .prebook-modal__price {
  margin-top: 12px;
  padding-top: 12px;
  font-size: 24px;
}

.prebook-modal--profile-mobile .prebook-modal__profile-form-host {
  min-width: 0;
}

.prebook-modal--profile-mobile .prebook-profile-pane {
  gap: 0;
  min-height: auto;
}

.prebook-modal--profile-mobile .prebook-profile-pane--static-form .prebook-profile-pane__form {
  flex: none;
  min-height: auto;
  overflow: visible;
}

.prebook-modal--profile-mobile .prebook-modal__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 0.5px solid var(--pb-separator);
  background: var(--pb-footer-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.prebook-modal--profile-mobile .prebook-profile-pane__form .profile-form-field,
.prebook-modal--profile-mobile .prebook-profile-pane__form .profile-form-toggle-row,
.prebook-modal--profile-mobile .prebook-profile-pane__form .intl-phone-input,
.prebook-modal--profile-mobile .prebook-profile-pane__form .profile-country-field {
  scroll-margin-top: 12px;
  scroll-margin-bottom: 16px;
}

.prebook-modal--profile-mobile .prebook-modal__footer--single .prebook-modal__btn {
  width: 100%;
  min-width: 0;
  height: 50px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 650;
}

@media (max-width: 767px) {
  .prebook-modal--profile-mobile .prebook-profile-pane__form input[type="text"],
  .prebook-modal--profile-mobile .prebook-profile-pane__form input[type="email"],
  .prebook-modal--profile-mobile .prebook-profile-pane__form .intl-phone-input__number,
  .prebook-modal--profile-mobile
    .profile-country-field__trigger
    .prebook-country-picker__trigger-label {
    font-size: 16px;
  }
}

.prebook-modal--profile-desktop .prebook-profile-pane {
  gap: 8px;
}

.prebook-modal--profile-desktop .prebook-profile-pane__intro {
  padding-top: 2px;
}

.prebook-modal--profile-desktop .prebook-modal__toolbar--profile {
  justify-content: space-between;
  padding-left: 28px;
  padding-right: 28px;
}

.prebook-modal--profile-desktop .prebook-modal__toolbar--profile .prebook-modal__title {
  font-size: 20px;
}

.prebook-modal--profile-desktop .prebook-profile-pane__copy {
  margin: 0 0 2px;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--pb-text);
}

.prebook-modal__footer.prebook-profile-pane__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.prebook-modal__footer.prebook-profile-pane__footer .prebook-modal__btn {
  width: 100%;
}

.prebook-profile-legal {
  width: 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--pb-secondary);
  text-align: center;
  letter-spacing: -0.005em;
}

.prebook-profile-legal a {
  color: var(--pb-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--pb-separator);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.prebook-profile-legal a:hover {
  color: var(--pb-text);
  text-decoration-color: currentcolor;
}
