.api-masters-newsticker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    font-size: 16px;
    position: relative;
    bottom: 45px !important;
}

.newsticker-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 5px;
    background: #000; /* Changed to black background */
    color: #fff; /* White text */
    font-weight: bold; /* Bold text */
    width: 10%;
}

.newsticker-title-text {
    font-size: 12px; /* Adjust as needed */
    text-transform: uppercase; /* Optional: make the title all caps */
    text-align: justify !important;
}

.newsticker-title span {
    margin-right: 10px; /* Add some space between the title text and the toggle button */
}

.newsticker-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    font-size: 12px;
    color: #fff; /* White color for the toggle button */
}

.newsticker-content {
    background: #ffffff;
    flex-grow: 1;
    position: relative;
    padding-right: 80px;
    overflow: hidden;
    display: flex; /* Added to align navigation buttons */
    align-items: center; /* Added to align navigation buttons */
}

.newsticker-container {
    flex-grow: 1;
    overflow: hidden;
}

.api-masters-newsticker.sticky {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1000;
}

.api-masters-newsticker.sticky.top {
    top: 0;
}

.api-masters-newsticker.sticky.bottom {
    bottom: 0;
}

.api-masters-newsticker.inline {
    position: relative;
}

.newsticker-container {
    position: relative;
    height: auto;
    min-height: 40px;
    overflow: hidden;
}

.api-masters-newsticker ul {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    width: 100%;
}

.api-masters-newsticker ul li {
    padding: 5px 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    box-sizing: border-box;
}

.api-masters-newsticker ul li.active {
    opacity: 1;
    position: relative;
}

.api-masters-newsticker.scroll-left .newsticker-container,
.api-masters-newsticker.scroll-right .newsticker-container {
    white-space: nowrap;
    overflow: hidden;
}

.api-masters-newsticker.scroll-left ul,
.api-masters-newsticker.scroll-right ul {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll-horizontal 20s linear infinite;
}

.api-masters-newsticker.scroll-left ul li,
.api-masters-newsticker.scroll-right ul li {
    display: inline-block;
    position: static;
    opacity: 1;
    padding-right: 50px;
}

.api-masters-newsticker a {
    color: inherit; /* This will make the link color match the text color */
    text-decoration: none; /* Remove underline */
    display: block; /* Make the entire area clickable */
}

.api-masters-newsticker a:hover {
    text-decoration: underline; /* Add underline on hover */
}

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

.newsticker-navigation {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    z-index: 2;
}

.newsticker-prev,
.newsticker-next {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 14px;
}

.newsticker-prev:hover,
.newsticker-next:hover {
    background: rgba(0,0,0,0.7);
}

/* Adjustments for different scroll effects */
.scroll-left .newsticker-container,
.scroll-right .newsticker-container {
    padding-right: 80px; /* Make room for the buttons */
}

.scroll-up .newsticker-container,
.scroll-down .newsticker-container {
    padding-right: 0; /* No need for extra padding */
}


@media (max-width: 768px) {
    .api-masters-newsticker {
        font-size: 14px;
        flex-direction: column;
        align-items: stretch;
    }

    .newsticker-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px 5px;
        background: #000; /* Changed to black background */
        color: #fff; /* White text */
        font-weight: bold; /* Bold text */
        width: 30%;
    }

    .newsticker-container {
        position: relative;
        height: auto;
        overflow: hidden;
        display: flex;
        align-items: center;
        min-height: 40px;
    }

    .newsticker-title {
        border-right: none;
        border-bottom: 1px solid #333;
        justify-content: space-between;
    }

    .newsticker-navigation {
        top: 0;
        bottom: 0;
        right: 0;
        transform: none;
        flex-direction: column;
        justify-content: center;
    }

    .newsticker-prev,
    .newsticker-next {
        padding: 4px 6px;
        margin: 4px 0;
        font-size: 12px;
    }

    /* Adjustments for different scroll effects on mobile */
    .scroll-left .newsticker-container,
    .scroll-right .newsticker-container,
    .scroll-up .newsticker-container,
    .scroll-down .newsticker-container {
        padding-right: 40px; /* Consistent padding for all effects */
    }

    .newsticker-content {
        padding-right: 30px;
        
    }

    .api-masters-newsticker ul li {
        padding: 10px;
        height: auto;
        white-space: normal;
        line-height: 1.4;
    }

    .api-masters-newsticker.scroll-left .newsticker-container,
    .api-masters-newsticker.scroll-right .newsticker-container {
        white-space: normal;
    }

    .api-masters-newsticker.scroll-left ul,
    .api-masters-newsticker.scroll-right ul {
        display: block;
        padding-left: 0;
        animation: none;
    }

    .api-masters-newsticker.scroll-left ul li,
    .api-masters-newsticker.scroll-right ul li {
        display: block;
        padding-right: 0;
    }

    .admin-bar .api-masters-newsticker.sticky.top {
        top: 46px;
    }
}

@media (min-width: 783px) {
    .admin-bar .api-masters-newsticker.sticky.top {
        top: 32px;
    }
}

/* Further adjustments for very small screens */
@media (max-width: 480px) {
    .api-masters-newsticker {
        min-height: 40px; /* Reduced minimum height */
    }

    .newsticker-content {
        padding-right: 25px; /* Even less padding for very small screens */
    }

    .newsticker-prev,
    .newsticker-next {
        padding: 1px 3px;
        font-size: 8px;
        display: none;
    }
}
