/* 2026-01-09_02: mobile header controls border restore (inputs + buttons) */

@media (max-width: 900px) {
  /* inputs */
  header.mgHeader .mgSearchBar__form input.mgInput,
  header.mgHeader .mgSearchBar__form input.mgInput--promo,
  header.mgHeader .mgSearchBar__form input#mgSearchName,
  header.mgHeader .mgSearchBar__form input#mgSearchSku,
  header.mgHeader .mgSearchBar__form input#promo_code{
    background:#fff !important;
    border: 1px solid #d9dbe1 !important;
    box-shadow: none !important;          /* убираем "двойную" обводку */
    box-sizing: border-box !important;
    border-radius: 10px 0 0 10px !important;
  }

  /* buttons (white + others) */
  header.mgHeader .mgSearchBar__form button.mgBtn,
  header.mgHeader .mgSearchBar__form .mgBtn{
    border: 1px solid #d9dbe1 !important;
    box-shadow: none !important;          /* убираем "двойную" обводку */
    box-sizing: border-box !important;
  }

  /* white buttons */
  header.mgHeader .mgSearchBar__form button.mgBtn--ghost,
  header.mgHeader .mgSearchBar__form .mgBtn--ghost{
    background:#fff !important;
  }

  /* seam between input and button */
  header.mgHeader .mgSearchBar__form input + button,
  header.mgHeader .mgSearchBar__form input + .mgBtn{
    border-left: 0 !important;
    border-top-left-radius: 0 !important;     /* левый край КВАДРАТНЫЙ */
    border-bottom-left-radius: 0 !important;  /* левый край КВАДРАТНЫЙ */
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
  }
}

/* 2026-01-09_03: SKU button has no mgBtn class -> force border + separator */
@media (max-width: 900px) {
  header.mgHeader #mgSearchSku + button,
  header.mgHeader #mgSearchSku + input[type="submit"] {
    background: #fff !important;
    color: #111827 !important;

    border: 1px solid #d9dbe1 !important;
    border-left: 1px solid #d9dbe1 !important; /* перегородка */

    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;

    box-shadow: none !important;
    box-sizing: border-box !important;
  }
}

/* 2026-01-09_04: SKU "Найти" is input[type=submit] without classes -> add border + separator */
@media (max-width: 900px) {
  header.mgHeader #mgSearchSku + input[type="submit"]{
    background: #fff !important;
    color: #111827 !important;

    border: 1px solid #d9dbe1 !important;
    border-left: 1px solid #d9dbe1 !important; /* перегородка */

    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;

    box-shadow: none !important;
    box-sizing: border-box !important;
  }
}

/* 2026-01-09_05: force visible separator for SKU white button */
@media (max-width: 900px) {
  header.mgHeader form[aria-label="Search by SKU"]{
    display: flex !important;
    gap: 0 !important;
  }

  header.mgHeader form[aria-label="Search by SKU"] #mgSearchSku{
    border-right: 0 !important;                 /* чтобы не было двойной линии */
    border-radius: 10px 0 0 10px !important;
  }

  header.mgHeader form[aria-label="Search by SKU"] button.mgBtn--ghost[type="submit"]{
    border-left: 1px solid #d9dbe1 !important;  /* ВОТ перегородка */
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
  }
}
