/* Son Dakika (Breaking News) Component Stilleri */

.son-dakika {
    --sd-bg: var(--theme-color, #f5f5f5);
    --sd-label-bg: #e30613;
    --sd-text: #333;
    display: flex;
    align-items: center;
    background: var(--sd-bg);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 1400px;
    padding: 0;
    overflow: hidden;
    height: 45px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-family: 'Roboto Local', system-ui, -apple-system, sans-serif;
    position: relative;
    width: 100%;
}

.son-dakika .label {
    background: var(--sd-label-bg);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.son-dakika .label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid var(--sd-label-bg);
    border-top: 22.5px solid transparent;
    /* matches 45px height */
    border-bottom: 22.5px solid transparent;
}

.pulsing-dot {
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 1);
    transform: scale(1);
    animation: pulsar 2s infinite;
}

@keyframes pulsar {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.son-dakika .news-wrapper {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.son-dakika .news-liste {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scrolling 20s linear infinite;
    /* sped up from 30s to 20s */
}

.son-dakika .news-liste:hover {
    animation-play-state: paused;
}

@keyframes ticker-scrolling {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.son-dakika .news-nesne {
    display: inline-flex;
    align-items: center;
    padding: 0 25px;
    color: var(--sd-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.son-dakika a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.son-dakika .news-nesne:hover {
    color: var(--sd-label-bg);
}

.son-dakika .news-nesne .time {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 12px;
    font-weight: 700;
    font-size: 12px;
    color: var(--sd-label-bg);
}

.son-dakika .all-news {
    background: #fff;
    color: #666;
    height: 100%;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
    transition: all 0.2s;
}

.son-dakika .all-news:hover {
    background: #f8f9fa;
    color: var(--sd-label-bg);
}

/* Dark Mode Support */
html.dark .son-dakika,
body.dark-theme .son-dakika {
    --sd-bg: #1a1a1a;
    --sd-text: #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

html.dark .son-dakika .news-nesne .time,
body.dark-theme .son-dakika .news-nesne .time {
    background: rgba(255, 255, 255, 0.1);
}

html.dark .son-dakika .all-news,
body.dark-theme .son-dakika .all-news {
    background: #222;
    color: #aaa;
    border-color: #333;
}

html.dark .son-dakika .all-news:hover,
body.dark-theme .son-dakika .all-news:hover {
    background: #2a2a2a;
    color: #fff;
}

/* Mobil İyileştirmeler */
@media (max-width: 768px) {
    .son-dakika {
        height: 40px;
        margin: 10px auto;
        border-radius: 0;
    }

    .son-dakika .label {
        font-size: 11px;
        padding: 0 12px;
    }

    .son-dakika .label::after {
        border-top: 20px solid transparent;
        border-bottom: 20px solid transparent;
    }

    .son-dakika .news-nesne {
        padding: 0 15px;
        font-size: 13px;
    }

    .son-dakika .all-news {
        display: none;
        /* Mobilde alan kazanmak için gizle */
    }
}