/* Legomont traka vijesti — frontend */
.lnt-ticker {
    --lnt-background: #0b0b0b;
    --lnt-text: #ffffff;
    --lnt-accent: #e52421;
    --lnt-label-text: #ffffff;
    --lnt-border: #333333;
    --lnt-height-desktop: 40px;
    --lnt-height-mobile: 36px;
    --lnt-font-desktop: 14px;
    --lnt-font-mobile: 13px;
    --lnt-font-weight: 600;
    --lnt-gap: 52px;
    --lnt-border-width: 1px;
    --lnt-distance: 0px;
    --lnt-duration: 20s;

    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    height: var(--lnt-height-desktop);
    min-height: var(--lnt-height-desktop);
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    color: var(--lnt-text);
    background: var(--lnt-background);
    border: var(--lnt-border-width) solid var(--lnt-border);
    font-family: inherit;
    font-size: var(--lnt-font-desktop);
    font-weight: var(--lnt-font-weight);
    line-height: 1;
}

.lnt-ticker *,
.lnt-ticker *::before,
.lnt-ticker *::after {
    box-sizing: border-box;
}

.lnt-ticker__label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 100%;
    padding: 0 18px;
    white-space: nowrap;
    color: var(--lnt-label-text);
    background: var(--lnt-accent);
    font-size: 0.88em;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.lnt-ticker__label::after {
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 100%;
    content: "";
    background: var(--lnt-accent);
    clip-path: polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%);
}

.lnt-ticker__label-dot {
    position: relative;
    z-index: 1;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgb(255 255 255 / 0.16);
}

.lnt-ticker__viewport {
    min-width: 0;
    height: 100%;
    padding-left: 10px;
    overflow: hidden;
}

.lnt-ticker__track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
    height: 100%;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.lnt-ticker.is-ready .lnt-ticker__track {
    animation: lnt-scroll var(--lnt-duration) linear infinite;
}

.lnt-ticker.is-paused .lnt-ticker__track,
.lnt-ticker--pause-hover .lnt-ticker__viewport:hover .lnt-ticker__track,
.lnt-ticker__viewport:focus-within .lnt-ticker__track {
    animation-play-state: paused;
}

.lnt-ticker__group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--lnt-gap);
    height: 100%;
    padding-right: var(--lnt-gap);
    white-space: nowrap;
}

.lnt-ticker__entry {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: calc(var(--lnt-gap) * 0.4);
    height: 100%;
}

.lnt-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    color: var(--lnt-text);
    text-decoration: none;
    text-underline-offset: 3px;
}

/*
 * Theme link rules can be more specific than the plugin's base class.
 * Keep news text at the configured ticker colour in every link state.
 */
.lnt-ticker a.lnt-ticker__item,
.lnt-ticker a.lnt-ticker__item:link,
.lnt-ticker a.lnt-ticker__item:visited,
.lnt-ticker a.lnt-ticker__item:hover,
.lnt-ticker a.lnt-ticker__item:focus,
.lnt-ticker a.lnt-ticker__item:focus-visible,
.lnt-ticker a.lnt-ticker__item:active {
    color: var(--lnt-text) !important;
}

.lnt-ticker .lnt-ticker__text {
    color: var(--lnt-text) !important;
    -webkit-text-fill-color: var(--lnt-text);
}

.lnt-ticker a.lnt-ticker__item:hover,
.lnt-ticker a.lnt-ticker__item:focus-visible {
    text-decoration: underline;
}

.lnt-ticker a.lnt-ticker__item:focus-visible,
.lnt-ticker__toggle:focus-visible {
    outline: 2px solid var(--lnt-accent);
    outline-offset: -3px;
}

.lnt-ticker__badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    color: var(--lnt-accent);
    border: 1px solid currentColor;
    border-radius: 2px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1;
    text-transform: uppercase;
}

.lnt-ticker__text {
    display: inline-block;
}

.lnt-ticker__separator {
    color: var(--lnt-accent);
    font-size: 1.1em;
    font-weight: 700;
}

.lnt-ticker__toggle {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    color: var(--lnt-text);
    background: var(--lnt-background);
    border: 0;
    border-left: 1px solid var(--lnt-border);
    border-radius: 0;
    appearance: none;
}

.lnt-ticker__toggle:hover {
    opacity: 0.82;
}

.lnt-ticker__pause-icon {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.lnt-ticker__pause-icon i {
    display: block;
    width: 3px;
    height: 13px;
    background: currentColor;
}

.lnt-ticker__play-icon {
    display: none;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid currentColor;
}

.lnt-ticker.is-paused .lnt-ticker__pause-icon {
    display: none;
}

.lnt-ticker.is-paused .lnt-ticker__play-icon {
    display: block;
}

@keyframes lnt-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(-1 * var(--lnt-distance)), 0, 0);
    }
}

@media (min-width: 1025px) {
    .lnt-ticker--hide-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .lnt-ticker--hide-tablet {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .lnt-ticker {
        height: var(--lnt-height-mobile);
        min-height: var(--lnt-height-mobile);
        font-size: var(--lnt-font-mobile);
    }

    .lnt-ticker--hide-mobile {
        display: none !important;
    }

    .lnt-ticker__label {
        gap: 7px;
        padding: 0 12px;
        letter-spacing: 0.025em;
    }

    .lnt-ticker__label::after {
        right: -8px;
        width: 16px;
    }

    .lnt-ticker__label-dot {
        width: 6px;
        height: 6px;
        flex-basis: 6px;
    }

    .lnt-ticker__item {
        gap: 8px;
    }

    .lnt-ticker__badge {
        min-height: 19px;
        padding: 2px 6px;
    }

    .lnt-ticker__toggle {
        width: 35px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lnt-ticker__viewport {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .lnt-ticker__track,
    .lnt-ticker.is-ready .lnt-ticker__track {
        min-width: max-content;
        transform: none !important;
        animation: none !important;
        will-change: auto;
    }

    .lnt-ticker__group[aria-hidden="true"],
    .lnt-ticker__entry[data-lnt-visual-copy] {
        display: none !important;
    }

    .lnt-ticker__toggle {
        display: none;
    }
}
