/* ==========================================================================
   Zonautara Running Text — Frontend Styles
   ========================================================================== */

.zrt-bar {
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    display: block;
}

.zrt-bar.zrt-sticky.zrt-pos-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.zrt-bar.zrt-sticky.zrt-pos-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.zrt-bar .zrt-container {
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    gap: 12px;
}

/* ===== Label ===== */
.zrt-bar .zrt-label {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: calc(100% - 8px);
    margin: 4px 0;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.92em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.zrt-bar .zrt-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: zrt-pulse 1.5s ease-in-out infinite;
}

@keyframes zrt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(1.3); }
}

/* ===== Viewport (area scroll) ===== */
.zrt-bar .zrt-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.zrt-bar .zrt-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
}

.zrt-bar .zrt-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
}

.zrt-bar .zrt-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78em;
    opacity: 0.85;
    font-weight: 600;
}

.zrt-bar .zrt-cat {
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.zrt-bar .zrt-date {
    font-style: italic;
    opacity: 0.75;
}

.zrt-bar .zrt-link {
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.zrt-bar .zrt-link:hover,
.zrt-bar .zrt-link:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.zrt-bar .zrt-sep {
    margin: 0 14px;
    opacity: 0.6;
    font-weight: 700;
    display: inline-block;
}

/* ===== Tombol toggle pause/play ===== */
.zrt-bar .zrt-toggle {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.zrt-bar .zrt-toggle:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* ===== Animasi: Marquee ===== */
.zrt-anim-marquee .zrt-track {
    animation: zrt-marquee linear infinite;
}

.zrt-anim-marquee.zrt-dir-right .zrt-track {
    animation-direction: reverse;
}

@keyframes zrt-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.zrt-anim-marquee.zrt-pause-hover:hover .zrt-track,
.zrt-anim-marquee.zrt-paused .zrt-track {
    animation-play-state: paused;
}

/* ===== Animasi: Slide (item per item) ===== */
.zrt-anim-slide .zrt-track {
    display: block;
    height: 100%;
    position: relative;
}

.zrt-anim-slide .zrt-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.5s ease;
    padding: 0;
}

.zrt-anim-slide .zrt-item.zrt-active {
    opacity: 1;
    transform: translateY(0);
}

.zrt-anim-slide .zrt-item.zrt-exit {
    opacity: 0;
    transform: translateY(-100%);
}

.zrt-anim-slide .zrt-sep {
    display: none;
}

/* ===== Animasi: Fade ===== */
.zrt-anim-fade .zrt-track {
    display: block;
    height: 100%;
    position: relative;
}

.zrt-anim-fade .zrt-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    padding: 0;
}

.zrt-anim-fade .zrt-item.zrt-active {
    opacity: 1;
}

.zrt-anim-fade .zrt-sep {
    display: none;
}

/* ===== Animasi: Typewriter ===== */
.zrt-anim-typewriter .zrt-track {
    display: block;
    height: 100%;
    position: relative;
}

.zrt-anim-typewriter .zrt-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    padding: 0;
}

.zrt-anim-typewriter .zrt-item.zrt-active {
    opacity: 1;
}

.zrt-anim-typewriter .zrt-item.zrt-active .zrt-link {
    border-right: 2px solid currentColor;
    animation: zrt-blink 0.7s step-end infinite;
}

@keyframes zrt-blink {
    50% { border-color: transparent; }
}

.zrt-anim-typewriter .zrt-sep {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .zrt-bar .zrt-label {
        padding: 0 10px;
        font-size: 0.82em;
    }
    .zrt-bar .zrt-meta {
        display: none;
    }
    .zrt-bar .zrt-sep {
        margin: 0 10px;
    }
    .zrt-bar .zrt-container {
        gap: 8px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ===== Kompatibilitas Foxiz ===== */
/* Foxiz menggunakan #site-header, kita pastikan tidak overlap */
body.zrt-has-top #site-header,
body.zrt-has-top .site-header,
body.zrt-has-top .rb-header {
    /* spacing sudah dikompensasi via body padding */
}

/* Foxiz sticky header dengan running text */
body.zrt-has-top .header-sticky,
body.zrt-has-top .is-sticky {
    z-index: 999; /* di bawah running text default 9999 */
}
