/* prodavameapple.cz – 4. kolo oprav: kroky objednávky DOPRAVA (/objednavka/krok-1/) a ÚDAJE (/objednavka/krok-2/)
   na mobilu podle prototypů DopravaMobil a UdajeMobil
   v1 · 2026-12-05 · pozice e-web · nálezy e-qa 2026-12-05-kolo4.md
   Načíst ZA pa-qa3.css (pa-qa3-kosik.css). Patří k tomu pa-qa7-objednavka.js.
   Platí jen do 767 px a jen pro body.in-krok-1 / body.in-krok-2. Počítač se nemění.
   Jen vzhled a rozvržení – nabídka doprav a plateb, ceny, pole formuláře i text
   odesílacího tlačítka zůstávají tak, jak je posílá Shoptet.
   Části závislé na skriptu (lišta, sbalený souhrn) se zapnou až třídou html.pa7o-on. */

/* prvky skriptu jsou mimo mobil vždy skryté */
.pa7o-lista, .pa7o-souhrn-h { display: none; }

@media (max-width: 767px) {

  /* ---------- 1) přilepená spodní lišta (vzhled jako .pa3-lista na kartě produktu) ---------- */
  html.pa7o-on body.ordering-process .pa7o-lista {
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border-top: 1px solid #D2D2D7;
    bottom: 0;
    box-sizing: border-box;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
    gap: 14px;
    justify-content: space-between;
    left: 0;
    margin: 0;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    right: 0;
    z-index: 55; /* pod hlavičkou (56), menu a košíkem z hlavičky */
  }
  html.pa7o-on body.ordering-process .pa7o-lista__sum {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    min-width: 0;
  }
  html.pa7o-on body.ordering-process .pa7o-lista__sum[hidden] { display: none; }
  html.pa7o-on body.ordering-process .pa7o-lista__popis {
    color: #6E6E73;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
  }
  html.pa7o-on body.ordering-process .pa7o-lista__cena {
    color: #1D1D1F;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    white-space: nowrap;
  }
  html.pa7o-on body.ordering-process button.pa7o-lista__btn {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: #0077B6;
    border: 0;
    border-radius: 980px;
    box-shadow: none;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    flex: 1 1 auto;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    justify-content: center;
    line-height: 1.2;
    margin: 0;
    min-height: 50px;
    min-width: 0;
    padding: 4px 14px;
    text-align: center;
    text-transform: none;
  }
  html.pa7o-on body.ordering-process button.pa7o-lista__btn:active { background: #006399; }
  html.pa7o-on body.ordering-process button.pa7o-lista__btn:focus-visible { outline: 2px solid #0077B6; outline-offset: 2px; }
  /* otevřené menu, hledání nebo košík z hlavičky: lišta uhne */
  html.pa7o-on body.ordering-process.user-action-visible .pa7o-lista { display: none; }
  /* lišta nezakryje konec stránky (výšku lišty hlásí skript, 71 px je záloha) */
  html.pa7o-on body.ordering-process .overall-wrapper { padding-bottom: var(--pa7o-h, calc(71px + env(safe-area-inset-bottom, 0px))); }
  /* bublina chatu nad lištou, ne přes tlačítko */
  html.pa7o-on body.ordering-process #smartsupp-widget-container > div[data-testid="widgetButtonFrame"] { bottom: calc(83px + env(safe-area-inset-bottom, 0px)) !important; }
  html.pa7o-on body.ordering-process #smartsupp-widget-container > div[data-testid="widgetPopupFrame"],
  html.pa7o-on body.ordering-process #smartsupp-widget-container > div[data-testid="widgetMessageFrame"] { bottom: calc(151px + env(safe-area-inset-bottom, 0px)) !important; }

  /* ---------- 2) volby dopravy a platby: jeden řádek místo karty v kartě ---------- */
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper {
    margin-bottom: 8px;
    padding: 6px 12px;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label {
    align-items: start;
    box-sizing: border-box;
    column-gap: 10px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    margin: 0;
    min-height: 52px;
    padding-bottom: 10px;
    padding-right: 0;
    padding-top: 10px;
    row-gap: 4px;
    width: 100%;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label > .payment-info {
    display: block !important;
    flex: none !important;
    grid-column: 1;
    grid-row: 1;
    justify-self: stretch;
    max-width: none !important;
    min-width: 0 !important;
    width: auto !important;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label .shipping-billing-name {
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: break-word;
    padding-right: 6px;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label > .payment-shipping-price {
    font-size: 14px;
    grid-column: 2;
    grid-row: 1;
    line-height: 21px;
    max-width: 104px;
    text-align: right;
    white-space: nowrap;
    width: auto;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label > .payment-logo {
    display: block;
    grid-column: 1;
    grid-row: 2;
    line-height: 0;
    width: auto;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label > .payment-logo img {
    height: 20px;
    max-width: 96px;
    object-fit: contain;
    object-position: left center;
    width: auto;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label .sublabel,
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > label .not-possible-info {
    font-size: 13px;
    line-height: 1.45;
    margin-top: 2px;
  }
  /* popis pod názvem: u zvolené volby se text z nápovědy „?“ vypíše rovnou (stejný text, jen viditelný) */
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label > .payment-info:has(> span > .question-tooltip[data-original-title]:not([data-original-title=""])) {
    display: contents !important; /* název vlevo nahoře, popis pod ním přes celou šířku řádku */
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label > .payment-info:has(> span > .question-tooltip[data-original-title]:not([data-original-title=""])) > .shipping-billing-name {
    grid-column: 1;
    grid-row: 1;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label > .payment-info:has(> span > .question-tooltip[data-original-title]:not([data-original-title=""])) > span,
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label > .payment-info:has(> span > .question-tooltip[data-original-title]:not([data-original-title=""])) > em,
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label > .payment-info:has(> span > .question-tooltip[data-original-title]:not([data-original-title=""])) ~ .payment-logo {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label .payment-info > span:has(> .question-tooltip[data-original-title]:not([data-original-title=""])) {
    display: block;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label .question-tooltip[data-original-title]:not([data-original-title=""]) {
    background: none;
    border: 0;
    border-radius: 0;
    color: transparent;
    display: block;
    font-size: 0;
    height: auto;
    line-height: 0;
    margin: 0;
    pointer-events: none;
    text-align: left;
    width: auto;
  }
  html body.in-krok-1 #content .shipping-billing-table > .radio-wrapper > input:checked + label .question-tooltip[data-original-title]:not([data-original-title=""])::after {
    color: #6E6E73;
    content: attr(data-original-title);
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
  }

  /* ---------- 3) „ZDARMA“ → „Zdarma“ (třídu dává skript jen prvkům s textem ZDARMA) ---------- */
  html.pa7o-on body.ordering-process #content .pa7o-zdarma {
    display: inline-block;
    text-transform: lowercase;
  }
  html.pa7o-on body.ordering-process #content .pa7o-zdarma::first-letter { text-transform: uppercase; }

  /* ---------- 4) souhrn sbalený do řádku „Souhrn objednávky · cena“ ---------- */
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn {
    overflow: hidden;
    padding: 0;
  }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > .pa7o-souhrn-h {
    display: block;
    font: inherit;
    margin: 0;
    padding: 0;
  }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > .pa7o-souhrn-h > button.pa7o-souhrn-btn {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    color: #1D1D1F;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    gap: 12px;
    justify-content: space-between;
    line-height: 1.3;
    margin: 0;
    min-height: 56px;
    padding: 8px 20px;
    text-align: left;
    text-transform: none;
    width: 100%;
  }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > .pa7o-souhrn-h > button.pa7o-souhrn-btn::after {
    border-bottom: 1.75px solid currentColor;
    border-right: 1.75px solid currentColor;
    content: "";
    flex: 0 0 auto;
    height: 8px;
    margin: -4px 4px 0 0;
    transform: rotate(45deg);
    transition: transform .2s ease;
    width: 8px;
  }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn.pa7o-open > .pa7o-souhrn-h > button.pa7o-souhrn-btn::after {
    margin-top: 4px;
    transform: rotate(-135deg);
  }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > .pa7o-souhrn-h > button.pa7o-souhrn-btn:focus-visible { outline: 2px solid #0077B6; outline-offset: -2px; }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > #summary-box { display: none; }
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn.pa7o-open > #summary-box {
    display: block;
    padding: 0 20px 16px;
  }
  /* nadpis „Rekapitulace objednávky“ nahrazuje řádek s tlačítkem */
  html.pa7o-on body.ordering-process #content .order-summary.pa7o-souhrn > #summary-box > h2 { display: none; }

  /* ---------- 5) krok 2: přihlášení jako textový odkaz v jednom řádku; H1 32 px ---------- */
  html body.in-krok-2 #content .co-contact-information > .form-group:has(> div > a.login-button) {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    justify-content: space-between;
    margin: 0 0 4px;
    min-height: 44px;
  }
  html body.in-krok-2 #content .co-contact-information > .form-group:has(> div > a.login-button) > .label {
    color: #6E6E73;
    font-size: 13px;
    margin: 0;
  }
  html body.in-krok-2 #content .co-contact-information > .form-group:has(> div > a.login-button) > div { width: auto; }
  html body.in-krok-2 #content .co-contact-information a.login-button {
    background: none !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    color: #0077B6 !important;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    line-height: 1.3;
    min-height: 44px;
    padding: 0 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    width: auto;
  }
  html body.in-krok-1 #content > h1,
  html body.in-krok-2 #content > h1 {
    font-size: 32px;
    letter-spacing: -.02em;
    line-height: 1.1;
  }

  /* ---------- 6) krok 1: „Země doručení“ jako jeden nízký řádek (pole zůstává) ---------- */
  html body.in-krok-1 #content .co-basic-information {
    padding-bottom: 10px;
    padding-top: 10px;
  }
  /* nadpis bloku jen pro čtečky – popisek pole „Země doručení“ zůstává vidět */
  html body.in-krok-1 #content .co-basic-information > h2 {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  html body.in-krok-1 #content .co-basic-information .form-group {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0;
    width: 100%;
  }
  html body.in-krok-1 #content .co-basic-information .form-group > label {
    flex: 0 0 auto;
    margin: 0;
    position: static;
  }
  html body.in-krok-1 #content .co-basic-information .form-group > select {
    flex: 0 1 190px;
    height: 44px;
    min-width: 0;
    padding-bottom: 8px;
    padding-top: 8px;
    width: auto;
  }
}
