/**
 * Ticker News Section - EXACT Bloglo Style
 * Copy-paste from Bloglo with minimal changes
 *
 * @package Blog_Over
 */

/* =========================================
   Main Wrapper
   ========================================= */
.blog-over-ticker-slider {
    position: relative;
}

.blog-over-container-wide {
    max-width: 100%;
    padding: 0 15px;
}

/* =========================================
   Ticker Section - EXACT copy from Bloglo
   ========================================= */
.ticker-slider-items {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    margin: 18px 0 !important;
}

.ticker-slider-items .ticker-title {
    position: relative !important;
    flex: 0 0 auto !important;
    min-height: 55px !important;
    font-size: 16px !important;
    line-height: 35px !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    margin-right: 0 !important;
    text-align: center !important;
    background-color: var(--blog-over-primary, #3b82f6) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.ticker-slider-items .ticker-title span.icon {
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: relative;
    line-height: 30px;
    z-index: 0;
    background-color: #fff;
    color: var(--blog-over-primary, #3b82f6);
}

.ticker-slider-items .ticker-title span.icon::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: -1;
    transform: scale(0.9);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    animation: ripperOnCircle 1.3s ease-out 75ms infinite;
}

.ticker-slider-items .ticker-title span.icon i {
    vertical-align: middle;
}

@keyframes ripperOnCircle {
    0% {
        opacity: 0.3;
    }

    40% {
        opacity: 0.5;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.075), 0 0 0 8px rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.075), 0 0 0 8px rgba(255, 255, 255, 0.2);
        transform: scale(1.35);
        opacity: 0;
    }
}

@media (max-width: 1025px) {
    .ticker-slider-items .ticker-title span.icon {
        display: none !important;
    }
}

/* CRITICAL: Ticker box must have overflow hidden and fixed height */
.ticker-slider-items .ticker-slider-box {
    overflow: hidden !important;
    flex: 1 1 85% !important;
    /*background-color: rgba(59, 130, 246, 0.09) !important;*/
    padding: 5px 0 !important;
    height: 55px !important;
    display: flex !important;
    align-items: center !important;
}

/* CRITICAL: This wrapper width is set by jQuery Marquee, but we need initial style */
.ticker-slider-wrap {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

/* CRITICAL: Items must float left and display inline */
.ticker-slide-item {
    position: relative !important;
    float: left !important;
    clear: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-right: 26px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.ticker-slide-item .ticker-slider-backgrounds {
    width: 46px !important;
    height: 46px !important;
    margin-right: 16px !important;
    flex-shrink: 0 !important;
}

.ticker-slide-item .ticker-slider-backgrounds a {
    width: 100%;
    height: 100%;
    display: block;
}

.ticker-slide-item .ticker-slider-backgrounds img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.09) !important;
    border: 3px solid #fff !important;
}

.ticker-slide-item .slide-inner {
    display: flex !important;
    flex-direction: column !important;
    white-space: nowrap !important;
}

