@layer select2, base, productWidget, desktop, mobile;
@import url(style.css) layer(base);
@import url(product-widget.css) layer(productWidget);
@import url(select2.min.css) layer(select2);

/*@layer desktop {*/
  .basket-items {
    width: 100%;
    border-bottom: 1px solid #ddd;
    border-spacing: 0;
    border-collapse: collapse;
    background-color: #f5f5f5;
    margin-top: 30px;
  }
  .basket-items td {
    text-align: center;
    border-top: 1px solid #ddd;
    padding: 10px;
  }
  .basket-items.inline td {
    border-bottom: 1px solid #ddd;
  }
  .basket-items img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border: 1px solid #ddd;
  }
  .basket-items th {
    font-size: 17px;
    font-weight: 600;
    padding: 10px;
    color: #777;
  }
  .basket-items b {
    color: black;
  }
  .basket-items.inline {
    margin-top: 0;
    border: none;
  }
  .basket-items.inline thead th {
    padding-top: 0;
  }
  .basket-items.inline tr th:first-child,
  .basket-items.inline tr td:first-child {
    text-align: start;
  }
  .basket-items h3 {
    margin-left: 16px;
  }
  .basket-items a {
    font-weight: 400;
    color: black;
    text-decoration: none;
    font-size: 16px;
  }
  .basket-items a:hover {
    text-decoration: underline;
  }
  .basket-items form {
    justify-content: center;
  }
  .basket-items input {
    width: 50px;
  }
  .basket-items .product-widget__status {
    margin: 0;
    justify-content: center;
  }
  .basket-items__header {
    display: flex;
    align-items: center;
  }
    .basket-items__remove {
      margin: 0 auto;
    }
    .basket-items__remove {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 10px;
      background-color: red;
      border-radius: 5px;width: 3em;height: 3em;color: white;
    }
  /* @media (hover: hover) { */
    .basket-items__remove:hover {color: #777;}
  /* } */
  #show-all {
    display: none;
    margin-top: 40px;
    cursor: pointer;
    background: linear-gradient(#ffb92c, #ffa921);
    border: none;
    color: white;
    fill: white;
    padding: 18px 20px;
    text-transform: uppercase;
    font-weight: 900;
    transition: 0.3s;
  }
  .basket-form__two-cols,
  .basket-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .basket-form {
    gap: 15px;
    margin-top: 30px;
  }
  .basket-form abbr {
    color: red;
  }
  .basket-form h2 {
    text-align: center;
    text-transform: uppercase;
    font-size: 1.3em;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 15px 0;
  }
  .basket-form__two-cols {
    column-gap: 40px;
    row-gap: 15px;
  }

  .basket-form > .flex {
    padding: 20px;
    border-left: 1px solid #ececec;
    border-right: 1px solid #ececec;
    background-color: #f5f5f5;
  }
  .basket-form span {
    margin-bottom: 20px;
    font-size: 16px;
  }
  .basket-form > .flex > label,
  #delivery-fields label,
  #company-fields label {
    margin-bottom: 15px;
  }
  label[for="willDelivery"] {
    margin-top: 30px;
  }
  .basket-form input,
  .select2-search {
    color: #777;
    border: 1px solid #ccc;
  }
  .select2-search {
    padding: 6px 12px;
    font-size: 14px;
  }
  .basket-form input:not([type="checkbox"]),
  .basket-form select {
    box-sizing: border-box;
    width: 100%;
    padding: 6px 12px;
    margin-top: 8px;
    font-size: 14px;
  }
  .select2 {
    margin-top: 8px;
  }
  .select2-container .select2-selection--single {
    position: relative;
    height: fit-content;
    border: 1px solid #ccc;
    border-radius: 0;
  }
  .select2-container
    .select2-selection--single
    span:not(.select2-selection__arrow),
  .select2-results__option {
    font-size: 14px;
    padding: 6px 12px;
    line-height: normal;
    color: #777;
  }
  .select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable {
    color: white;
  }
  label[for="regions"] span {
    margin-bottom: 0;
  }
  .basket__button {
    cursor: pointer;
    background: linear-gradient(#ffb92c, #ffa921);
    border: none;
    color: white;
    padding: 12px 18px;
    text-decoration: none;
    line-height: 1.5;
    transition: 0.3s;
    font-size: 18px;
    margin-top: 40px;
  }
  .basket__button:hover {
    filter: brightness(0.95);
    -webkit-filter: brightness(0.95);
    -ms-filter: brightness(0.95);
  }
/*}*/

@layer mobile {
  @media (max-width: 1000px) {
    .basket-form__two-cols,
    .basket-form {
      grid-template-columns: 1fr;
    }
    #order-details {
      gap: 20px;
    }
    #show-all {
      display: block;
    }
    .basket-items.inline {
      gap: 20px;
    }
    .basket-items {
      display: flex;
      border: none;
    }
    .basket-items h3,

    .basket-items thead {
      display: none;
    }
    .basket-items tbody {
      display: grid;
      width: 100%;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 50px;
    }
    .basket-items tr {
      display: flex;
      flex-wrap: wrap;
      padding: 10px;
      gap: 10px;
      border: 1px solid #777;
    }
    .basket-items:not(.inline) td {
      display: flex;
    }
    .basket-items td {
      width: 100%;
      border: none;
    }
    .basket-items img {
      margin-top: 15px;
      width: 50%;
      height: auto;
    }
    .basket-items__header {
      flex-direction: column-reverse;
    }
    .basket-items__summary {
      font-size: 23px;
      font-weight: 600;
    }
    .basket-items,
    .basket-form > .flex {
      background: white;
    }
  }
  @media (max-width: 500px) {
    .basket-form .flex {
      padding: 0;
    }
    .basket-items.inline tr {
      padding: 1vw;
    }
    .basket-form .flex_between {
      flex-direction: column;
    }
    .basket-form a {
      display: flex;
      justify-content: center;
    }
  }
}
