/* Shariit Bottom Ticker Front-end Styling */

.shariit-bar {
    height: var(--shariit-height, 45px);
    background-color: var(--shariit-bg, #111827);
    color: var(--shariit-text, #f9fafb);
    font-size: var(--shariit-font-size, 14px);
    font-weight: 500;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Position-Specific Styling */
.shariit-bar.shariit-pos-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
}

.shariit-bar.shariit-pos-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.shariit-bar.shariit-pos-shortcode {
    position: relative;
    width: 100%;
    margin: 15px 0;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile Visibility Toggle */
@media (max-width: 767px) {
    .shariit-bar.shariit-hide-mobile {
        display: none !important;
    }
    /* Reset padding on body when hidden on mobile */
    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* Glassmorphism Styling */
.shariit-bar.shariit-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(17, 24, 39, 0.75); /* Fallback semi-transparency */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.shariit-ticker-wrap {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.shariit-ticker {
    display: flex;
    width: max-content;
    align-items: center;
}

.shariit-ticker-track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 100vw; /* Ensure it spans at least full screen width */
    will-change: transform;
}

/* Direction animations */
.shariit-bar.shariit-ltr .shariit-ticker-track {
    animation: shariit-scroll-ltr var(--shariit-speed, 20s) linear infinite;
}

.shariit-bar.shariit-rtl .shariit-ticker-track {
    animation: shariit-scroll-rtl var(--shariit-speed, 20s) linear infinite;
}

/* Pause on hover */
.shariit-bar.pause-on-hover:hover .shariit-ticker-track {
    animation-play-state: paused;
}

/* Keyframes for seamless looping */
@keyframes shariit-scroll-ltr {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

@keyframes shariit-scroll-rtl {
    0% {
        transform: translate3d(-100%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* Ticker item styling */
.shariit-item {
    display: inline-flex;
    align-items: center;
    padding: 0 40px; /* spacing between items */
    white-space: nowrap;
    box-sizing: border-box;
}

.shariit-item-link,
.shariit-item-span {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.shariit-item-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.shariit-item-img {
    height: calc(var(--shariit-height, 45px) * 0.55);
    max-height: 40px;
    width: auto;
    object-fit: contain;
    margin: 0 10px;
    border-radius: 4px;
}

/* Right-to-Left alignment spacing adjustments */
.shariit-bar.shariit-rtl .shariit-item-img {
    margin-left: 10px;
    margin-right: 0;
}
