/* ============================================================
   Антим Клима — page wrapper (shared base, v2)
   Used by tpl-navy-page.php (cart / checkout / account + every
   content page: legal, faq, service subpages, DSK…), the coded
   contact / about pages and the blog views (navy-open.php). Frost
   page, the chrome above, v2 breadcrumb. Per-area styles live in
   cart.css / checkout.css / account.css / static-pages.css /
   blog.css. Scoped to .ak. Loaded after home.css + v2.css.
   ============================================================ */

/* desktop/mobile chrome toggle (same breakpoint as home.css) */
.ak.ak-inner-page .ak-desktop { display: none; }
.ak.ak-inner-page .ak-mobile  { display: block; }
@media (min-width: 1024px) {
  .ak.ak-inner-page .ak-desktop { display: block; }
  .ak.ak-inner-page .ak-mobile  { display: none; }
}

/* ---- page surface (all modes: WooCommerce, document, Elementor content) ---- */
.ak.ak-inner-page { background: var(--frost); color: var(--ink); min-height: 100vh; }
.ak .ak-chrome-band { position: relative; background: transparent; }

/* breadcrumb (v2.css draws the light .ak-crumbs) */
.ak .ak-page-head { padding-top: 20px; padding-bottom: 18px; }

/* ---- content area ---- */
/* Elementor/CF7 pages: render the real content on its own background; just give breathing room. */
.ak .ak-content-main { color: var(--ink); padding-bottom: 10px; }
.ak .ak-content-main a { color: var(--cold-ink); }
/* keep the existing content's own widths/colors */

/* WooCommerce form area (constrained); per-page css paints the rest. */
.ak .ak-wc-main { color: var(--ink); padding-top: 8px; padding-bottom: 20px; }

/* WooCommerce notices — plain border all round, no green / red / blue side bar */
.ak.ak-page-wc .woocommerce-message,
.ak.ak-page-wc .woocommerce-info,
.ak.ak-page-wc .woocommerce-error {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-btn); color: var(--ink); list-style: none; font-size: 15.5px;
}
.ak.ak-page-wc .woocommerce-message a,
.ak.ak-page-wc .woocommerce-info a,
.ak.ak-page-wc .woocommerce-error a { color: var(--cold-ink); font-weight: 700; }
.ak.ak-page-wc .woocommerce-message::before { color: var(--ok); }
.ak.ak-page-wc .woocommerce-info::before { color: var(--cold-ink); }
.ak.ak-page-wc .woocommerce-error::before { color: var(--hot); }

@media (max-width: 1023px) {
  .ak .ak-page-head { padding-left: 16px; padding-right: 16px; }
}

/* DSK credit plugin pages (/dsk → /dskbuy → /dsksend; plugin markup + css):
   the form is full-bleed by default — give it the page gutter and a readable
   width. Tabbar + Chaty are hidden there like on checkout (home.css). */
/* (beats static-pages.css' 36px 0 56px content padding) */
.ak.ak-page-content .ak-content-main.ak-dsk-main { padding: 28px 16px 48px; }
/* one column for the form and any wpautop <p>: beats static-pages.css' 860px +
   16px-gutter rules on `.ak-content-main > p/ul/…` (the main already has the gutter) */
.ak.ak-page-content .ak-content-main.ak-dsk-main > * { box-sizing: border-box; max-width: 848px; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
.ak .ak-dsk-main img.dsk_logo_big { max-width: 100%; height: auto; }
/* buttons + "ver. 1.2.0" row overflows at 320 → let it wrap */
.ak .ak-dsk-main .dsk_row_bottom { flex-wrap: wrap; gap: 8px 0; box-sizing: border-box; }

/* ============================================================
   ORDER TABLES — thank-you (.woocommerce-table--order-details) and
   pay-for-order (form#order_review > table.shop_table — body.woocommerce-
   order-pay only: on checkout #order_review holds the review table). Partdo leaves
   them as bordered 2–3 column tables that squeeze the product name into
   a narrow column on phones; rebuilt as flex rows in a glass card (same
   look as the checkout summary). Lives here, not in checkout.css, so the
   my-account view-order page (same order-details table, body.woocommerce-
   account) shares it; account.css keeps its table rules off this table.
   Colours are the --c-* tokens checkout.css / account.css set on
   .ak.ak-page-wc (--c-ink = text); the fallbacks are the same light values.
   ============================================================ */
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table {
  display: block; width: 100%; margin: 0 0 20px; padding: 4px 20px;
  background: var(--c-glass, #fff) !important; border: 1px solid var(--c-line, var(--line)) !important;
  border-radius: 16px; box-sizing: border-box; color: var(--c-ink, var(--ink));
}
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details :is(thead, tbody, tfoot),
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table :is(tbody, tfoot) { display: block; }
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table thead { display: none; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details tr,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table tr {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--c-line, var(--line)); background: transparent !important;
}
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details tfoot tr:last-child,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table tfoot tr:last-child { border-bottom: 0; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details :is(th, td),
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table :is(th, td) {
  display: block; padding: 0 !important; border: 0 !important; background: transparent !important;
  color: var(--c-ink, var(--ink)) !important; font-family: var(--ak-font); font-size: 14px; font-weight: 600; line-height: 1.45;
  text-align: left; overflow-wrap: anywhere;
}
/* label / name column grows, value column stays right-aligned */
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details :is(td.product-name, tfoot th),
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table :is(td.product-name, tfoot th) { flex: 1 1 0; min-width: 0; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details :is(td.product-total, tfoot td),
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table :is(td.product-subtotal, tfoot td) { flex: 0 1 auto; max-width: 55%; text-align: right; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details :is(td.product-total, tfoot td) .woocommerce-Price-amount,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table :is(td.product-subtotal, tfoot td) .woocommerce-Price-amount { font-weight: 800; white-space: nowrap; }
/* head row ("Продукт / Общо") + total labels muted */
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details thead th {
  font-size: 13.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--c-sec, var(--muted)) !important;
}
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details tfoot th,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table tfoot th { color: var(--c-sec, var(--muted)) !important; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details tfoot small,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table tfoot small { display: block; font-size: 12px; font-weight: 500; color: var(--c-sec, var(--muted)); }
/* grand total: the last tfoot row that carries an amount (payment method /
   customer note rows follow it and have none) — white, larger, heavier */
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) :is(th, td),
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) :is(th, td) { color: var(--c-ink, var(--ink)) !important; font-size: 16px; font-weight: 800; }
/* product name: link + "× 1" + item meta (variation / монтаж) */
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details td.product-name a { color: var(--c-ink, var(--ink)) !important; text-decoration: none; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details .product-quantity,
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table .product-quantity { color: var(--c-sky, var(--cold-ink)); font-weight: 700; white-space: nowrap; }
body.woocommerce-order-pay .ak.ak-page-wc #order_review > table.shop_table td.product-quantity { flex: 0 0 auto; }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details ul.wc-item-meta { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; font-weight: 500; color: var(--c-sec, var(--muted)); }
:is(body.woocommerce-checkout, body.woocommerce-account) .ak.ak-page-wc .woocommerce-table--order-details ul.wc-item-meta :is(strong, p) { display: inline; margin: 0; font-weight: 600; }
