/**
 * Custom News Ticker Styles
 * Version: 1.0.0
 */

/* Reset and base styles for ticker */
.cnt-ticker-container {
    position: relative;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cnt-ticker-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cnt-ticker-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
}

.cnt-ticker {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: cnt-marquee linear infinite;
    animation-duration: 30s;
    will-change: transform;
    width: 200%; /* Double width for seamless loop */
}

/* Pause animation on hover */
.cnt-ticker-container:hover .cnt-ticker {
    animation-play-state: paused;
}

.cnt-ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.cnt-ticker-item:hover {
    transform: translateY(-1px);
}

.cnt-category {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Category color variations */
.cnt-category.uncategorized { background: #6c757d; }
.cnt-category.news { background: #dc3545; }
.cnt-category.sports { background: #28a745; }
.cnt-category.technology { background: #17a2b8; }
.cnt-category.entertainment { background: #ffc107; color: #333; }
.cnt-category.business { background: #6f42c1; }
.cnt-category.politics { background: #e83e8c; }
.cnt-category.health { background: #20c997; }
.cnt-category.education { background: #fd7e14; }

.cnt-title {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.cnt-title:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Marquee-style animation keyframes */
@keyframes cnt-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Alternative marquee animation for seamless loop */
@keyframes cnt-marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Smooth marquee with no gaps */
.cnt-ticker.marquee-mode {
    animation: cnt-marquee linear infinite;
    width: 200%;
}

/* Ensure smooth scrolling */
.cnt-ticker {
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Loading state */
.cnt-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    color: #6c757d;
    font-style: italic;
    font-size: 1rem;
}

/* Empty state */
.cnt-no-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    color: #6c757d;
    font-style: italic;
    font-size: 1rem;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .cnt-ticker-container {
        height: 50px;
        margin: 15px 0;
    }
    
    .cnt-ticker-item {
        font-size: 1rem;
        margin-right: 30px;
    }
    
    .cnt-category {
        font-size: 0.7rem;
        padding: 2px 8px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .cnt-ticker-container {
        height: 45px;
        margin: 10px 0;
    }
    
    .cnt-ticker-item {
        font-size: 0.9rem;
        margin-right: 20px;
    }
    
    .cnt-category {
        font-size: 0.65rem;
        padding: 1px 6px;
        margin-right: 6px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cnt-ticker-container {
        border-width: 3px;
        border-color: #000;
    }
    
    .cnt-category {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cnt-ticker {
        animation: none;
        transform: translateX(0);
    }
    
    .cnt-ticker-item {
        transition: none;
    }
}

/* Print styles */
@media print {
    .cnt-ticker-container {
        border: 1px solid #000;
        box-shadow: none;
        height: auto;
        overflow: visible;
    }
    
    .cnt-ticker {
        animation: none;
        transform: none;
        flex-wrap: wrap;
    }
    
    .cnt-ticker-item {
        margin-right: 20px;
        margin-bottom: 10px;
        break-inside: avoid;
    }
}

/* Admin styles for settings page */
.cnt-admin-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    margin-top: 30px;
}

.cnt-admin-info h3 {
    margin-top: 0;
    color: #495057;
}

.cnt-admin-info h4 {
    color: #6c757d;
    margin-bottom: 10px;
}

.cnt-admin-info ul {
    margin-left: 20px;
}

.cnt-admin-info li {
    margin-bottom: 5px;
}

.cnt-admin-info code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

/* Widget area compatibility */
.widget .cnt-ticker-container {
    margin: 10px 0;
}

/* Theme compatibility fixes */
.cnt-ticker-container * {
    box-sizing: border-box;
}

/* Ensure proper z-index for overlays */
.cnt-ticker-container {
    z-index: 1;
    position: relative;
}

/* Smooth transitions for dynamic updates */
.cnt-ticker-container.updating {
    opacity: 0.7;
    pointer-events: none;
}

.cnt-ticker-container.updating .cnt-ticker {
    animation-play-state: paused;
}

/* Focus styles for accessibility */
.cnt-title:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cnt-ticker-container {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cnt-no-posts {
        background-color: #1a202c;
        border-color: #4a5568;
        color: #a0aec0;
    }
    
    .cnt-admin-info {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cnt-admin-info code {
        background-color: #4a5568;
        color: #fbb6ce;
    }
}


.cnt-ticker{
	
    vertical-align: text-bottom !important;
}
.cnt-ticker-container{
	font-size: medium!important;
    padding: 5px!important;
}

.cnt-title{
	    border: 1px solid black;
    border-radius: 10px;
    padding: 0px 10px;
    background: white;
    margin-right: 10px;
}
}