/*
 * Labkhand Booking Mobile QA Hotfix 1.0.0
 * Scope: booking page only, mobile/tablet only.
 * Purpose:
 * 1) Prevent the privacy-consent sentence from collapsing into a one-character column.
 * 2) Keep form controls scrollable above the persistent bottom dock.
 */

@media (max-width: 782px) {

  /* P0-A — privacy consent must remain a normal horizontal sentence */
  body.labkhand-v3-booking .lv3-booking-form > label.lv3-check,
  body.page-id-1846 .lv3-booking-form > label.lv3-check {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 22px 0 !important;
    padding: 8px 0 !important;

    direction: rtl !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;

    font-size: 16px !important;
    line-height: 1.9 !important;
  }

  body.labkhand-v3-booking .lv3-booking-form > label.lv3-check input[type="checkbox"],
  body.page-id-1846 .lv3-booking-form > label.lv3-check input[type="checkbox"] {
    display: inline-block !important;
    position: static !important;
    float: none !important;
    box-sizing: border-box !important;

    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;

    margin: 0 0 0 10px !important;
    padding: 0 !important;
    vertical-align: middle !important;
  }

  body.labkhand-v3-booking .lv3-booking-form > label.lv3-check a,
  body.labkhand-v3-booking .lv3-booking-form > label.lv3-check span,
  body.page-id-1846 .lv3-booking-form > label.lv3-check a,
  body.page-id-1846 .lv3-booking-form > label.lv3-check span {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }

  /* P0-B — persistent bottom dock must not trap focused fields underneath it */
  html:has(body.labkhand-v3-booking),
  html:has(body.page-id-1846) {
    scroll-padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.labkhand-v3-booking .lv3-booking-form input,
  body.labkhand-v3-booking .lv3-booking-form select,
  body.labkhand-v3-booking .lv3-booking-form textarea,
  body.labkhand-v3-booking .lv3-booking-form button,
  body.labkhand-v3-booking .lv3-booking-form .lv3-check,
  body.page-id-1846 .lv3-booking-form input,
  body.page-id-1846 .lv3-booking-form select,
  body.page-id-1846 .lv3-booking-form textarea,
  body.page-id-1846 .lv3-booking-form button,
  body.page-id-1846 .lv3-booking-form .lv3-check {
    scroll-margin-top: 120px !important;
    scroll-margin-bottom: calc(190px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.labkhand-v3-booking #lv3-main,
  body.labkhand-v3-booking .lv3-main,
  body.page-id-1846 #lv3-main,
  body.page-id-1846 .lv3-main {
    padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
