/*
 * Jednostránková pokladna (inc/checkout/), podle prototypu
 * servis/prototypy/pokladna/. Načítá se jen na její stránce.
 * Barvy jen z tokenů tématu, takže sedí na všechny varianty (default / autola /
 * hsauto). Woo vlastní CSS téma nenačítá (inc/setup_theme/unenqueue.php),
 * proto jsou tu i základy pro pole a platby z Woo šablon.
 */

.ap-co-page {
    --co-bg: var(--color-text-50, #f4f5f7);
    --co-line: var(--color-text-200, #dfe2e7);
    --co-line-2: var(--color-text-300, #c9cdd4);
    --co-muted: var(--color-text-500, #5d636e);
    --co-fg: var(--color-text-900, #17191d);
    --co-accent: var(--color-primary-600, #155dfc);
    --co-accent-2: var(--color-primary-700, #1447e6);
    --co-ok: var(--color-success-700, #187a3e);
    --co-err: var(--color-danger-600, #c81e1e);
    background: var(--co-bg);
    color: var(--co-fg);
}

.ap-co [hidden],
.ap-co-page [hidden] { display: none !important; }

/* Šířka = kontejner tématu: hlavička `max-w-site`, obsah `.site-main`. */
.ap-co-top { display: flex; align-items: center; gap: 16px; padding: 16px; }
.ap-co-logo { font-weight: 700; font-size: 18px; color: inherit; text-decoration: none; }
.ap-co-logo-img { max-height: 44px; width: auto; }
.ap-co-back { color: var(--co-accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.ap-co-secure { margin-left: auto; color: var(--co-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.ap-co-secure::before {
    content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ap-co-main { padding: 0 16px 64px; }
.ap-co-title { font-size: 26px; margin: 4px 0 16px; }

.ap-co { display: grid; gap: 16px; --c-zas: #d42a32; --c-dpd: #8a1538; --c-gls: #1c3f94; --c-bal: #e0a400; --c-ppl: #1b4d9b; }
.ap-co-form > .woocommerce-NoticeGroup { margin-bottom: 12px; }

/* ---- rozvržení: vlevo kroky, vpravo souhrn (v DOM první kvůli mobilu) ---- */
.ap-co-grid { display: grid; gap: 12px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.ap-co-left { display: grid; gap: 12px; min-width: 0; }
.ap-co-right { min-width: 0; background: #fff; border: 1px solid var(--co-line); border-radius: var(--ap-co-radius, 0); }
@media (min-width: 1000px) {
    .ap-co-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
    .ap-co-left { grid-column: 1; grid-row: 1; }
    .ap-co-right { grid-column: 2; grid-row: 1; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}

/* ---- kroky ---- */
.ap-co-st { background: #fff; border: 1px solid var(--co-line); border-radius: var(--ap-co-radius, 0); }
.ap-co-st-h { display: flex; align-items: center; gap: 12px; padding: 18px 24px; }
.ap-co-st-h h2 { font-size: 18px; margin: 0; flex: 1; }
.ap-co-n {
    width: 26px; height: 26px; display: grid; place-items: center; flex: none;
    font-weight: 700; font-size: 13px; border: 1.5px solid var(--co-line-2); color: var(--co-muted);
}
.ap-co-edit { display: none; }
.ap-co-st-sum { display: none; padding: 0 24px 18px 62px; color: var(--co-muted); font-size: 14px; }
.ap-co-st-sum b { color: var(--co-fg); font-weight: 600; }
.ap-co-st-b { display: none; padding: 4px 24px 24px 62px; }
.ap-co-st-b > * + * { margin-top: 18px; }
.ap-co-st[data-state="active"] .ap-co-st-b { display: block; }
.ap-co-st[data-state="active"] .ap-co-n { background: var(--co-accent); border-color: var(--co-accent); color: #fff; }
.ap-co-st[data-state="done"] .ap-co-st-sum { display: block; }
.ap-co-st[data-state="done"] .ap-co-edit { display: inline; }
.ap-co-st[data-state="done"] .ap-co-n { background: var(--co-ok); border-color: var(--co-ok); color: #fff; }
.ap-co-st[data-state="done"] .ap-co-n::before { content: "✓"; }
.ap-co-st[data-state="done"] .ap-co-n span { display: none; }
.ap-co-st[data-state="todo"] h2 { color: var(--co-muted); }
@media (max-width: 600px) {
    .ap-co-st-h { padding: 16px; }
    .ap-co-st-b, .ap-co-st-sum { padding-left: 16px; padding-right: 16px; }
}

/* ---- prvky ---- */
.ap-co-btn, .ap-co #place_order {
    display: inline-block; border: 1px solid var(--co-accent); background: var(--co-accent); color: #fff;
    font: inherit; font-weight: 600; padding: 11px 20px; text-decoration: none; cursor: pointer; border-radius: var(--ap-co-radius, 0);
}
.ap-co-btn:hover, .ap-co #place_order:hover { background: var(--co-accent-2); border-color: var(--co-accent-2); }
.ap-co-btn:disabled { opacity: .55; cursor: default; }
.ap-co-btn[data-next="ship"]::after { content: "→"; margin-left: 10px; }
.ap-co-btn.ap-co-ghost { background: transparent; color: var(--co-accent); }
.ap-co #place_order { width: 100%; padding: 15px 20px; font-size: 16px; margin-top: 12px; }
.ap-co-link {
    border: 0; background: none; padding: 0; color: var(--co-accent); font: inherit; font-weight: 600; font-size: 14px;
    text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.ap-co-small, .ap-co-small .ap-co-link { font-size: 13px; }
.ap-co-hint { color: var(--co-muted); font-size: 13px; margin: 0; }
.ap-co-err { color: var(--co-err); font-size: 14px; margin: 0; }
.ap-co-k { display: block; font-size: 12px; color: var(--co-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin: 0 0 6px; }
.ap-co-info { background: var(--co-bg); padding: 12px 14px; font-size: 14px; }
.ap-co-warn {
    background: var(--color-warning-50, #fff8e6); color: var(--color-warning-800, #6b4e00);
    border-left: 3px solid var(--color-warning-500, #e0a400); padding: 8px 12px; font-size: 14px; margin: 8px 0 0;
}
.ap-co-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; margin: 0; }
.ap-co-actions a { color: var(--co-accent); font-weight: 600; }
/* Zaškrtávátka: label je flex (políčko vlevo, text vedle). Totéž pro souhlas
   s podmínkami z Woo šablony. */
.ap-co-check { margin: 0; }
.ap-co .ap-co-check label,
.ap-co .woocommerce-form__label-for-checkbox {
    display: flex; align-items: flex-start; gap: 12px; margin: 0;
    font-size: 14px; font-weight: 400; line-height: 1.5; cursor: pointer;
}
.ap-co .ap-co-check input[type="checkbox"],
.ap-co .woocommerce-form__label-for-checkbox input[type="checkbox"] {
    flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--co-accent);
}

/* kontakt */
.ap-co-mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.ap-co-mail .form-row { margin: 0; }
.ap-co-pass > * + * { margin-top: 12px; }
.ap-co-pass .form-row { margin: 0; max-width: 420px; }

/* adresa jako text */
.ap-co-addr-txt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 16px; border: 1px solid var(--co-line); }
.ap-co-addr-txt .ap-co-k { margin: 0; }
.ap-co-addr-txt .ap-co-v { grid-column: 1; font-size: 14px; }
.ap-co-addr-txt .ap-co-link { grid-column: 2; grid-row: 1 / 3; align-self: center; }

/* ---- pole (Woo woocommerce_form_field) ---- */
.ap-co-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ap-co-fields .form-row { margin: 0 0 12px; grid-column: 1 / -1; }
.ap-co-fields .form-row-first { grid-column: 1; }
.ap-co-fields .form-row-last { grid-column: 2; }
.ap-co-fields #billing_postcode_field { grid-column: 1; }
.ap-co-fields #billing_city_field { grid-column: 2; }
@media (max-width: 600px) {
    .ap-co-fields { grid-template-columns: 1fr; }
    .ap-co-fields .form-row-first, .ap-co-fields .form-row-last,
    .ap-co-fields #billing_postcode_field, .ap-co-fields #billing_city_field { grid-column: 1; }
}
/* Jen popisky polí formuláře. Obecné `.ap-co label` přebíjelo rozvržení
   zaškrtávátek, voleb dopravy a řádků výdejních míst (taky labely). */
.ap-co .form-row > label:not(.woocommerce-form__label-for-checkbox),
.ap-co .ap-co-srch > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ap-co .required { color: var(--co-err); text-decoration: none; }
.ap-co .optional { color: var(--co-muted); font-weight: 400; }
/* Doprava, u které je telefon povinný (žádost o kontrolu ceny, nadrozměr). */
.ap-co-phone-req #billing_phone_field .optional { display: none; }
.ap-co-phone-req #billing_phone_field label::after { content: " *"; color: var(--co-err); }
.ap-co .description { display: block; color: var(--co-muted); font-size: 12.5px; margin-top: 3px; }
.ap-co .input-text, .ap-co select, .ap-co textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--co-line-2);
    background: #fff; font: inherit; color: inherit; border-radius: var(--ap-co-radius, 0);
}
.ap-co .input-text:focus, .ap-co select:focus, .ap-co textarea:focus {
    outline: 2px solid var(--color-primary-500, #2b7fff); outline-offset: 0; border-color: transparent;
}
.ap-co .woocommerce-invalid .input-text, .ap-co .woocommerce-invalid select { border-color: var(--co-err); }
.ap-co-ship-address .shipping_address { margin-top: 12px; }

/* selectWoo bez svého CSS: nechat jen obyčejný select (viz routing.php). */
.ap-co .select2-container { display: none !important; }
.ap-co select.select2-hidden-accessible {
    position: static !important; width: 100% !important; height: auto !important;
    clip: auto !important; overflow: visible !important; margin: 0 !important;
}

/* ---- doprava: záložky a volby ---- */
.ap-co-shipwrap > * + * { margin-top: 14px; }
.ap-co-tabs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); border: 1px solid var(--co-line-2); }
.ap-co-tabs button {
    border: 0; border-right: 1px solid var(--co-line-2); background: #fff; color: inherit; font: inherit; font-weight: 600;
    padding: 12px 8px; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center;
    gap: 1px 12px; text-align: left; cursor: pointer;
}
.ap-co-tab-i { grid-row: 1 / 3; width: 26px; height: 26px; }
@media (max-width: 600px) {
    .ap-co-tabs button { grid-template-columns: auto; justify-items: center; text-align: center; }
    .ap-co-tab-i { grid-row: auto; width: 22px; height: 22px; }
}
.ap-co-tabs button:last-child { border-right: 0; }
.ap-co-tabs button small { font-weight: 400; color: var(--co-muted); font-size: 12px; }
.ap-co-tabs button[aria-selected="true"] { background: var(--co-fg); color: #fff; }
.ap-co-tabs button[aria-selected="true"] small { color: inherit; opacity: .8; }
.ap-co-tabs button.is-off small { color: var(--co-err); }
.ap-co-tabs button[aria-selected="true"].is-off small { color: inherit; }
.ap-co-opts { display: grid; gap: 8px; }
.ap-co-opt {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 16px;
    border: 1px solid var(--co-line); cursor: pointer; margin: 0; font-size: 15px; font-weight: 400;
}
.ap-co-opt:has(input:checked) { border-color: var(--co-fg); box-shadow: inset 0 0 0 1px var(--co-fg); }
.ap-co-opt input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--co-accent); }
.ap-co-opt-t { font-weight: 600; }
.ap-co-opt-p { text-align: right; font-weight: 600; white-space: nowrap; }
.ap-co-opt-p small { display: block; font-weight: 400; color: var(--co-muted); font-size: 12px; }
.ap-co-opt-d { grid-column: 2 / 4; color: var(--co-muted); font-size: 13px; }
/* Žádost o kontrolu ceny: vedle jiné dopravy jen odkaz, ne rovnocenná volba. */
.ap-co-ask { display: block; padding: 2px 16px; cursor: pointer; margin: 0; font-size: 14px; font-weight: 400; }
.ap-co-ask input { width: 15px; height: 15px; margin: 0 8px 0 0; vertical-align: -2px; accent-color: var(--co-accent); }
.ap-co-ask span { color: var(--co-accent); font-weight: 600; text-decoration: underline; }
.ap-co-ask small { display: none; color: var(--co-muted); font-size: 13px; margin-top: 4px; }
.ap-co-ask:has(input:checked) { padding: 12px 16px; border: 1px solid var(--co-fg); box-shadow: inset 0 0 0 1px var(--co-fg); }
.ap-co-ask:has(input:checked) span { color: inherit; text-decoration: none; }
.ap-co-ask:has(input:checked) small { display: block; }
/* Výsledek kontroly AI nad volbami dopravy. */
.ap-co-ai { border: 1px solid var(--co-ok); border-left-width: 4px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.ap-co-ai-t { margin: 0 0 6px; font-weight: 700; font-size: 15px; color: var(--co-ok); }
.ap-co-ai ul { list-style: none; margin: 0; padding: 0; }
.ap-co-ai li { margin: 2px 0; padding: 0; }
.ap-co-ai-no { color: var(--co-err); font-weight: 600; }
.ap-co-ai-n { margin: 8px 0 0; color: var(--co-muted); }
.ap-co-ai-ask { margin: 8px 0 0; }
/* Překryv po dobu kontroly AI: přes celý krok Doručení, ať nejde pokračovat. */
#ap-co-st-ship .ap-co-st-b { position: relative; }
.ap-co-aibusy {
    position: absolute; inset: 0; z-index: 5; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 6px; padding: 48px 16px 16px; text-align: center; font-size: 15px; background: rgba(255, 255, 255, .94);
}
.ap-co-aibusy[hidden] { display: none; }
.ap-co-aibusy strong { font-size: 18px; }
.ap-co-aibusy span:last-child { color: var(--co-muted); }
.ap-co-aibusy-s { width: 40px; height: 40px; margin-bottom: 8px; border: 4px solid var(--co-line); border-top-color: var(--co-accent); border-radius: 50%; animation: ap-co-spin .9s linear infinite; }
@keyframes ap-co-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ap-co-aibusy-s { animation-duration: 3s; } }

/* výdejní místa */
.ap-co-points > * + * { margin-top: 10px; }
.ap-co-loading { color: var(--co-muted); font-size: 14px; }
.ap-co-near-h { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; color: var(--co-muted); }
.ap-co-near-h b { color: var(--co-fg); font-weight: 600; }
.ap-co-near { list-style: none; margin: 0; padding: 0; border: 1px solid var(--co-line); }
.ap-co-near li + li { border-top: 1px solid var(--co-line); }
.ap-co-nr { display: grid; grid-template-columns: 18px 84px minmax(0, 1fr) auto; gap: 1px 12px; padding: 11px 14px; cursor: pointer; margin: 0; font-weight: 400; font-size: 14px; }
/* Logo dopravce (inc/shipping/logos.php) ve vlastním sloupci přes oba řádky. */
.ap-co-nr-l { grid-column: 2; grid-row: 1 / 3; align-self: center; display: flex; align-items: center; min-width: 0; }
.ap-co-logo-i { display: block; max-width: 84px; max-height: 28px; width: auto; height: auto; object-fit: contain; }
.ap-co-logo-ph { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--co-fg); overflow-wrap: anywhere; line-height: 1.2; }
.ap-co-pop .svc .ap-co-logo-i { max-height: 22px; margin-right: 8px; }
.ap-co-nr-t { grid-column: 3; grid-row: 1; }
.ap-co-nr-d { grid-column: 4; grid-row: 1; }
@media (max-width: 600px) {
    .ap-co-nr { grid-template-columns: 18px 56px minmax(0, 1fr) auto; gap: 1px 8px; }
    .ap-co-logo-i { max-width: 56px; }
}
.ap-co-nr:hover { background: var(--co-bg); }
.ap-co-nr:has(input:checked) {
    background: var(--color-primary-50, color-mix(in srgb, var(--co-accent) 8%, #fff));
    box-shadow: inset 4px 0 0 var(--co-accent);
}
.ap-co-nr input { grid-row: 1 / 3; align-self: center; margin: 0; width: 16px; height: 16px; accent-color: var(--co-accent); }
.ap-co-nr-t { font-weight: 600; overflow-wrap: anywhere; }
.ap-co-nr-d { text-align: right; font-size: 13px; color: var(--co-muted); white-space: nowrap; }
.ap-co-nr-a { grid-column: 3; grid-row: 2; color: var(--co-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ap-co-nr-p { grid-column: 4; grid-row: 2; text-align: right; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ap-co-nr-p small { display: block; font-weight: 400; color: var(--co-muted); font-size: 12px; }
.ap-co-sw { display: inline-block; width: 11px; height: 11px; background: var(--c); margin-right: 8px; vertical-align: -1px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--c); }
.ap-co-sw.point { border-radius: 50%; }
.ap-co-tag { font-size: 11px; font-weight: 600; color: var(--co-accent); border: 1px solid var(--co-accent); padding: 0 4px; margin-left: 4px; white-space: nowrap; }
.ap-co-srch { position: relative; }
.ap-co-srch input { width: 100%; padding: 10px 12px; border: 1px solid var(--co-line-2); font: inherit; }
.ap-co-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff; border: 1px solid var(--co-line); box-shadow: 0 6px 18px rgb(0 0 0 / .18); list-style: none; padding: 0; margin: 2px 0 0; }
.ap-co-sugg button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 11px; display: flex; justify-content: space-between; gap: 8px; font: inherit; cursor: pointer; }
.ap-co-sugg button:hover, .ap-co-sugg button.on { background: var(--co-bg); }
.ap-co-sugg small { color: var(--co-muted); }

/* ---- souhrn ---- */
.ap-co-sumhead h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; margin: 0; padding: 20px 22px 0; }
.ap-co-sumhead h2 a { font-size: 13px; font-weight: 600; color: var(--co-accent); }
.ap-co-sumtoggle { display: none; }
.ap-co-sumbody { padding: 14px 22px 20px; }
.ap-co-sumbody > * + * { margin-top: 14px; }
.ap-co-items { list-style: none; margin: 0; padding: 0 0 14px; display: grid; gap: 14px; border-bottom: 1px solid var(--co-line); }
/* Obrázek bez čtvercového rámu: vysoký produkt (lahev) zůstane vysoký,
   široký se vejde na šířku. Výška má strop, ať řádek nenafoukne. */
.ap-co-it { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; font-size: 14px; align-items: start; }
/* Strop v pixelech, ne v %: procenta v gridu/flexu se počítají z přirozené
   velikosti obrázku (300 px) a obrázek přetekl přes oddělovací linku. */
.ap-co-it-ph { width: 60px; height: 76px; display: flex; align-items: flex-start; justify-content: center; }
.ap-co .ap-co-it-ph img { max-width: 60px; max-height: 76px; width: auto; height: auto; object-fit: contain; display: block; border: 0; background: none; }
.ap-co-it-n { overflow-wrap: anywhere; }
.ap-co-it-n a { color: inherit; text-decoration: none; }
.ap-co-it-n small, .ap-co-it-p small { display: block; color: var(--co-muted); font-size: 12px; font-weight: 400; }
.ap-co-it-note { font-style: italic; }
.ap-co-it-p { text-align: right; white-space: nowrap; font-weight: 600; }
/* Rámování pryč: stránka leží v .entry-content a téma tam dává buňkám tabulek
   `border: 1px solid` (styl článků) + Woo rámeček tabulky souhrnu. Svislé
   linky lepily text i částky k okraji. Zůstávají jen vodorovné oddělovače. */
.ap-co .ap-co-review { width: 100%; border-collapse: collapse; font-size: 14px; border: 0; background: none; margin: 0; }
.ap-co .ap-co-review th, .ap-co .ap-co-review td { padding: 9px 0; text-align: left; vertical-align: top; font-weight: 400; border: 0; background: none; }
.ap-co .ap-co-review tr + tr > * { border-top: 1px solid var(--co-line); }
.ap-co .ap-co-review .order-total > * { border-top: 0; }
.ap-co-review .order-total strong { font-weight: inherit; }
.ap-co-review td { text-align: right; white-space: nowrap; }
.ap-co-review small, .ap-co-review .ap-co-muted { color: var(--co-muted); font-weight: 400; font-size: 13px; }
/* Celkem jako pás přes celou šířku souhrnu (odsazení = padding .ap-co-sumbody). */
.ap-co-review .order-total th, .ap-co-review .order-total td { background: var(--co-bg); font-weight: 700; padding: 14px 0; vertical-align: middle; }
.ap-co-review .order-total th { font-size: 19px; box-shadow: -22px 0 0 var(--co-bg); }
.ap-co-review .order-total td { font-size: 22px; box-shadow: 22px 0 0 var(--co-bg); }
.ap-co-review .includes_tax { display: block; font-size: 12.5px; font-weight: 400; color: var(--co-muted); }
.ap-co-perks { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 8px; font-size: 14px; }
.ap-co-perks li { display: flex; gap: 10px; align-items: baseline; }
.ap-co-perks li::before { content: "✓"; color: var(--co-ok); font-weight: 700; font-size: 16px; }
@media (max-width: 999px) {
    .ap-co-sumhead h2 { display: none; }
    .ap-co-sumtoggle {
        display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px;
        border: 0; background: none; padding: 14px 16px; font: inherit; font-weight: 600; color: inherit; cursor: pointer;
    }
    .ap-co-sumtoggle small { color: var(--co-muted); font-weight: 400; }
    .ap-co-sumtoggle > span::after { content: " ▾"; color: var(--co-muted); }
    .ap-co-sumtoggle[aria-expanded="true"] > span::after { content: " ▴"; }
    .ap-co-right:not(.is-open) .ap-co-sumbody { display: none; }
    .ap-co-sumbody { border-top: 1px solid var(--co-line); padding: 14px 16px 16px; }
    .ap-co-review .order-total th { box-shadow: -16px 0 0 var(--co-bg); }
    .ap-co-review .order-total td { box-shadow: 16px 0 0 var(--co-bg); }
}

/* ---- platby (Woo šablona) ---- */
.ap-co .wc_payment_methods { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ap-co .wc_payment_method { padding: 14px 16px; border: 1px solid var(--co-line); }
.ap-co .wc_payment_method:has(> input:checked) { border-color: var(--co-fg); box-shadow: inset 0 0 0 1px var(--co-fg); }
.ap-co .wc_payment_method > label { display: inline; font-weight: 600; font-size: 15px; margin-left: 6px; cursor: pointer; }
.ap-co .wc_payment_method > input { accent-color: var(--co-accent); }
.ap-co .payment_box { font-size: 13px; color: var(--co-muted); margin: 6px 0 0 26px; }
.ap-co .payment_box p { margin: 0; }
.ap-co .woocommerce-terms-and-conditions-wrapper { font-size: 14px; margin: 8px 0; }
.ap-co .woocommerce-privacy-policy-text p { margin: 0 0 8px; color: var(--co-muted); font-size: 13px; }
.ap-co .woocommerce-privacy-policy-text a, .ap-co .woocommerce-terms-and-conditions-link { color: var(--co-accent); }

/* ---- hlášky Woo ---- */
.ap-co .woocommerce-error, .ap-co .woocommerce-message, .ap-co .woocommerce-info {
    list-style: none; margin: 0 0 12px; padding: 10px 14px; font-size: 14px;
    border-left: 3px solid var(--co-accent); background: var(--color-primary-50, #eff6ff);
}
.ap-co .woocommerce-error { border-left-color: var(--co-err); background: var(--color-danger-50, #fef2f2); }
.ap-co .woocommerce-error li { margin: 2px 0; }

/* ---- mapa výdejních míst (okno) ---- */
.ap-co-modal {
    position: fixed; inset: 0; z-index: 1000; background: rgb(0 0 0 / .45);
    display: grid; place-items: center; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: hidden; padding: 12px;
}
.ap-co-dlg {
    background: #fff; width: min(1200px, 100%); height: min(820px, calc(100vh - 24px)); height: min(820px, calc(100dvh - 24px));
    display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--co-line); overflow: hidden; justify-self: center;
}
.ap-co-dlg-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--co-line); }
.ap-co-dlg-h h2 { font-size: 18px; margin: 0; flex: 1; }
.ap-co-x { border: 0; background: transparent; font-size: 26px; line-height: 1; padding: 2px 8px; color: var(--co-muted); cursor: pointer; }
.ap-co-dlg-b { display: grid; grid-template-columns: 360px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.ap-co-panel { border-right: 1px solid var(--co-line); display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; overflow: hidden; }
.ap-co-search { padding: 12px 14px; border-bottom: 1px solid var(--co-line); position: relative; display: grid; gap: 6px; }
.ap-co-search .ap-co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ap-co-search label { font-size: 12px; color: var(--co-muted); margin: 0; font-weight: 400; }
.ap-co-search .ap-co-link { font-size: 13px; }
.ap-co-search input { width: 100%; padding: 9px 11px; border: 1px solid var(--co-line-2); background: #fff; font: inherit; }
.ap-co-search .ap-co-sugg { left: 14px; right: 14px; top: calc(100% - 10px); }
/* Výběr služeb = filtr nad hledáním (platí pro hledání, mapu i seznam): šedý
   panel s nadpisem, ať nesplývá se seznamem míst pod hledáním. */
.ap-co-legend { padding: 12px 14px 10px; border-bottom: 1px solid var(--co-line); background: var(--co-bg); }
.ap-co-legend .ap-co-k { margin: 0 0 4px; }
.ap-co-legend table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ap-co-legend th { font-weight: 500; color: var(--co-muted); font-size: 12px; text-align: right; padding: 4px 0 4px 10px; }
.ap-co-legend th:first-child { text-align: left; padding-left: 0; }
.ap-co-legend td { padding: 5px 0; border-top: 1px solid var(--co-line-2); }
.ap-co-legend td.n { text-align: right; white-space: nowrap; padding-left: 10px; }
.ap-co-legend label { display: flex; align-items: center; cursor: pointer; font-weight: 400; margin: 0; font-size: 13px; }
.ap-co-legend input { margin: 0 8px 0 0; accent-color: var(--co-accent); }
.ap-co-legend tr.off td:not(:first-child), .ap-co-legend tr.off .lbl { opacity: .45; }
.ap-co-list { overflow: auto; min-height: 0; }
.ap-co-list-h { padding: 10px 14px 8px; font-size: 12.5px; font-weight: 600; color: var(--co-fg); position: sticky; top: 0; z-index: 1; background: #fff; border-top: 6px solid var(--co-bg); border-bottom: 1px solid var(--co-line); }
.ap-co-list ol { list-style: none; margin: 0; padding: 0 0 24px; }
.ap-co-list button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--co-line); background: transparent; padding: 9px 14px; display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; font: inherit; cursor: pointer; }
.ap-co-list button:hover { background: var(--co-bg); }
.ap-co-list .t { font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.ap-co-list .a { color: var(--co-muted); font-size: 12.5px; grid-column: 1; }
.ap-co-list .d { font-size: 12px; color: var(--co-muted); grid-row: 1; grid-column: 2; text-align: right; }
.ap-co-list .pr { font-size: 12.5px; grid-column: 2; text-align: right; white-space: nowrap; }
.ap-co-mapbox { min-height: 0; height: 100%; background: var(--co-bg); }
.ap-co-map-msg { display: grid; place-items: center; height: 100%; padding: 24px; color: var(--co-muted); text-align: center; }
.ap-co-pop { width: 260px; color: #17191d; display: grid; gap: 8px; font-size: 14px; line-height: 1.45; }
.ap-co-pop h3 { font-size: 15px; margin: 0; }
.ap-co-pop .adr { color: #5d636e; font-size: 13px; }
.ap-co-pop .svc { font-size: 12px; font-weight: 600; display: flex; align-items: center; }
.ap-co-pop .hrs { font-size: 12.5px; display: grid; grid-template-columns: auto 1fr; gap: 0 10px; }
.ap-co-pop .hrs .td { font-weight: 700; }
.ap-co-pop .prices { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13.5px; border-top: 1px solid #d9dce2; padding-top: 8px; }
.ap-co-pop .prices b { text-align: right; }
.ap-co-pop .ap-co-btn { width: 100%; }
@media (max-width: 820px) {
    .ap-co-modal { padding: 0; }
    .ap-co-dlg { height: 100vh; height: 100dvh; width: 100%; border: 0; }
    .ap-co-dlg-b { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .ap-co-panel { border-right: 0; border-bottom: 1px solid var(--co-line); grid-template-rows: auto; }
    .ap-co-legend, .ap-co-list { display: none; }
}

/* zaoblená varianta tématu */
.theme-autola { --ap-co-radius: 8px; }