.ticker-slide-item .slide-inner h6 {
    font-size: 16px !important;
    margin-bottom: 2px !important;
    margin-top: 2px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.ticker-slide-item .slide-inner h6 a {
    color: inherit !important;
    text-decoration: none !important;
}

.ticker-slide-item .slide-inner h6 a:hover {
    color: var(--blog-over-primary, #3b82f6) !important;
}

.ticker-slide-item .slide-inner .entry-meta {
    font-size: 12px !important;
    color: #8a8a8c !important;
    margin-top: 0 !important;
    white-space: nowrap !important;
}

/* Pause Button */
.ticker-slider-controls {
    flex-shrink: 0 !important;
}

.ticker-slider-controls .ticker-slider-pause {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    background-color: var(--blog-over-secondary, #1e293b) !important;
    padding: 0 !important;
    width: 55px !important;
    height: 55px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ticker-slider-controls .ticker-slider-pause:hover {
    background-color: var(--blog-over-primary, #3b82f6) !important;
}

@media (max-width: 610px) {
    .ticker-slider-controls .ticker-slider-pause {
        display: none !important;
    }
}

/* =========================================
   Responsive Visibility
   ========================================= */
@media (min-width: 993px) {
    .blog-over-hide-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    .blog-over-hide-tablet {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .blog-over-hide-mobile {
        display: none !important;
    }
}

/* ─────────────────────────────────────────
   MOBILE TICKER IMPROVEMENTS (576px)
   ───────────────────────────────────────── */
@media (max-width: 576px) {
    .ticker-slider-items {
        margin: 12px 0 !important;
    }

    .ticker-slider-items .ticker-title {
        min-height: 45px !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
        line-height: 1.3 !important;
    }

    .ticker-slider-items .ticker-slider-box {
        height: 45px !important;
    }

    .ticker-slide-item .ticker-slider-backgrounds {
        width: 38px !important;
        height: 38px !important;
        margin-right: 10px !important;
    }

    .ticker-slide-item .slide-inner h6 {
        font-size: 14px !important;
    }

    .ticker-slide-item .slide-inner .entry-meta {
        font-size: 11px !important;
    }

    .ticker-slide-item {
        margin-right: 20px !important;
    }
}

/* ─────────────────────────────────────────
   SMALL MOBILE TICKER (480px)
   ───────────────────────────────────────── */
@media (max-width: 480px) {
    .ticker-slider-items {
        margin: 10px 0 !important;
    }

    .ticker-slider-items .ticker-title {
        min-height: 40px !important;
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

    .ticker-slider-items .ticker-slider-box {
        height: 40px !important;
    }

    .ticker-slide-item .ticker-slider-backgrounds {
        width: 32px !important;
        height: 32px !important;
        margin-right: 8px !important;
    }

    .ticker-slide-item .ticker-slider-backgrounds img {
        border-width: 2px !important;
    }

    .ticker-slide-item .slide-inner h6 {
        font-size: 13px !important;
    }

    .ticker-slide-item .slide-inner .entry-meta {
        display: none !important;
    }
}

/* ─────────────────────────────────────────
   CUSTOMIZER SHORTCUT ADJUSTMENT
   ───────────────────────────────────────── */
.blog-over-ticker-slider .customize-partial-edit-shortcut {
    left: 5% !important;
}

/* ─────────────────────────────────────────
   SPOTLIGHT LAYOUT (Pro)
   ───────────────────────────────────────── */
.ticker-layout-spotlight .blog-over-container,
.ticker-layout-spotlight .blog-over-container-wide {
    padding: 0;
}

.spotlight-wrapper {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.spotlight-title {
    position: relative !important;
    flex: 0 0 auto !important;
    min-height: 40px !important;
    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    margin-right: 15px !important;
    text-align: center !important;
    background-color: var(--blog-over-primary, #3b82f6) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 8px;
}

.spotlight-title span.icon {
    font-size: 13px;
}

.spotlight-box {
    overflow: hidden;
    flex: 1;
}

.spotlight-item {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    min-height: 64px;
}

.spotlight-item:last-child {
    border-right: none;
}

/* Circular Thumbnail */
.ticker-spotlight-thumb {
    display: block;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ticker-spotlight-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.ticker-spotlight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Text Content */
.ticker-spotlight-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.ticker-spotlight-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.ticker-spotlight-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ticker-spotlight-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

/* Date */
.ticker-spotlight-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.ticker-spotlight-date i {
    font-size: 11px;
    color: #cbd5e1;
}

/* ─── Dark Mode ─── */
body.blog-over-dark-mode .spotlight-wrapper,
[data-theme="dark"] .spotlight-wrapper {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

body.blog-over-dark-mode .spotlight-item,
[data-theme="dark"] .spotlight-item {
    border-right-color: rgba(255, 255, 255, 0.08);
}

body.blog-over-dark-mode .spotlight-wrapper .ticker-slider-pause,
[data-theme="dark"] .spotlight-wrapper .ticker-slider-pause {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.blog-over-dark-mode .ticker-spotlight-title a,
[data-theme="dark"] .ticker-spotlight-title a {
    color: #e2e8f0;
}

body.blog-over-dark-mode .ticker-spotlight-title a:hover,
[data-theme="dark"] .ticker-spotlight-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

body.blog-over-dark-mode .ticker-spotlight-date,
[data-theme="dark"] .ticker-spotlight-date {
    color: #64748b;
}

body.blog-over-dark-mode .ticker-spotlight-date i,
[data-theme="dark"] .ticker-spotlight-date i {
    color: #475569;
}

body.blog-over-dark-mode .ticker-spotlight-thumb,
[data-theme="dark"] .ticker-spotlight-thumb {
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .spotlight-wrapper {
        padding: 14px 18px;
    }

    .spotlight-item {
        padding: 0 16px;
        gap: 10px;
        min-height: 52px;
    }

    .ticker-spotlight-thumb {
        width: 52px;
        height: 52px;
    }

    .ticker-spotlight-title {
        font-size: 13px;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .spotlight-wrapper {
        padding: 12px 14px;
        margin: 12px 0;
        border-radius: 8px;
    }

    .spotlight-item {
        padding: 0 14px;
        gap: 10px;
        min-height: 44px;
    }

    .ticker-spotlight-thumb {
        width: 44px;
        height: 44px;
        border-width: 2px;
    }

    .ticker-spotlight-title {
        font-size: 13px;
        max-width: 150px;
    }

    .spotlight-title {
        min-height: 35px !important;
        font-size: 13px !important;
        padding: 6px 12px !important;
        margin-right: 10px !important;
        gap: 6px !important;
    }

    .spotlight-title span.icon {
        font-size: 11px;
    }

    .ticker-spotlight-date {
        font-size: 11px;
    }
}

