.onoffswitch3 {
    width: 100%;
    margin: 20px 0;
    background: #fff;
    border: 2px solid #3D4785;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ticker-container {
    display: flex;
    align-items: center;
    height: 60px;
    background: #f8f9fa;
}

.ticker-label {
    padding: 0 20px;
    background: #3D4785;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 2px solid #fff;
}

.latest-text {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ff0000;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    height: 100%;
}

.ticker-text {
    display: flex;
    animation: ticker-1x 20s linear infinite;
    height: 100%;
    align-items: center;
}

.ticker-item {
    display: flex;
    align-items: center;
    padding: 0 25px;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #333;
    min-width: fit-content;
}

.ticker-item a {
    color: #3D4785;
    text-decoration: none;
    font-weight: 500;
    margin: 0 12px;
    transition: color 0.3s;
}

.ticker-item a:hover {
    color: #ff6600;
    text-decoration: underline;
}

.ticker-item i {
    color: #ff6600;
    margin-right: 12px;
    font-size: 18px;
}

.ticker-controls {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #3D4785;
    height: 100%;
    border-left: 2px solid #fff;
}

.onoffswitch3-checkbox {
    display: none;
}

.toggle-label {
    display: inline-block;
    cursor: pointer;
    width: 48px;
    height: 24px;
    background: #fff;
    border-radius: 24px;
    position: relative;
    margin-right: 15px;
    border: 2px solid #3D4785;
}

.toggle-icon {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #3D4785;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.onoffswitch3-checkbox:checked+.toggle-label .toggle-icon {
    transform: translateX(24px);
}

.speed-controls {
    display: flex;
    gap: 8px;
}

.speed-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: #3D4785;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-btn:hover {
    background: #ff6600;
    color: #fff;
}

.speed-btn.active {
    background: #ff6600;
    color: #fff;
}

@keyframes ticker-1x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes ticker-3x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes ticker-5x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.ticker-1x {
    animation: ticker-1x 20s linear infinite;
}

.ticker-3x {
    animation: ticker-3x 10s linear infinite;
}

.ticker-5x {
    animation: ticker-5x 7s linear infinite;
}

.ticker-paused {
    animation-play-state: paused;
}

/* Mobile View - Stacked layout */
@media (max-width: 768px) {
    .ticker-container {
        flex-direction: column;
        height: auto;
    }

    .ticker-label {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid #fff;
        padding: 10px 20px;
        justify-content: center;
        order: 1;
        /* Set the order for stacking */
    }

    .ticker-content {
        width: 100%;
        height: 60px;
        order: 2;
        /* Set the order for stacking */
    }

    .ticker-controls {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 2px solid #fff;
        padding: 10px 20px;
        justify-content: center;
        order: 3;
        /* Set the order for stacking */
    }

    .ticker-item {
        font-size: 14px;
        padding: 0 15px;
    }

    .ticker-item i {
        margin-right: 8px;
        font-size: 16px;
    }

    .latest-text {
        font-size: 16px;
    }

    .toggle-label {
        margin-right: 10px;
    }

    .speed-btn {
        padding: 5px 10px;
        font-size: 13px;
    }
}