/* *
 * PEMFiT — Scrolling Link Marquee block styles
 * blocks/scrolling-link-marquee/scrolling-link-marquee.css
 *
 * Two horizontal marquee rows that scroll in opposite directions.
 * Row 1 scrolls right-to-left, Row 2 scrolls left-to-right.
 * Hovering or focusing ANY link inside the component pauses BOTH rows. */
.component-scrolling-link-marquee-sec {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--slm-row-gap, var(--thin-gutter));
    padding-top: var(--slm-padding-top, var(--medium-gutter));
    padding-bottom: var(--slm-padding-bottom, var(--medium-gutter));
    background: var(--slm-bg, transparent);
}

.component-scrolling-link-marquee-sec.has-custom-mt {
    margin-top: var(--slm-margin-top);
}

.component-scrolling-link-marquee-sec.has-custom-mb {
    margin-bottom: var(--slm-margin-bottom);
}

/* ---------------------------------------------------------------------
 * Row + track
 * ------------------------------------------------------------------ */
.component-scrolling-link-marquee-sec .slm-row {
    width: 100%;
    overflow: hidden;
}

.component-scrolling-link-marquee-sec .slm-track {
    display: flex;
    align-items: center;
    gap: var(--slm-gap, var(--thin-gutter));
    list-style: none;
    margin: 0;
    padding: 0;
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* ---------------------------------------------------------------------
 * Pause on hover / focus
 *
 * Animation is JS-driven (see wp_footer script). The script reads
 * this data attribute each frame and pauses advancing the offset
 * when set — avoiding the jump/restart that CSS @keyframes cause
 * when the track's width changes (e.g. new items added/removed).
 * ------------------------------------------------------------------ */
/* ---------------------------------------------------------------------
 * Items / links
 * ------------------------------------------------------------------ */
.component-scrolling-link-marquee-sec li.slm-item {
    flex: 0 0 auto;
    list-style: none;
}

.component-scrolling-link-marquee-sec .slm-item .slm-item-link,
.component-scrolling-link-marquee-sec li.slm-item a.slm-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: var(--slm-item-py, 0.8rem) var(--slm-item-px, 2rem);
    border-radius: var(--slm-item-radius, 999px);
    border: var(--slm-item-border-w, 0px) solid var(--slm-item-border, transparent);
    background-color: var(--slm-item-bg, #ffffff);
    color: var(--slm-item-text, #161616);
    font-size: var(--slm-font-size, 1.4rem) !important;
    line-height: 1.2 !important;
    font-weight: var(--slm-font-weight, 600);
    letter-spacing: var(--slm-letter-spacing, 0.05em);
    text-transform: var(--slm-text-transform, uppercase);
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.component-scrolling-link-marquee-sec li.slm-item a.slm-item-link:hover,
.component-scrolling-link-marquee-sec li.slm-item a.slm-item-link:focus-visible {
    background-color: var(--slm-item-hover-bg, var(--slm-item-bg, #ffffff));
    color: var(--slm-item-hover-text, var(--slm-item-text, #161616));
}

/* Respect reduced-motion preference */
/* Reduced-motion preference is honoured in JS (wp_footer script checks
   matchMedia('(prefers-reduced-motion: reduce)') and skips animating
   the transform if set, leaving tracks static at their initial position). */
/* ---------------------------------------------------------------------
 * Editor canvas
 * ------------------------------------------------------------------ */
.editor-styles-wrapper .component-scrolling-link-marquee-sec {
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

/* Inner item block placeholder styling inside editor */
.editor-styles-wrapper .slm-item-editor-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--slm-gap, var(--thin-gutter));
    padding: 1rem;
}

.editor-styles-wrapper .slm-row-label {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    margin-bottom: 0.4rem;
}

nd · CSS
