/* ═══════════════════════════════════════════════════
   ReporterX News Ticker — rx_tickerstyle.css v3.0
   Beskonačni loop: CSS translateX(-50%) na jednom elementu
   koji sadrži 2 identična seta vesti inline.
   Nema JS kloniranja, nema vidljivog duplikata.
   ═══════════════════════════════════════════════════ */

/* ─── WRAPPER ─── */
.rx-ticker-wrap {
    width: 95%;
    max-width: 1400px;
    margin: 10px auto;
}

/* ─── MAIN BAR ─── */
.rx-ticker-main {
    display: flex;
    align-items: center;
    background: var(--vgt-bg, #1a1a1a);
    height: var(--vgt-height, 45px);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* ─── LIVE LABEL ─── */
.rx-ticker-live {
    background: var(--vgt-live-bg, #ff0000);
    color: var(--vgt-live-text, #ffffff);
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: var(--vgt-size, 16px);
    flex-shrink: 0;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

/* Strelica pored LIVE bloka */
.rx-ticker-live::after {
    content: "";
    position: absolute;
    right: -14px;
    top: 0;
    border-top: calc(var(--vgt-height, 45px) / 2) solid transparent;
    border-bottom: calc(var(--vgt-height, 45px) / 2) solid transparent;
    border-left: 15px solid var(--vgt-live-bg, #ff0000);
    z-index: 2;
}

/* ─── VIEWPORT — klizi i skriva sadrzaj van ─── */
.rx-ticker-viewport {
    flex: 1;
    overflow: hidden;          /* ← KLJUČNO: skriva duplirani set */
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 10px;
    /* Fade efekat na rubovima za profesionalan izgled */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 3%,
        black 97%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 3%,
        black 97%,
        transparent 100%
    );
}

/* ─── TRACK — jedinstven element sa 2x sadrzajem ─── */
.rx-ticker-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    /* Animacija: pomiče za -50% = tacno jedan set vesti */
    animation: rx-ticker-loop var(--rx-ticker-duration, 40s) linear infinite;
    will-change: transform;
    transform: translateZ(0);       /* GPU sloj */
    backface-visibility: hidden;    /* sprječava flicker */
}

/* Pausa na hover */
.rx-ticker-main:hover .rx-ticker-track,
.rx-ticker-track.paused {
    animation-play-state: paused;
}

/* Poštuj reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .rx-ticker-track {
        animation: none;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .rx-ticker-track::-webkit-scrollbar { display: none; }
    .rx-ticker-viewport {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ─── ITEM ─── */
.rx-ticker-item {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    text-decoration: none;
    color: var(--vgt-color, #ffffff);
    font-size: var(--vgt-size, 16px);
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.rx-ticker-item:hover {
    opacity: 0.75;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rx-ticker-item:focus-visible {
    outline: 2px solid var(--vgt-live-bg, #ff0000);
    outline-offset: -2px;
    opacity: 0.9;
}

/* Separator između vesti */
.rx-ticker-item + .rx-ticker-item::before {
    content: "•";
    margin-right: 24px;
    opacity: 0.35;
    font-size: 0.8em;
}

/* Thumbnail sličica */
.rx-ticker-item img {
    width: var(--vgt-img, 30px);
    height: var(--vgt-img, 30px);
    margin-right: 10px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Divider između prvog i drugog seta — nevidljiv, samo razmak */
.rx-ticker-divider {
    display: inline-block;
    width: 48px;
    flex-shrink: 0;
}

/* ─── KEYFRAME ─── */
@keyframes rx-ticker-loop {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }  /* -50% = tačno jedan set */
}

/* ═══════════════════════════════════════════════════
   ADMIN STILOVI
   ═══════════════════════════════════════════════════ */
.rx-admin-wrap { max-width: 1100px; }

.rx-admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}
.rx-admin-logo { font-size: 36px; line-height: 1; }
.rx-admin-header h1 { margin: 0 0 4px; font-size: 24px; }
.rx-admin-sub { margin: 0; color: #666; font-size: 13px; }
.rx-version { font-size: 13px; font-weight: normal; color: #999; margin-left: 6px; vertical-align: middle; }

.rx-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.rx-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.rx-card-full  { grid-column: 1 / -1; }
.rx-card-title {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.rx-card .form-table th { width: 180px; padding: 10px 0; font-size: 13px; }
.rx-card .form-table td { padding: 8px 0; }

.rx-hex-preview {
    display: inline-block;
    margin-left: 8px;
    font-family: monospace;
    font-size: 12px;
    color: #888;
    vertical-align: middle;
}

.rx-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.rx-cat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s, border-color .15s;
}
.rx-cat-label:hover { background: #eef5ff; border-color: #a0bfdf; }
.rx-cat-label small { color: #aaa; }

.rx-preview-card #rx-preview-container {
    transition: all 0.3s;
}

.rx-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 20px;
}
.rx-reset-btn { border-color: #d63638 !important; color: #d63638 !important; }
.rx-reset-btn:hover { background: #fce8e8 !important; }

@media (max-width: 782px) {
    .rx-settings-grid { grid-template-columns: 1fr; }
}
