/* Skilteproduktion.dk: keep the basket table inside narrow viewports. */
@media (max-width: 767px) {
  #checkoutView { max-width: 100%; min-width: 0; }

  #checkoutView .row:has(> table:has(#checkoutHeaders)) {
    min-width: 0;
  }

  #checkoutView table:has(#checkoutHeaders),
  #checkoutView #checkoutLines,
  #checkoutView #checkoutLines tr,
  #checkoutView .basketFooter,
  #checkoutView .basketFooter tr,
  #checkoutView .basketFooter td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #checkoutView table:has(#checkoutHeaders) {
    margin: 0;
    border: 0;
    table-layout: auto;
  }

  #checkoutView #checkoutHeaders,
  #checkoutView #checkoutLines .productMiniature {
    display: none;
  }

  #checkoutView #checkoutLines tr {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto auto;
    align-items: end;
    gap: 10px 8px;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid #dedede;
    border-radius: 7px;
    background: #f8f9fa;
  }

  #checkoutView #checkoutLines tr:nth-child(even) { background: #fff; }

  #checkoutView #checkoutLines td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    vertical-align: bottom;
    text-align: left;
    white-space: nowrap;
    font-size: 11px;
  }

  #checkoutView #checkoutLines .headlineContainer {
    grid-column: 1 / -1;
    grid-row: 1;
    overflow: hidden;
  }

  #checkoutView #checkoutLines .productNumberContainer {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
    font-size: 11px;
  }
  #checkoutView #checkoutLines .productNumberContainer::before {
    content: "Varenr. ";
    font-weight: 600;
  }
  #checkoutView #checkoutLines .productNumberContainer .itemNoteIcon {
    width: 12px;
    height: 12px;
    margin-right: 3px;
    vertical-align: -2px;
  }

  #checkoutView #checkoutLines .headlineContainer a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }

  #checkoutView #checkoutLines .variantName {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-size: 11px;
  }

  #checkoutView #checkoutLines .quantityContainer { grid-column: 1; grid-row: 3; }
  #checkoutView #checkoutLines .itemPriceContainer,
  #checkoutView #checkoutLines .linePriceContainer { text-align: right; }
  #checkoutView #checkoutLines .itemPriceContainer { grid-column: 2; grid-row: 3; }
  #checkoutView #checkoutLines .linePriceContainer { grid-column: 3; grid-row: 3; }

  #checkoutView #checkoutLines .itemPriceContainer::before,
  #checkoutView #checkoutLines .linePriceContainer::before {
    display: block;
    margin-bottom: 3px;
    color: #666;
    font-size: 10px;
    font-weight: 400;
  }
  #checkoutView #checkoutLines .itemPriceContainer::before { content: "Pris/stk."; }
  #checkoutView #checkoutLines .linePriceContainer::before { content: "Total"; }

  #checkoutView #checkoutLines .quantity-box {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    white-space: nowrap;
  }
  #checkoutView #checkoutLines .quantity-adj {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 30px;
    margin: 0;
    padding: 0;
  }
  #checkoutView #checkoutLines .quantity-input {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 30px;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  #checkoutView .basketFooter td {
    padding: 10px 0 14px;
    text-align: right;
  }
  #checkoutView .basketFooter td > span { display: block; margin: 3px 0; }

  #checkoutView .basketFooter .basketTotalAmountCaption {
    font-size: 14px;
    line-height: 1.4;
  }
  #checkoutView .basketFooter .basketTotalAmountToPay {
    font-size: 18px;
    font-weight: 600;
  }

  #checkoutView h2.text-center:has(._orderStep) {
    padding-top: 14px;
  }
  #checkoutView ._orderStep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 4px 7px 4px 0;
    padding: 0 !important;
    border-radius: 50%;
    vertical-align: middle;
    font-size: 15px;
    line-height: 1;
  }

  #checkoutView #_getDataFromPreviousBox {
    display: flex;
    align-items: stretch;
  }
  #checkoutView #_getDataFromPreviousBox input {
    flex: 1 1 auto;
    min-width: 0;
  }
  #checkoutView #_getDataFromPreviousBox .input-group-btn {
    display: flex;
    flex: 0 0 42px;
    width: 42px;
  }
  #checkoutView #btn-get-customer-data {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 35px;
    padding: 0;
    font-size: 0;
  }
  #checkoutView #btn-get-customer-data::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
  }
}
