/*
 * Canlı yayın paneli — sağ alt köşede sabit durur, tüm sitede görünür.
 * Panel JS tarafından oluşturulur; buradaki sınıflar live-stream.js ile aynı adları taşır.
 */

.live-stream-panel {
    position: fixed;
    right: 1.25rem;
    bottom: var(--live-stream-offset, 1.25rem);
    z-index: 9990;
    width: 340px;
    max-width: calc(100vw - 2.5rem);
    background: #fff;
    border-radius: .875rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    animation: live-stream-in .4s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes live-stream-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

/* Kapanirken geri kayar; JS animasyon bitince elemani siler. */
.live-stream-panel.is-closing {
    animation: live-stream-out .25s ease-in both;
}

@keyframes live-stream-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(16px); }
}

.live-stream-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem .875rem;
    background: linear-gradient(135deg, #e30613, #a30410);
    color: #fff;
}

.live-stream-badge {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.live-stream-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #fff;
    animation: live-stream-pulse 1.4s ease-in-out infinite;
}

@keyframes live-stream-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: .35; transform: scale(.7); }
}

.live-stream-close {
    margin-left: auto;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .9375rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.live-stream-close:hover {
    background: rgba(255, 255, 255, .35);
}

.live-stream-body {
    display: block;
    text-decoration: none;
    color: inherit;
}

.live-stream-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111827;
    overflow: hidden;
}

.live-stream-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.live-stream-body:hover .live-stream-thumb img {
    transform: scale(1.05);
}

.live-stream-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .25);
}

.live-stream-play span {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #e30613;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding-left: .18rem;
    box-shadow: 0 0 0 0 rgba(227, 6, 19, .55);
    animation: live-stream-ring 2s ease-out infinite;
}

@keyframes live-stream-ring {
    0%   { box-shadow: 0 0 0 0 rgba(227, 6, 19, .55); }
    70%  { box-shadow: 0 0 0 .85rem rgba(227, 6, 19, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 6, 19, 0); }
}

.live-stream-title {
    margin: 0;
    padding: .75rem .875rem .875rem;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.live-stream-body:hover .live-stream-title {
    color: #e30613;
}

/* Panel acikken "yukari cik" butonu (fixed bottom-6 right-6) panelin altinda
   kaliyordu. Panelin gercek yuksekligi JS'ten --live-stream-h ile gelir. */
body.has-live-stream .scroll-to-top-btn {
    bottom: calc(var(--live-stream-offset, 1.25rem) + var(--live-stream-h, 0px) + .75rem);
}

@media (max-width: 640px) {
    .live-stream-panel {
        right: .75rem;
        width: 250px;
        border-radius: .75rem;
    }

    .live-stream-title {
        font-size: .8125rem;
        padding: .625rem .75rem .75rem;
    }

    .live-stream-play span {
        width: 2.25rem;
        height: 2.25rem;
        font-size: .875rem;
    }
}

body.dark-mode .live-stream-panel {
    background: #1f2937;
}

body.dark-mode .live-stream-title {
    color: #f3f4f6;
}

@media (prefers-reduced-motion: reduce) {
    .live-stream-panel,
    .live-stream-panel.is-closing { animation: none; }
    .live-stream-dot,
    .live-stream-play span { animation: none; }
}
