/* v35: нормальные размеры полей в корзине фуршета */
.furshet-page #furshetOrderForm.checkout-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  margin-top: 16px !important;
}

.furshet-page #furshetGuestFields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
}

.furshet-page #furshetOrderForm .input-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.furshet-page #furshetOrderForm .input-wrap span {
  display: block !important;
  line-height: 1.2 !important;
  margin: 0 0 2px !important;
  white-space: normal !important;
}

.furshet-page #furshetOrderForm input,
.furshet-page #furshetOrderForm textarea,
.furshet-page #furshetOrderForm select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 16px !important;
  line-height: 1.25 !important;
}

.furshet-page #furshetOrderForm input,
.furshet-page #furshetOrderForm select {
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 16px !important;
}

.furshet-page #furshetOrderForm textarea {
  min-height: 104px !important;
  padding: 15px 16px !important;
  resize: vertical !important;
}

.furshet-page #furshetOrderForm .btn.wide {
  width: 100% !important;
  min-height: 54px !important;
  margin-top: 2px !important;
}

@media (max-width: 760px) {
  .furshet-page .drawer-panel {
    width: min(94vw, 480px) !important;
    max-width: 94vw !important;
    max-height: calc(100dvh - 22px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important;
  }

  .furshet-page #furshetGuestFields {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .furshet-page #furshetOrderForm.checkout-form {
    gap: 12px !important;
  }

  .furshet-page #furshetOrderForm input,
  .furshet-page #furshetOrderForm textarea,
  .furshet-page #furshetOrderForm select {
    font-size: 16px !important;
  }
}


/* v36: поле даты фуршета такой же ширины, как поле контактного телефона */
@media (min-width: 761px) {
  .furshet-page #furshetOrderForm .furshet-date-field {
    width: calc((100% - 12px) / 2) !important;
    max-width: calc((100% - 12px) / 2) !important;
    align-self: flex-start !important;
  }

  .furshet-page #furshetOrderForm .furshet-date-field input[name="event_date"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 760px) {
  .furshet-page #furshetOrderForm .furshet-date-field {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* v37: жёстко убираем горизонтальный скролл корзины фуршета из-за input[type=date] */
.furshet-page #furshetCartDrawer,
.furshet-page #furshetCartDrawer * {
  box-sizing: border-box !important;
}

.furshet-page #furshetCartDrawer,
.furshet-page #furshetCartDrawer .drawer-panel {
  overflow-x: hidden !important;
}

.furshet-page #furshetOrderForm,
.furshet-page #furshetOrderForm > *,
.furshet-page #furshetOrderForm .input-wrap,
.furshet-page #furshetGuestFields,
.furshet-page #furshetGuestFields > *,
.furshet-page #furshetOrderForm input,
.furshet-page #furshetOrderForm textarea,
.furshet-page #furshetOrderForm select {
  min-width: 0 !important;
  max-width: 100% !important;
}

.furshet-page #furshetOrderForm .furshet-date-field,
.furshet-page #furshetOrderForm .furshet-date-field input,
.furshet-page #furshetOrderForm input[name="event_date"],
.furshet-page #furshetOrderForm input[type="date"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  flex: 0 1 auto !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.furshet-page #furshetOrderForm input[type="date"]::-webkit-date-and-time-value {
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: left !important;
}

.furshet-page #furshetOrderForm input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

@media (max-width: 760px) {
  .furshet-page #furshetCartDrawer .drawer-panel {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .furshet-page #furshetOrderForm .furshet-date-field,
  .furshet-page #furshetOrderForm input[name="event_date"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* v39: фиксы корзины фуршета — смещение текста товаров и корректное положение значений в полях */
.furshet-page #furshetCartDrawer .cart-item {
  grid-template-columns: 62px minmax(0, 1fr) auto !important;
  column-gap: 14px !important;
  align-items: start !important;
}

.furshet-page #furshetCartDrawer .cart-item > div:nth-child(2) {
  min-width: 0 !important;
  padding-left: 4px !important;
}

.furshet-page #furshetCartDrawer .cart-item h4,
.furshet-page #furshetCartDrawer .cart-item small {
  display: block !important;
}

.furshet-page #furshetCartDrawer .cart-item h4 {
  margin: 2px 0 6px !important;
  line-height: 1.2 !important;
}

.furshet-page #furshetCartDrawer .cart-item small {
  line-height: 1.25 !important;
}

.furshet-page #furshetCartDrawer .cart-item .qty-row {
  align-self: center !important;
}

.furshet-page #furshetOrderForm .input-wrap {
  position: relative !important;
}

.furshet-page #furshetOrderForm .input-wrap span {
  position: absolute !important;
  left: 16px !important;
  top: 10px !important;
  margin: 0 !important;
  z-index: 2 !important;
  line-height: 1.15 !important;
}

.furshet-page #furshetOrderForm .input-wrap input {
  padding-top: 22px !important;
  padding-bottom: 6px !important;
  line-height: 1.2 !important;
}

.furshet-page #furshetOrderForm input[name="guests"],
.furshet-page #furshetOrderForm input[name="event_date"] {
  text-align: left !important;
}

.furshet-page #furshetOrderForm input[name="event_date"]::-webkit-date-and-time-value {
  text-align: left !important;
}

@media (max-width: 760px) {
  .furshet-page #furshetCartDrawer .cart-item {
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    column-gap: 12px !important;
  }

  .furshet-page #furshetCartDrawer .cart-item > div:nth-child(2) {
    padding-left: 6px !important;
  }

  .furshet-page #furshetOrderForm .input-wrap span {
    top: 9px !important;
    left: 15px !important;
  }

  .furshet-page #furshetOrderForm .input-wrap input {
    min-height: 54px !important;
    height: 54px !important;
    padding-top: 23px !important;
    padding-bottom: 7px !important;
  }
}
