/* 
Theme Name:		 SmartMag Child
Theme URI:		 https://kiwibrain.co.nz/
Description:	 SmartMag Child is a child theme of SmartMag, created by ChildTheme-Generator.com
Author:			 KiwiBrain
Author URI:		 https://kiwibrain.co.nz/
Template:		 smart-mag
Version:		 1.0.0
Text Domain:	 smartmag-child
*/


/*
    Add your custom styles here
*/

/* Main wrapper */
.ws-ticker-wrap {
    display: flex;
    align-items: center;
    background-color: transparent;
    color: #ffffff;
    height: 45px;
    position: relative;
    box-sizing: border-box;
    font-family: inherit;
    overflow: hidden; 
}

/* The red 'Latest News' badge */
.ws-ticker-label {
    background-color: #dd3333; 
    color: #ffffff;
    padding: 5px 30px 5px 20px; 
    font-weight: 600;
    height: auto;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 10; 
    position: relative;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

/* The container that hides overflow */
.ws-ticker-viewport {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: block; 
    margin-left: -20px;
    /* Cuts the left side to perfectly match the label's slant */
    clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%);
}

/* THE NEW TRACK: Holds both lists side-by-side */
.ws-ticker-track {
    display: flex;
    width: fit-content;
    height: 100%;
    padding-left: 20px; /* ADDED: Prevents text from being sliced */
    animation: wsTickerSeamlessLoop 25s linear infinite; 
}

/* Pause animation on hover */
.ws-ticker-viewport:hover .ws-ticker-track {
    animation-play-state: paused !important;
}

/* The scrolling list */
.ws-ticker-list {
    display: flex;
    white-space: nowrap;
    height: 100%;
    align-items: center;
}

/* Individual post items */
.ws-ticker-item {
    padding: 0 25px;
    position: relative;
    font-size: 14px;
}

/* Adds a bullet point between posts */
.ws-ticker-item::after {
    content: "•";
    position: absolute;
    right: 0;
    color: #666666;
}

/* Remove bullet from last item so lists connect seamlessly */
.ws-ticker-item:last-child::after {
    display: none;
}



/* Seamless Loop Animation */
@keyframes wsTickerSeamlessLoop {
    0% { 
        transform: translateX(0); /* Starts immediately visible on the left */
    } 
    100% { 
        transform: translateX(-50%); /* Slides exactly one list width, then loops */
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .ws-ticker-label {
        font-size: 11px;
        padding: 4px 20px 4px 10px;
        clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    }
    .ws-ticker-item {
        font-size: 13px;
        padding: 0 15px;
    }
}