/* Ekomuzeum — mobilne podsumowanie złożonego zamówienia.
   Dotyczy wyłącznie #orderPrint. Bez zmian w koszyku, formularzu i desktopie.
   Wczytać PO mobile-checkout.css. */
@media screen and (max-width: 700px) {
  #orderPrint,
  #orderPrint #orderedProducts {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #orderPrint #orderedProducts table {
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    gap: 0;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    table-layout: auto !important;
    font-size: 15px;
  }

  #orderPrint #orderedProducts table > thead {
    display: none !important;
  }

  /* W HTML Quick.Cart TFOOT jest przed TBODY — na ekranie kolejność odwrotna. */
  #orderPrint #orderedProducts table > tbody {
    display: block !important;
    order: 1;
    width: 100%;
    min-width: 0;
  }
  #orderPrint #orderedProducts table > tfoot {
    display: block !important;
    order: 2;
    width: 100%;
    min-width: 0;
    padding-top: 10px;
  }

  /* Każdy produkt jako osobny blok. */
  #orderPrint #orderedProducts tbody > tr {
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0 0 12px;
    padding: 14px;
    border: 1px solid #daddd4;
    border-radius: 10px;
    background: #fff;
  }
  #orderPrint #orderedProducts tbody > tr > * {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 2px 0 !important;
    float: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: right !important;
  }
  #orderPrint #orderedProducts tbody > tr > :first-child {
    display: block !important;
    padding-bottom: 9px !important;
    text-align: left !important;
    color: #34552b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
  }
  #orderPrint #orderedProducts tbody > tr > :first-child a {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  #orderPrint #orderedProducts tbody > tr > :nth-child(2)::before { content: 'Cena'; }
  #orderPrint #orderedProducts tbody > tr > :nth-child(3)::before { content: 'Ilość'; }
  #orderPrint #orderedProducts tbody > tr > :nth-child(4)::before { content: 'Wartość'; }
  #orderPrint #orderedProducts tbody > tr > :nth-child(2)::before,
  #orderPrint #orderedProducts tbody > tr > :nth-child(3)::before,
  #orderPrint #orderedProducts tbody > tr > :nth-child(4)::before {
    flex: 0 0 auto;
    color: #626b60;
    font-weight: 400;
    text-align: left;
  }

  /* Podsumowanie, sposób wysyłki i ostateczna kwota. */
  #orderPrint #orderedProducts tfoot > tr {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    box-sizing: border-box;
    gap: 8px 12px;
    width: 100%;
    min-width: 0;
    padding: 12px 3px;
    border-bottom: 1px solid #edf2e7;
  }
  #orderPrint #orderedProducts tfoot > tr > * {
    display: block !important;
    box-sizing: border-box;
    width: auto !important;
    max-width: 100%;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.5;
  }
  #orderPrint #orderedProducts tfoot > tr > th {
    flex: 1 1 60%;
    text-align: left !important;
    font-weight: 400;
  }
  #orderPrint #orderedProducts tfoot > tr > td {
    flex: 0 0 auto;
    margin-left: auto !important;
    text-align: right !important;
    font-weight: 700;
  }
  #orderPrint #orderedProducts tfoot .summaryShippingPayment th strong {
    display: block;
    margin-top: 5px;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  #orderPrint #orderedProducts tfoot .summaryOrder {
    padding: 16px 3px;
    border-bottom: 0;
  }
  #orderPrint #orderedProducts tfoot .summaryOrder th,
  #orderPrint #orderedProducts tfoot .summaryOrder td {
    font-size: 18px;
    font-weight: 700;
  }
}
