/**
 * Lamilka 0.6.59 — authoritative public-form rhythm.
 *
 * Labels belong to the control below them: 6px from label to control, 18px
 * between independent field groups, 16px between paired columns, and 24px
 * between major form sections.  Composite controls own their outer spacing;
 * their internal inputs must not add a second margin.
 */

/* Transfer booking: the previous final layer deliberately removed grid gap,
 * so each real field group now receives explicit, unambiguous separation. */
body .lamilka-transfer__booking {
  gap: 0 !important;
}

body .lamilka-transfer__booking > :is(.lamilka-transfer__field, .lamilka-transfer__twocol) {
  margin-top: 18px !important;
}

body .lamilka-transfer__field {
  margin-bottom: 0 !important;
}

body .lamilka-transfer__field > :is(
  input:not([type="hidden"]),
  select,
  .lamilka-transfer__select-wrap,
  .lamilka-transfer__date-wrap,
  .lamilka-date-field,
  .lamilka-phone-field,
  .lamilka-transfer__counter
) {
  margin-top: 6px !important;
}

body .lamilka-transfer__direction > div,
body .lamilka-transfer__seats > div:first-of-type {
  margin-top: 6px !important;
}

body .lamilka-transfer__field > :is(
  .lamilka-transfer__select-wrap,
  .lamilka-transfer__date-wrap,
  .lamilka-date-field,
  .lamilka-phone-field
) :is(input, select),
body .lamilka-transfer__field > .lamilka-transfer__hotel-results {
  margin-top: 0 !important;
}

body .lamilka-transfer__twocol {
  column-gap: 16px !important;
  row-gap: 18px !important;
}

body .lamilka-transfer__twocol > .lamilka-transfer__field {
  margin: 0 !important;
}

body .lamilka-transfer__details {
  margin-top: 24px !important;
  padding-top: 24px !important;
}

body .lamilka-transfer__details .lamilka-transfer__twocol {
  margin-top: 16px !important;
}

body .lamilka-transfer__seats > [data-transfer-seat-options]:not([hidden]) {
  margin-top: 18px !important;
}

body .lamilka-transfer__seat-count-field > .lamilka-transfer__counter,
body .lamilka-transfer__seat-age-fields select {
  margin-top: 6px !important;
}

body .lamilka-transfer__seat-age-fields {
  gap: 18px !important;
  margin-top: 18px !important;
}

/* Tour booking steps use margins rather than a container gap in the final
 * source-parity layer.  Keep direct fields and the two-column name row on the
 * same 18/6 relationship at every breakpoint and for Water Sports. */
body .lamilka-detail__booking > [data-booking-step] > label,
body .lamilka-detail__booking > [data-booking-step] > .lamilka-detail__name-row,
body .lamilka-detail__booking > [data-booking-step] > .lamilka-detail__times {
  margin-top: 18px !important;
}

body .lamilka-detail__booking .lamilka-detail__times legend {
  margin: 0 !important;
}

body .lamilka-detail__booking .lamilka-detail__times button {
  /* Fieldset legends contribute their own line-box separation. */
  margin-top: 0 !important;
}

body .lamilka-detail__booking .lamilka-detail__name-row {
  column-gap: 16px !important;
  row-gap: 18px !important;
}

body .lamilka-detail__booking .lamilka-detail__name-row > label {
  margin-top: 0 !important;
}

body .lamilka-detail__booking > [data-booking-step] > label > :is(input, select, textarea),
body .lamilka-detail__booking .lamilka-detail__name-row > label > :is(input, select, textarea),
body .lamilka-detail__booking > [data-booking-step] > label > :is(.lamilka-hotel-field, .lamilka-date-field, .lamilka-phone-field) {
  margin-top: 6px !important;
}

body .lamilka-detail__booking label > :is(.lamilka-hotel-field, .lamilka-date-field, .lamilka-phone-field) :is(input, select, textarea) {
  margin-top: 0 !important;
}

body .lamilka-detail[data-tour-detail="water-sports"] .lamilka-detail__booking label {
  gap: 0 !important;
  margin-top: 18px !important;
}

body .lamilka-detail[data-tour-detail="water-sports"] .lamilka-detail__booking label > :is(.lamilka-hotel-field, .lamilka-date-field, .lamilka-phone-field) {
  margin-top: 6px !important;
}

/* Contact, concierge, lifestyle, navigation and private-tour request forms. */
body .lamilka-contact-source :is(.lamilka-contact__new, .lamilka-contact__booked),
body .lamilka-aesthetic-hub__form-grid,
body .lamilka-concierge__form-grid {
  gap: 18px !important;
}

body .lamilka-contact-source__form label > :is(input, select, textarea, .lamilka-phone-field),
body .lamilka-aesthetic-hub__form-grid label > :is(input, select, textarea, .lamilka-phone-field),
body .lamilka-concierge__form-grid label > :is(input, select, textarea, .lamilka-phone-field, .lamilka-concierge__select-wrap) {
  margin-top: 6px !important;
}

body :is(.lamilka-contact-source__form, .lamilka-aesthetic-hub__form-grid, .lamilka-concierge__form-grid)
  label > :is(.lamilka-phone-field, .lamilka-concierge__select-wrap) :is(input, select, textarea) {
  margin-top: 0 !important;
}

body .lamilka-navigation-booking form,
body .lamilka-private__contact form {
  gap: 18px !important;
}

body .lamilka-private__contact form > div {
  column-gap: 16px !important;
  row-gap: 18px !important;
}

body .lamilka-navigation-booking label,
body .lamilka-private__contact label {
  gap: 6px !important;
}

body .lamilka-private__contact label > .lamilka-phone-field {
  margin-top: 0 !important;
}

/* Direct card entry stays compact, but its labels follow the same ownership
 * rule.  The bank's OTP document remains provider-owned inside the sandboxed
 * frame; the surrounding verification panel keeps the 44px control contract. */
body .lamilka-detail__booking .lmp-direct-payment .lmp-direct-payment__form > label,
body .lamilka-transfer__booking .lmp-direct-payment .lmp-direct-payment__form > label,
body .lamilka-detail__booking .lmp-direct-payment .lmp-direct-payment__row > label,
body .lamilka-transfer__booking .lmp-direct-payment .lmp-direct-payment__row > label {
  margin-bottom: 16px !important;
}

body .lamilka-detail__booking .lmp-direct-payment label > .lmp-direct-payment__label,
body .lamilka-transfer__booking .lmp-direct-payment label > .lmp-direct-payment__label {
  margin-bottom: 6px !important;
}

body .lamilka-detail__booking .lmp-direct-payment .lmp-direct-payment__row label,
body .lamilka-transfer__booking .lmp-direct-payment .lmp-direct-payment__row label {
  margin-bottom: 0 !important;
}

@media (max-width: 640px) {
  body .lamilka-transfer__twocol,
  body .lamilka-detail__booking .lamilka-detail__name-row,
  body .lamilka-private__contact form > div {
    row-gap: 18px !important;
  }
}
