#bookingForm .check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 16px 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
}
#bookingForm .check input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: #294437;
  background: transparent;
  cursor: pointer;
}
#bookingForm .check input:checked {
  background: #294437;
}
#bookingForm .check input:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
#bookingForm .check input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (forced-colors: active) {
  #bookingForm .check input { appearance: auto; }
  #bookingForm .check input::after { display: none; }
}

/* Keep the form field and its keyboard behavior while styling the open picker. */
@supports (appearance: base-select) {
  :is(#bookingForm select, #concernFilter),
  :is(#bookingForm select, #concernFilter)::picker(select) {
    appearance: base-select;
    color: #263e32;
    font: inherit;
  }
  #bookingForm select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 8px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #766f5f;
    border-radius: 0;
    font-size: 14px;
  }
  #concernFilter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 24px;
    font: 15px/1.4 var(--sans, sans-serif);
  }
  :is(#bookingForm select, #concernFilter)::picker-icon {
    flex: none;
    content: "";
    width: 7px;
    height: 7px;
    margin-inline: 12px 2px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
  }
  :is(#bookingForm select, #concernFilter):open::picker-icon {
    transform: translateY(2px) rotate(225deg);
  }
  :is(#bookingForm select, #concernFilter)::picker(select) {
    padding: 4px;
    margin-block: 4px;
    background: #f3ecdf;
    border: 1px solid #b4ac96;
    border-radius: 9px;
    box-shadow: 0 6px 18px rgb(36 49 36 / 15%);
  }
  :is(#bookingForm select, #concernFilter) option {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 10px;
    background: transparent;
    color: #28372d;
    border-radius: 5px;
    line-height: 1.4;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
  }
  :is(#bookingForm select, #concernFilter) option:checked {
    background: #e6dccb;
  }
  :is(#bookingForm select, #concernFilter) option:is(:hover, :focus-visible) {
    background: #d9cbb6;
  }
  :is(#bookingForm select, #concernFilter) option::checkmark {
    order: 1;
    margin-inline-start: auto;
  }
}

#bookingForm input:not([type="checkbox"]):focus,
#bookingForm select:focus {
  outline: none;
  border-bottom-color: #294437;
  box-shadow: inset 0 -2px #294437;
}
@media (forced-colors: active) {
  #bookingForm input:not([type="checkbox"]):focus,
  #bookingForm select:focus {
    border-bottom: 3px solid Highlight;
  }
}

#date-trigger:not([hidden]) {
  anchor-name: --consult-date;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  color: #263e32;
  border: 0;
  border-bottom: 1px solid #766f5f;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
#date-trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 -2px #294437;
}
.calendar-icon {
  width: 15px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(currentColor,currentColor) 0 3px / 100% 1px no-repeat;
}
#date-calendar {
  width: min(294px, calc(100vw - 24px));
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  padding: 12px;
  border: 1px solid #b4ac96;
  border-radius: 10px;
  color: #28372d;
  background: #f3ecdf;
  box-shadow: 0 6px 18px rgb(36 49 36 / 15%);
  font: 14px/1.4 var(--sans, sans-serif);
}
@supports (position-area: bottom span-right) {
  #date-calendar {
    position-anchor: --consult-date;
    position-area: bottom span-right;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    inset: auto;
    margin: 4px 0;
  }
}
#date-calendar button {
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
  padding: 0;
  min-height: 34px;
}
#date-calendar .month-nav {display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; text-align: center;}
#date-calendar .month-nav button {font-size: 22px;}
#date-calendar .weekdays, #date-calendar .calendar-days {display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;}
#date-calendar .weekdays {margin: 10px 0 4px; font-size: 11px;}
#date-calendar button:disabled {opacity: .35; cursor: default;}
#date-calendar button:not(:disabled):hover {background: #e6dccb;}
#date-calendar button:focus-visible {outline: 2px solid #52614e; outline-offset: -2px;}
#date-calendar button[aria-current="date"] {text-decoration: underline; text-underline-offset: 3px;}
#date-calendar button[aria-pressed="true"] {background: #294437; color: white;}
#date-calendar button[aria-pressed="true"]:hover {background: #384d40;}
#date-calendar .clear-date {margin-top: 6px; padding-inline: 8px; text-decoration: underline;}

#bookingForm .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
}
#bookingForm .form-grid label { margin: 0; min-width: 0; }
#bookingForm .form-grid select { width: 100%; min-width: 0; }
#bookingForm .date-field label { margin-bottom: 2px; }

@supports (appearance: base-select) {
  #bookingForm select[name="service"]::picker(select) {
    inline-size: min(340px, calc(100vw - 32px));
    max-block-size: min(350px, 48dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #bookingForm select[name="service"] optgroup {
    margin-block-start: 8px;
    padding: 0;
    border-block-start: 1px solid #cec2ae;
  }
  #bookingForm select[name="service"] legend {
    padding: 12px 10px 5px;
    color: #344635;
    font: 600 16px/1.3 var(--sans, sans-serif);
  }
  #bookingForm select[name="service"] option {
    min-height: 32px;
    padding: 5px 10px;
    white-space: normal;
    font-weight: 400;
    text-align: start;
  }
}
@media (max-width: 560px) {
  #bookingForm .form-grid { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
}

@media (pointer: coarse) {
  #bookingForm select[name="service"] option { min-height: 44px; }
}
