/**
 * mod_rimagenda — stylesheet for the Agenda Strip ticker.
 * Loaded once per page (regardless of module instance count) via
 * WebAssetManager::registerAndUseStyle('mod_rimagenda', ...) in
 * tmpl/default.php — Joomla's asset registry de-duplicates by name,
 * so calling it once per instance never emits more than one <link>.
 *
 * Moved out of an inline <style> block in tmpl/default.php verbatim —
 * no selector, value, or rule was changed in the move.
 */
.mod-rimagenda {
    --mr-red: #c0392b;
    --mr-teal-700: #12564E;
    --mr-teal-500: #1F8272;
    --mr-teal-100: #DCEAE6;
    --mr-gold: #B8934A;
    --mr-ink: #152623;
    --mr-line: #D8D2C3;
    font-family: 'Alexandria',sans-serif;
    direction: rtl;
    color: var(--mr-ink)
}

.mod-rimagenda * {
    box-sizing: border-box
}

/* .mod-rimagenda__strip is kept (alongside the new __ticker class below)
   purely so this element keeps matching the template's existing dark-mode
   selector for this exact class name (templates/rimnow_light/css/template.css,
   body.rss-dark-mode .mod-rimagenda__strip) — no template edit needed/made.
   That template rule blanks the background and forces all span/a text to
   white, which would erase the white card + red badge + turquoise time
   look precisely in the site's default (dark) theme. The reference design
   is meant to look the same regardless of site theme (like a fixed-brand
   news ticker), so the dark-mode block below neutralises just those two
   effects for this component's own elements — same body.rss-dark-mode hook
   the template already uses, just scoped to the new ticker classes, at
   matching/higher specificity. Nothing outside .mod-rimagenda is touched. */
.mod-rimagenda__ticker {
    display: flex;
    align-items: stretch;
    background: #fff;
    /* border:1px solid var(--mr-line); */
    border-radius: 8px;
    box-shadow: 0 4px 14px -6px rgba(12,47,44,.15);
    overflow: hidden;
    min-height: 36px
}

.mod-rimagenda__badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--mr-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none
}
.mod-rimagenda__badge:hover{
    color:#fff;
}
.mod-rimagenda__viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px
}

.mod-rimagenda__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease,transform .45s ease;
    pointer-events: none
}

.mod-rimagenda__slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
}

@media(prefers-reduced-motion:reduce) {
    .mod-rimagenda__slide {
        transition: opacity .01s linear;
        transform: none
    }
}

.mod-rimagenda__time {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mr-teal-500);
    white-space: nowrap;
    direction: ltr
}

.mod-rimagenda__clock {
    width: 13px;
    height: 13px;
    flex: 0 0 auto
}

.mod-rimagenda__status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap
}

.mod-rimagenda__status--live {
    background: var(--mr-red);
    color: #fff
}

.mod-rimagenda__status--live::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: mr-pulse 1.4s ease-in-out infinite
}

.mod-rimagenda__status--soon {
    background: rgba(31,130,114,.12);
    color: var(--mr-teal-700)
}

.mod-rimagenda__status--postponed {
    background: rgba(184,147,74,.18);
    color: #8a6a20
}

.mod-rimagenda__status--cancelled {
    background: rgba(200,60,60,.10);
    color: #a93232
}

@keyframes mr-pulse {
    0%,100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .3;
        transform: scale(.6)
    }
}

@media(prefers-reduced-motion:reduce) {
    .mod-rimagenda__status--live::before {
        animation: none
    }
}

.mod-rimagenda__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--mr-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none
}

.mod-rimagenda__title:hover {
    color: var(--mr-teal-700);
    text-decoration: underline;
    text-underline-offset: 2px
}

.mod-rimagenda__watch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    background: var(--mr-red);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s
}

.mod-rimagenda__watch:hover {
    background: #a93225
}

body.rss-dark-mode .mod-rimagenda__ticker {
    background: #fff
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__time {
    color: var(--mr-teal-500)
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__title {
    color: var(--mr-ink)
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__badge {
    color: #fff
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__status--live {
    color: #fff
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__status--soon {
    color: var(--mr-teal-700)
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__status--postponed {
    color: #8a6a20
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__status--cancelled {
    color: #a93232
}

body.rss-dark-mode .mod-rimagenda__ticker .mod-rimagenda__watch {
    color: #fff
}

@media(max-width: 520px) {
    .mod-rimagenda__ticker {
        min-height: 29px;
        border-radius: 8px;
        background: #fcffff;
    }

    .mod-rimagenda__badge {
        padding: 0 10px;
        font-size: 11px;
    }

    .mod-rimagenda__viewport {
        min-height: 29px;
    }

    .mod-rimagenda__slide {
        padding: 0 12px;
        gap: 5px
    }

    .mod-rimagenda__time {
        font-size: 10px;
        font-weight: normal;
    }

    .mod-rimagenda__title {
        font-size: 11.5px;
    }

    .mod-rimagenda__status {
        font-size: 8px;
        padding: 2px 6px
    }

    .mod-rimagenda__watch {
        font-size: 10px;
        padding: 3px 8px
    }
}