/* Twitch page (/twitch) and the small live badge in the site header */

.kgm_twitch_container {
    display: flex;
    justify-content: center;
    padding: 30px 0 80px;
    background-color: #f7f8fc;
}

.kgm_twitch_box {
    width: 100%;
    max-width: 1000px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: 30px;
}

    .kgm_twitch_box h1 {
        border-radius: 8px 8px 0 0;
        padding: 8px 12px;
    }

    .kgm_twitch_box h2 {
        margin: 30px 20px 12px;
    }

/* Channel header: avatar, name, live pill, button */
.kgm_twitch_channel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
}

.kgm_twitch_avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.kgm_twitch_channel_text {
    flex: 1;
    min-width: 200px;
}

.kgm_twitch_channel_name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.kgm_twitch_channel_desc {
    margin-top: 4px;
    font-size: 15px;
    color: #555;
}

.kgm_twitch_pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

    .kgm_twitch_pill.is-live {
        background-color: #e91916;
        color: #fff;
    }

    .kgm_twitch_pill.is-offline {
        background-color: #ddd;
        color: #555;
    }

.kgm_twitch_btn {
    padding: 10px 16px;
    border-radius: 6px;
    background-color: #9146ff;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

    .kgm_twitch_btn:hover {
        background-color: #772ce8;
    }

.kgm_twitch_notice {
    margin: 0 20px;
    padding: 14px 16px;
    background-color: #fff6d6;
    border-left: 4px solid #e7c700;
    color: #444;
}

/* Live: player + chat side by side */
.kgm_twitch_stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    padding: 0 20px;
}

.kgm_twitch_player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

    .kgm_twitch_player iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

.kgm_twitch_player_solo {
    width: auto;
    margin: 0 20px;
}

.kgm_twitch_chat {
    min-height: 300px;
}

    .kgm_twitch_chat iframe {
        width: 100%;
        height: 100%;
        min-height: 400px;
        border: 0;
    }

.kgm_twitch_livetitle {
    margin: 12px 20px 4px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.kgm_twitch_livemeta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 20px;
    font-size: 14px;
    color: #555;
}

/* Offline */
.kgm_twitch_offline {
    padding: 0 20px;
    color: #333;
}

    .kgm_twitch_offline p {
        margin-bottom: 8px;
    }

.kgm_twitch_next {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin-top: 12px;
    padding: 12px 16px;
    background-color: #f4f4f4;
    border-left: 4px solid #9146ff;
}

.kgm_twitch_next_label {
    font-weight: 700;
    color: #333;
}

.kgm_twitch_next time {
    font-weight: 700;
    color: #9146ff;
}

.kgm_twitch_next_cat {
    color: #777;
}

.kgm_twitch_muted {
    margin: 0 20px;
    color: #777;
}

/* Schedule list */
.kgm_twitch_schedule {
    list-style: none;
    margin: 0 20px;
    padding: 0;
}

    .kgm_twitch_schedule li {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px 14px;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .kgm_twitch_schedule time {
        min-width: 170px;
        font-weight: 700;
        color: #333;
    }

    .kgm_twitch_schedule li.is-canceled {
        color: #999;
    }

        .kgm_twitch_schedule li.is-canceled time {
            color: #999;
            text-decoration: line-through;
        }

.kgm_twitch_sched_cat {
    color: #777;
}

.kgm_twitch_sched_canceled {
    color: #e91916;
    font-weight: 700;
}

/* Video / clip cards */
.kgm_twitch_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 0 20px;
}

.kgm_twitch_card {
    display: block;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    transition: box-shadow 0.15s;
}

    .kgm_twitch_card:hover {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    }

.kgm_twitch_thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #ddd;
}

    .kgm_twitch_thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.kgm_twitch_duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.kgm_twitch_card_title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 8px 10px 2px;
    font-size: 14px;
    font-weight: 700;
}

.kgm_twitch_card_meta {
    padding: 0 10px 10px;
    font-size: 12px;
    color: #777;
}

/* Header badge, shown on every page while the channel is live */
.kgmdk_top_livepill {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background-color: #e91916;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .kgm_twitch_stage {
        grid-template-columns: 1fr;
    }

    .kgm_twitch_chat iframe {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .kgm_twitch_container {
        padding-top: 10px;
    }

    .kgm_twitch_box {
        border-radius: 0;
    }

    .kgm_twitch_box h1 {
        border-radius: 0;
    }
}

/* Multi-channel: overview strip at the top and one section per channel */
.kgm_twitch_overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 16px 20px 0;
}

.kgm_twitch_ov_card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #fafafa;
    color: #333;
    text-decoration: none;
}

    .kgm_twitch_ov_card:hover {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }

    .kgm_twitch_ov_card.is-live {
        border-color: #e91916;
        background-color: #fff5f5;
    }

    .kgm_twitch_ov_card img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }

.kgm_twitch_ov_name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 700;
}

.kgm_twitch_ov_purpose {
    margin-top: 2px;
    font-size: 13px;
    color: #666;
}

.kgm_twitch_section {
    scroll-margin-top: 20px;
}

    /* Breathing room between one channel's content and the next channel's heading */
    .kgm_twitch_section + .kgm_twitch_section {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid #e5e5e5;
    }

    .kgm_twitch_section h2 {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 4px 12px;
    }

        .kgm_twitch_section h2 .kgm_twitch_pill {
            font-size: 11px;
        }

/* The global h3 rule sets a fixed height and 30px top padding, which pushes the text
   below the border. Reset those here so the underline sits under the text. */
.kgm_twitch_box h3 {
    height: auto;
    margin: 24px 20px 8px;
    padding: 0 0 4px;
    border-bottom: 2px solid #e7c700;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #333;
}

.kgm_twitch_purpose {
    font-size: 14px;
    font-weight: 600;
    color: #9146ff;
}

/* Header promo bar: next show, or LIVE NOW while streaming (see _TwitchPromo.cshtml) */
.kgm_promo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 44px 8px 16px;
    font-size: 14px;
    line-height: 1.4;
}

    .kgm_promo.is-next {
        background-color: #222;
        color: #eee;
    }

    .kgm_promo.is-live {
        background-color: #e91916;
        color: #fff;
    }

.kgm_promo_link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: inherit;
    text-decoration: none;
}

    .kgm_promo_link:hover .kgm_promo_cta {
        text-decoration: underline;
    }

.kgm_promo_badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.is-next .kgm_promo_badge {
    background-color: #e7c700;
    color: #222;
}

.is-live .kgm_promo_badge {
    background-color: #fff;
    color: #e91916;
    animation: kgm_promo_pulse 1.6s ease-in-out infinite;
}

.kgm_promo_text time {
    font-weight: 700;
    color: #e7c700;
}

.is-live .kgm_promo_text time {
    color: #fff;
}

.kgm_promo_cta {
    font-weight: 700;
    white-space: nowrap;
}

.kgm_promo_close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 2px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

    .kgm_promo_close:hover {
        opacity: 1;
    }

@keyframes kgm_promo_pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .is-live .kgm_promo_badge {
        animation: none;
    }
}

@media (max-width: 600px) {
    .kgm_promo {
        padding: 8px 40px 8px 12px;
        font-size: 13px;
    }

    /* The whole bar is the link, so the call to action can go on small screens */
    .kgm_promo_cta {
        display: none;
    }
}
