/**
 * Единый мобильный вид форм заказа: ЛК, быстрый заказ, услуги.
 * Эталон — «Создать заказ» в кабинете (@media max-width: 1024px).
 */
@media (max-width: 1024px) {
  .sphere-order-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .sphere-order-form .admin-services,
  .sphere-order-form.admin-form,
  .sphere-order-form .admin-services__item,
  .sphere-order-form .admin-services__about,
  .sphere-order-form .bootstrap-select,
  .sphere-order-form .bootstrap-select > .dropdown-toggle,
  .sphere-order-form .form-control,
  .sphere-order-form .form-group,
  .sphere-order-form .select,
  .sphere-order-form .form-promocode {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .sphere-order-form .admin-services__row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    align-items: stretch !important;
    margin: 0;
  }

  .sphere-order-form .admin-services__row > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Быстрый заказ: одна белая карточка вместо двух отдельных */
  .s2-home-app #quick-order .sphere-order-form .quick-order,
  .sphere-qo-form.sphere-order-form .quick-order {
    background: #fff;
    border: 1px solid #e8e9f2;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(40, 44, 75, 0.06);
    padding: 16px;
    box-sizing: border-box;
  }

  .s2-home-app #quick-order .sphere-order-form .quick-order__row,
  .sphere-qo-form.sphere-order-form .quick-order__row {
    display: block;
    gap: 0;
  }

  .s2-home-app #quick-order .sphere-order-form .card,
  .s2-home-app #quick-order .sphere-order-form .card-mobile,
  .s2-home-app #quick-order .sphere-order-form .card-desktop,
  .sphere-qo-form.sphere-order-form .card,
  .sphere-qo-form.sphere-order-form .card-mobile,
  .sphere-qo-form.sphere-order-form .card-desktop {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
  }

  .s2-home-app #quick-order .sphere-order-form .card-body,
  .s2-home-app #quick-order .sphere-order-form .quick-order__item,
  .sphere-qo-form.sphere-order-form .card-body,
  .sphere-qo-form.sphere-order-form .quick-order__item {
    padding: 0 !important;
  }

  .sphere-qo-form.sphere-order-form .card-mobile {
    margin-bottom: 0 !important;
  }

  .sphere-qo-form.sphere-order-form .card-mobile + .card-desktop,
  .sphere-qo-form.sphere-order-form .card-desktop {
    display: none !important;
  }

  /* Услуги: белая оболочка формы на сером фоне страницы */
  .sphere-svc-page .svc-order-shell.sphere-order-form {
    background: #fff !important;
    border: 1px solid #e8e9f2 !important;
    box-shadow: 0 10px 28px rgba(40, 44, 75, 0.06) !important;
    border-radius: 18px !important;
    padding: 16px !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Подписи полей — фиолетовые жирные как в ЛК */
  .sphere-order-form .form-group--outline > label,
  .sphere-order-form .sphere-link-qty__url > label,
  .sphere-order-form .sphere-link-qty__count > label,
  .sphere-order-form .sphere-extra-row__url-label,
  .sphere-order-form .sphere-extra-row__count > label,
  .sphere-order-form .quick-order__header > label {
    font-weight: 700 !important;
    color: #7874fe !important;
    font-size: inherit !important;
    letter-spacing: normal !important;
    margin-bottom: 8px !important;
  }

  /* Высота полей — как в ЛК (~50px), не 60px */
  .sphere-order-form .form-group--outline .form-control,
  .sphere-order-form .form-control,
  .sphere-order-form .price_total {
    height: auto !important;
    min-height: 50px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .sphere-order-form .bootstrap-select > .dropdown-toggle {
    height: auto !important;
    min-height: 50px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    display: flex !important;
    align-items: center;
  }

  .sphere-order-form .bootstrap-select .dropdown-menu {
    top: 50px !important;
  }

  .sphere-order-form .form-promocode {
    display: flex !important;
    gap: 8px;
    align-items: stretch;
    min-height: 50px !important;
  }

  .sphere-order-form .form-promocode .form-control {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 14px !important;
    width: auto !important;
    min-height: 48px !important;
    height: auto !important;
  }

  .sphere-order-form .form-promocode .btn {
    position: static !important;
    flex: 0 0 auto;
    white-space: nowrap;
    height: auto;
    min-height: 48px;
  }

  /* Ссылка + количество */
  .sphere-order-form .sphere-link-qty {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: end;
    margin-bottom: 10px;
  }

  .sphere-order-form .sphere-link-qty__url,
  .sphere-order-form .sphere-link-qty__count {
    grid-column: 1 !important;
    width: 100% !important;
  }

  .sphere-order-form .sphere-link-qty--multi,
  .sphere-order-form .sphere-extra-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 10px !important;
    align-items: end !important;
  }

  .sphere-order-form .sphere-link-qty--multi .sphere-link-qty__url,
  .sphere-order-form .sphere-extra-row__url {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  .sphere-order-form .sphere-link-qty--multi .sphere-link-qty__count,
  .sphere-order-form .sphere-extra-row__count {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .sphere-order-form .sphere-link-qty--multi .sphere-link-qty__remove,
  .sphere-order-form .sphere-extra-row > .sphere-extra-remove {
    grid-column: 2 !important;
    grid-area: auto !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 50px !important;
    min-height: 50px !important;
    align-self: end !important;
    justify-self: stretch;
    flex: none !important;
  }

  .sphere-order-form .sphere-urls-meta,
  .sphere-order-form .sphere-urls-meta.is-multi {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px 12px;
    grid-template-columns: none !important;
    margin: 0 0 12px !important;
  }

  .sphere-order-form .sphere-urls-meta__spacer {
    display: none !important;
  }

  .sphere-order-form .sphere-urls-hint,
  .sphere-order-form .sphere-qty-limits,
  .sphere-order-form .sphere-qty-limits .limits_title {
    padding: 0 !important;
    margin: 0 !important;
    width: auto;
    grid-column: auto !important;
  }

  /* «+ ещё ссылка» — как в ЛК */
  .sphere-order-form .sphere-order-add,
  .sphere-order-form .sphere-acc-add,
  .sphere-order-form .sphere-svc-add,
  .sphere-order-form .sphere-qo-add {
    margin: 0 0 16px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 4px 0 8px;
    font-size: 18px;
    font-weight: 700;
    background-image: linear-gradient(90deg, #b224ef 0%, #7579ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .sphere-order-form .sphere-order-add[hidden],
  .sphere-order-form .sphere-acc-add[hidden],
  .sphere-order-form .sphere-svc-add[hidden],
  .sphere-order-form .sphere-qo-add[hidden] {
    display: none !important;
  }

  .sphere-order-form .admin-services__about {
    padding: 14px 0 0 !important;
    margin: 0 0 36px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .sphere-order-form .admin-services__about .title {
    padding: 0 0 10px !important;
    margin: 0 0 8px !important;
  }

  .sphere-order-form .admin-services__about .admin-services__items {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }

  .sphere-order-form .admin-services__body {
    padding: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
  }

  .sphere-order-form .s2-loy-note {
    width: 100% !important;
    box-sizing: border-box;
  }

  .sphere-order-form .form-btn {
    width: 100%;
    white-space: nowrap !important;
  }

  /* Селект площадки на /services — та же высота, что у полей формы */
  .sphere-svc-page .sphere-plat__select.sphere-qo-form .bootstrap-select > .dropdown-toggle {
    height: auto !important;
    min-height: 50px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .sphere-svc-page .sphere-plat__select.sphere-qo-form .bootstrap-select .dropdown-menu {
    top: 50px !important;
  }

  /* Площадка / тип услуги: сетка как на главной, не flex (иначе пункты «широкие») */
  .sphere-order-form .select--icon .dropdown-menu li a {
    display: grid !important;
    grid-template-columns: 29px 0 1fr !important;
    gap: 9px !important;
    align-items: center !important;
  }

  .sphere-order-form .select--icon .dropdown-menu li a .glyphicon[class*="ico-"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin-right: 0 !important;
    background-color: transparent !important;
    background-size: 24px 24px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .sphere-order-form .select--icon .dropdown-menu li {
    list-style: none !important;
    margin-bottom: 0 !important;
  }

  /* Тариф без иконок: иначе слева на границе пунктов серая точка (disc) */
  .sphere-order-form .bootstrap-select .dropdown-menu,
  .sphere-order-form .bootstrap-select .dropdown-menu .inner,
  .sphere-order-form .bootstrap-select .dropdown-menu li,
  .sphere-svc-page .svc-order-shell .bootstrap-select .dropdown-menu,
  .sphere-svc-page .svc-order-shell .bootstrap-select .dropdown-menu li {
    list-style: none !important;
    list-style-type: none !important;
  }

  .sphere-order-form .bootstrap-select .dropdown-menu li,
  .sphere-svc-page .svc-order-shell .bootstrap-select .dropdown-menu li {
    display: block !important;
  }

  .sphere-order-form .bootstrap-select .dropdown-menu li::marker,
  .sphere-svc-page .svc-order-shell .bootstrap-select .dropdown-menu li::marker {
    content: none !important;
    display: none !important;
    font-size: 0 !important;
    color: transparent !important;
  }
}
