/* ================================================================
   ACADP Companion — Public Ticker CSS  v2.1
   ================================================================ */

#acadp-ticker {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    height: 44px;
    display: flex;
    align-items: stretch;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 -2px 14px rgba(0,0,0,.35);
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: auto;
}
#acadp-ticker.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

/* ── RSS icon/label button (ซ้ายสุด) ── */
.ac-rss-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px 0 12px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,.13);
    transition: filter .2s;
    letter-spacing: .2px;
}
.ac-rss-btn:hover {
    filter: brightness(1.25);
    text-decoration: none;
    color: inherit;
}
.ac-rss-btn svg {
    flex-shrink: 0;
    transition: transform .25s;
}
.ac-rss-btn:hover svg {
    transform: scale(1.15);
}
.ac-rss-label {
    display: inline-block;
}

/* ── Viewport (mask) ── */
.ac-tv {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

/* ── Track ── */
.ac-tt {
    display: flex;
    white-space: nowrap;
    will-change: transform;
}
.ac-tset {
    display: inline-flex;
    align-items: center;
    padding-left: 28px;
}

/* ── Items ── */
.ac-ti {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    padding: 0 4px;
    transition: opacity .2s;
}
.ac-ti:hover {
    opacity: .72;
    text-decoration: underline;
}

/* ── Separator ── */
.ac-ts {
    opacity: .38;
    padding: 0 12px;
    pointer-events: none;
    font-size: 1.1em;
}

/* ── Fade edges ── */
.ac-tv::before,
.ac-tv::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
}
.ac-tv::before { left:  0; background: linear-gradient(to right, var(--ticker-bg, #1a1a2e), transparent); }
.ac-tv::after  { right: 0; background: linear-gradient(to left,  var(--ticker-bg, #1a1a2e), transparent); }

/* ── Body padding ── */
body { padding-bottom: 44px !important; }

/* ── Mobile ── */
@media (max-width: 600px) {
    .ac-rss-btn  { padding: 0 10px; font-size: 11px; gap: 5px; }
    #acadp-ticker { font-size: 12px; }
    .ac-rss-label { display: none; }   /* ซ่อน label บน mobile แสดงเฉพาะไอคอน */
}
