/*
 * live-stream.css — 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.
 * Renkler premium temanın paletinden alındı:
 *   line #e3e6ea · mist #f4f6f8 · ink2 #1c1d1e · ink3 #2b2c2e · signal #e01b12
 */

.live-stream-panel {
    position: fixed;
    right: 1.5rem;
    bottom: var(--live-stream-offset, 1.5rem);
    z-index: 9990;
    width: 340px;
    max-width: calc(100vw - 3rem);
    background: #fff;
    border: 1px solid rgb(227 230 234);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px -12px rgba(15, 18, 24, .45);
    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, #e01b12, #9d1009);
    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.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.live-stream-close:hover {
    background: rgba(255, 255, 255, .32);
    transform: scale(1.06);
}

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

.live-stream-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1c1d1e;
    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(17, 18, 20, .28);
}

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

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

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

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

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

@media (max-width: 640px) {
    .live-stream-panel {
        right: .75rem;
        bottom: var(--live-stream-offset, .75rem);
        width: 250px;
        max-width: calc(100vw - 1.5rem);
        border-radius: 14px;
    }

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

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

html.dark .live-stream-panel,
body.dark-mode .live-stream-panel {
    background: rgb(28 29 30);
    border-color: rgb(43 44 46);
}

html.dark .live-stream-title,
body.dark-mode .live-stream-title {
    color: #f4f6f8;
}

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