/* LISEL Motion: the kit fitted to lisel.ee (Kadence theme, core blocks, the lisel-* classes).
   Loaded after lisel-motion.css. The logo widths come from the Customizer, inline. */

/* The moving logos */
.site-branding a.brand svg.lm-logo { display: block; height: auto; max-width: 100%; }
.lisel-footer-logo { max-width: 100%; height: auto; }

/* The line icons: the drawing lies over the invisible placeholder <img>, which keeps the theme's icon sizes */
.lm-icon-box { position: relative; display: block; width: fit-content; max-width: 100%; }
.lm-icon-box > img { visibility: hidden; }
.lm-icon-box > svg.lm-icon { position: absolute; inset: 0; width: 100%; height: 100%; color: #000; overflow: visible; }

/* The eyebrow's short line (.lisel-eyebrow::before) draws in from the left as the eyebrow arrives */
.lisel-eyebrow::before { transform-origin: 0 50%; }
@media screen {
  .lm-on .lisel-eyebrow[data-lm]:not(.lm-in)::before { scale: 0 1; }
  .lm-on .lisel-eyebrow[data-lm].lm-in:not(.lm-done)::before { transition: scale .9s var(--lm-inout) calc(var(--lm-d, 0ms) + 250ms); }
}

/* Buttons (lm-btn on .wp-block-button): the hover colour fills the button up from the bottom.
   --lm-btn-bg is the button's own colour, kept underneath while the fill rises;
   --lm-fill is the colour the theme already used for the hover. */
.wp-block-button.lm-btn { background-image: none; transition: none; } /* the kit's own lm-btn styling goes on the link here */
.wp-block-button.lm-btn:active { scale: none; }
.wp-block-button.lm-btn > .wp-block-button__link {
  --lm-btn-bg: var(--global-palette-btn-bg, #576049);
  --lm-fill: var(--global-palette-btn-bg-hover, #2B2B2B);
  position: relative; isolation: isolate; overflow: hidden;
  transition: color .35s ease, border-color .35s ease, scale .16s var(--lm-out);
}
.wp-block-button.lm-btn.is-style-outline > .wp-block-button__link { --lm-btn-bg: transparent; --lm-fill: var(--global-palette3, #2B2B2B); }
:is(.lisel-dark, .lisel-olive) .wp-block-button.lm-btn.is-style-outline > .wp-block-button__link { --lm-fill: #F4EFE8; }
.lisel-olive .wp-block-button.lm-btn:not(.is-style-outline) > .wp-block-button__link { --lm-btn-bg: #F4EFE8; --lm-fill: #2B2B2B; }

.wp-block-button.lm-btn > .wp-block-button__link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--lm-fill); transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .55s var(--lm-out);
}
.wp-block-button.lm-btn > .wp-block-button__link:is(:hover, :focus-visible)::before { transform: none; }
/* Strong enough to win over the theme's own hover backgrounds (some are !important) */
html .wp-block-button.lm-btn.lm-btn.lm-btn > .wp-block-button__link:is(:hover, :focus-visible) { background: var(--lm-btn-bg) !important; }
.wp-block-button.lm-btn > .wp-block-button__link:active { scale: .98; }

/* Menu underline (lm-link): under the words, not the link's padding */
.main-navigation .menu-item > a.lm-link { background-origin: content-box; }

@media (prefers-reduced-motion: reduce) {
  .wp-block-button.lm-btn > .wp-block-button__link, .wp-block-button.lm-btn > .wp-block-button__link::before { transition: none; }
}
