/* =============================================================================
   KOTOVA BOOKS · "KI-Buchung" section (German page only, 2nd section)
   -----------------------------------------------------------------------------
   Load AFTER /books/books.css and /books/product.css, only on books/index-de.html.
   Every class of its own is bkdai-; nothing styles a bare element, html or
   body; :root is untouched.

   What the section shows: the old German hero composition (the paper receipt of
   Brasserie Nordlicht tucked behind the phone with the KI-Vorschlag sheet:
   a typical 70/30 Bewirtungsbeleg with a part paid by Hotelgutschein), beside
   the copy. The composition itself (.bkp-snap-fig, .bkp-rc, .bkp-phone, the
   sheet and its reveal) is styled by product.css §1/§6/§6b and is NOT scoped to
   the hero, so it renders here as it did there; this file only changes what
   was hero-built around it:
     - no hero padding, glow or min-height: the frame is a normal .bk-section
       (the hero's wrappers .bkp-snap-copy / .bkp-snap-visual are not used: their
       right-bleed and "display: contents" belong to the hero);
     - >= 1280  copy beside the visual (the hero's arrangement: the visual on the
                right, bleeding up to 72 px into the margin), the copy takes the
                rest;
     - < 1280   stacked: the copy, then the composition centred (<= 700 px: from
                601 px the figure is a little wider than in the hero, so the
                phone leaves the receipt's amounts, "Hotelgutschein -200,00" and
                "Bar 216,50", uncovered). Side by side only from 1280 px because
                below that the narrower visual column lets the phone cover those
                amounts (iPad landscape, small laptops);
     - <= 600   the phone board of product.css §1 (no bezel, the top of the
                receipt peeks above the screen, the screen is the column's
                width), unchanged.
   Nothing is scaled. Reveal: the inline script of the block (steps 0-6, once,
   as they scroll into view); no JS, reduced motion, print: the complete static
   state (product.css §1).
   ========================================================================== */

/* the tilted paper and the soft glow reach a few px beyond the columns: they
   never make the page scroll sideways */
.bkdai {
    overflow-x: clip;
}

/* "E-Rechnungen" never breaks after the hyphen ("E-" at the end of a line) */
.bkdai-nb {
    white-space: nowrap;
}

/* --- stacked below 1280 (the shared .bk-split already collapses up to and
   including 1024; this rule keeps it stacked up to 1279 and the rule further
   down takes over from 1280 on) --- */
@media (max-width: 1279.98px) {
    .bkdai .bkdai-split {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--spacing-2xl);
    }

    .bkdai .bk-split-copy {
        max-width: 44rem;
        margin-inline: auto;
    }
}

/* The point of the example is on the receipt: "Hotelgutschein -200,00" and
   "Bar 216,50". In the hero the phone covered those amounts; here the
   composition gets room for them: from 601 px the figure may be 700 px wide
   (the phone's left edge then clears the amounts). */
@media (min-width: 601px) {
    .bkdai .bkp-snap-fig {
        max-width: 700px;
    }
}

/* --- copy beside the visual from 1280 (the hero's arrangement: the visual on
   the right). The visual column is 440-600 px; it bleeds into the right margin
   by up to 72 px (always keeping a 24 px gutter) like the hero's visual, so the
   395 px phone sits at the margin's edge and the receipt, nudged 18 px into the
   column gap, shows its amounts beside it. Below about 1280 px the phone would
   cover part of the receipt (as it did in the hero), hence the stacked layout
   up to 1279 px. --- */
@media (min-width: 1280px) {
    .bkdai .bkdai-split {
        grid-template-columns: minmax(0, 1fr) clamp(440px, 100% - 470px, 600px);
        gap: 56px;
        align-items: center;
    }

    .bkdai .bkdai-split > .bk-split-visual {
        margin-right: calc(-1 * clamp(0px, (100vw - 1152px) / 2 - 24px, 72px));
    }

    .bkdai .bkp-snap-fig .bkp-rc-wrap {
        margin-left: -18px;
    }
}
