/*
Theme Name: .kloos Theme
Theme URI: https://www.vonblock.com
Author: .kloos digital GmbH
Description: Custom theme for .kloos digital GmbH website
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vonblock-builder-theme
*/
/* The pagination under post lists: Von Block → Global CSS → pagination */

/* ==========================================================
   BUTTONS
   A Button block's look is a Von Block typography style picked for its text: btn (the yellow
   pill with the arrow), btn-light (beside btn: regular weight), btn-contact (a profile's contact
   buttons). Von Block writes :hover and ::after, but not the two together; that, and "no hover
   effect on touch screens", is here.
   ========================================================== */
/* A button is never wider than the column it is in. Weightless, so a class on the block (a
   typography style's min-width) says otherwise */
:where(.wp-block-buttons > .wp-block-button) {
  max-width: 100%;
  min-width: 0;
}

.mcg-typo-btn:hover::after {
  transform: translateX(6px);
}

/* :root — the styles' own :hover comes later in the framework at the weight of one class. A
   button with custom styles of its own, the white btn-surface (the Home hero) or the light yellow
   btn-soft (the service pages' hero), keeps its own hover colours */
@media (hover: none), (pointer: coarse) {
  :root .mcg-typo-btn:not([data-mcg-custom-style-id], .mcg-typo-btn-surface, .mcg-typo-btn-soft):hover,
  :root .mcg-typo-btn-contact:not([data-mcg-custom-style-id]):hover {
    background-color: var(--mcg-color-primary-action);
    border-color: transparent;
  }
  :root .mcg-typo-btn:not([data-mcg-custom-style-id], .mcg-typo-btn-surface, .mcg-typo-btn-soft):hover {
    color: var(--mcg-color-text-strong);
  }
  :root .mcg-typo-btn:hover::after {
    transform: none;
  }
}

/* ==========================================================
   NO SIDEWAYS SCROLLING
   The page never scrolls sideways (html and body, at every size: a container query cannot reach
   them, and it does no harm wider). Below Von Block's sm breakpoint (768px) wide wrappers are held
   to the page's width too.
   ========================================================== */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@container (max-width: 768px) {
  main,
  .wp-block-post-content {
    max-width: 100%;
    overflow-x: clip;
  }

  /* Wide block wrappers do not widen the page */
  .wp-site-blocks > *,
  .wp-block-post-content > * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Small site-wide rules (link-hover-accent, no-underline, featured-image-fill) are Von Block →
   Global CSS, editable there */

/* ==========================================================
   PRINTING
   The page's content alone: no menu, sticky navigations, newsletter box, forms or footer. Ink on
   paper: dark text, no backgrounds (browsers leave them out anyway, which would leave the text of
   dark sections white on white), links in paragraphs of the copy followed by their address. White
   logos on dark bands disappear with the bands.
   !important only for the colours: over every colour and background class of the framework.
   ========================================================== */
@media print {
  :root .kloos-site-menu-layer,
  :root footer.wp-block-template-part,
  :root .jump-nav-sticky-shell,
  :root .offers-nav,
  :root .newsletter-signup,
  :root .lets-talk-item,
  :root .wpforms-container {
    display: none;
  }

  *,
  *::before,
  *::after {
    color: #000 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* In the copy only: not in lists of posts (cards), where the address would crowd the card */
  :root .wp-block-post-content p:not(.wp-block-post-template p) a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    word-break: break-all;
  }

  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  img,
  figure,
  blockquote {
    break-inside: avoid;
  }
}
