@charset "UTF-8";

/* 🌎 Global Settings */
*,
*::before,
*::after {
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: Arial, sans-serif;
/*    background-color: #2c2c2c; */
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
}
.bigmom {
    max-width: 1450px;
}
.liverow {
    display: flex;
    width: 100%;
    height: 100%;
}

.column {
    padding: 0px;
    overflow: hidden;
}

.column.main {
    width: 71%;
    overflow-y: auto;
    padding: 0 40px;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.carouselinfo-containertext {
    padding: 0 40px;
}

.column.right {
    width: 29%;
/*    background-color: #2c2c2c; */
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 425px;
    margin: 0 15px;
    transition: width 0.3s ease;
}

/* ปุ่มสำหรับซ่อน/แสดง livesidebar */
.toggle-button {
    padding: 7px 10px;
    font-size: 12px;
    color: white;
    background-color: #e14545;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
    text-decoration: none;
}

.toggle-button.hidden {
  transform: rotate(180deg);
}

.toggle-button-mobile {
    display: none;
    padding: 7px 10px;
    font-size: 12px;
    color: white;
    background-color: #e14545;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

.main.fullwidth {
    width: 100%;
}

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.popup-content {
    position: relative;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 10px;
    text-align: center;
}

#popup-button-container {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 5px;
    max-width: 1511px;
}

.popup-button {
    padding: 7px 10px;
    font-size: 12px;
    color: white;
    background-color: #6544E9;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
    text-decoration: none;
}

.popup-button-left {
    margin-right: auto;
}

.popup-button-right {
    margin-left: 5px;
}

.popup-button-right.last-button {
    margin-right: 10px;
}

/* .popup-button:hover defined only once to avoid duplication */
.popup-button:hover {
    background-color: #e0e0e0;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
	background: rgb(255 0 0 / 100%);
	padding: 0px 10px;
	border-radius: 12px;
}

.popup iframe {
    width: 100%;
    height: 400px;
    border: none;
}

@media (max-width: 1025px) {
    iframe {
        width: 100%;
        max-width: none;
        border-radius: 0px;
        padding: 0;
        margin: 0;
    }

	.carouselinfo-containertext {
	    padding: 0 20px;
	}

/*    .container {
        text-align: center;
        width: 100%;
        margin: 0 auto;

    } */

    .g1-row-padding-m {
        padding-top: 0px;
    }

    .popup-button-right.last-button {
        display: none;
    }

    .popup-button-right.last-button-mobile {
        margin-right: 10px;
    }

    .toggle-button-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .toggle-button {
        display: none;
    }
    
    .liverow {
        flex-direction: column;
    }
	
	.right {
	    width: 100%;
	    padding: 0;
	    margin: 0;
	}

    .column.main, .column.right {
        width: 100%;
        border-radius: 0px;
        padding: 0px 0px;
        margin: 0;
	    border-radius: 0px;		
    }
}

.right {
    display: flex;
    flex-direction: column;
    padding: 0;
/*    background-color: #2c2c2c; */
    border-radius: 10px;
    margin: 0px;
}

/* new end */
.content-area .site-main,
.socialv-activity-site-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important; /* หรือกำหนดเป็นค่าที่ต้องการแทน 0 ก็ได้ */
}

/* 📺 Channel List & Navigation */
.channel-container {
    display: flex;
    align-items: center;
    position: relative;
	margin: 10px 10px;
}

#channel-list {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: calc(100% - 80px);
    padding: 10px 0;
    margin: 0 40px;
    gap: 10px;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#channel-list::-webkit-scrollbar {
    display: none;
}

.channel-button {
    flex-shrink: 0;
    width: 145px;
    text-align: center;
    background-color: var(--bg-secondary, #203d77);
    border: none;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    position: relative;
}

.channel-button img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.channel-button:hover {
    transform: scale(1.05);
    background-color: var(--bg-hover, #ffffff);
    color: black;
}

.channel-button.active {
    border: 2px solid var(--border-active, #00ff00);
    background-color: #333;
    box-shadow: 0 0 10px var(--border-active, #00ff00);
    transform: scale(1.1);
}

.channel-button.locked {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}
.channel-button.locked:hover {
    transform: none;
    background-color: var(--bg-secondary, #203d77);
    color: inherit;
}

/* 🔽 Scroll Buttons */
.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(33, 33, 33, 0.85);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: background 0.2s, transform 0.2s;
}
.scroll-button:hover {
    background: rgba(60, 60, 60, 0.95);
    transform: translateY(-50%) scale(1.1);
}

#scroll-left {
    left: 0;
}

#scroll-right {
    right: 0;
}

/* 🎞️ Bitrate Selector */
.bitrate-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0px 0;
}

.bitrate-button {
    padding: 10px 20px;
    background-color: var(--bg-hover, #444);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bitrate-button:hover {
    transform: scale(1.1);
}

.bitrate-button.unavailable {
    color: gray;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.6;
}

.bitrate-button.active {
    background-color: #007BFF;
    color: white;
    border: 1px solid #0056b3;
    font-weight: bold;
}

/* 📡 EPG Overlay */
#epg-overlay {
    position: absolute;
    top: 16px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 16px;
    border-radius: 8px;
    width: auto;
    min-width: 420px;		
    max-width: 450px;
    color: white;
    font-size: 0.95rem;
    flex-direction: column; /* ✅ ปรับให้เป็น column */
    align-items: flex-start; /* ✅ ทำให้ next-program อยู่ใต้โลโก้ */
    gap: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(-10px);
	display: none;
}

/* #epg-overlay show/hidden state defined only once */
#epg-overlay.show {
    opacity: 1;
    transform: translateY(0);
    z-index: 20;
    display: flex;
}

#epg-overlay.hidden {
    opacity: 0;
    transform: translateY(-10px);
    z-index: -1;
	display: none;
	pointer-events: none;
}

/* 📡 EPG Content */
.epg-content {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 📺 โลโก้ช่อง */
.epg-logo {
    width: 43px;
    height: 42px;
    padding: 4px 4px;	
    border-radius: 50%; /* ✅ ทำให้เป็นวงกลม */
    flex-shrink: 0;
}

/* 📑 ข้อมูล EPG */
.epg-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
    width: 100%;
}

/* 🏷️ ชื่อช่อง */
.epg-title {
    font-size: 1.2rem;
    padding: 2px 0px;		
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 🕒 เวลารายการ */
.epg-time {
    font-weight: bold;
    margin-right: 5px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* 🔹 รายการปัจจุบัน */
.epg-program {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 5px;
}

/* 🎬 รายการปัจจุบัน */
.epg-program .current {
    display: flex;
    width: 100%;
}

/* ⏭️ รายการถัดไป */
.epg-program .next {
    display: flex; /* ✅ ใช้ flex เพื่อให้เรียงในแนวเดียวกัน */
    flex-direction: row; /* ✅ ให้อยู่ในแถวเดียวกับ current */
    align-items: center; /* ✅ จัดให้อยู่ระดับเดียวกัน */
    padding-left: 10px;
    gap: 5px;
}

/* ✅ ขนาดข้อความรายการ */
#current-program {
    flex-grow: 1;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.9rem;
    min-height: 4.5em; /* ✅ กำหนดให้สูง 3 บรรทัด */
    line-height: 1.5em; /* ✅ ระยะห่างระหว่างบรรทัด */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* ✅ จำกัดสูงสุด 3 บรรทัด */
    -webkit-box-orient: vertical;
}

/* ✅ ปรับขนาดให้รองรับ 1 บรรทัด */
#next-program {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.9rem;
}

#close-epg {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9); /* 🔴 สีแดง */
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}

#close-epg:hover {
    background: rgba(200, 35, 51, 1); /* 🔴 สีแดงเข้มขึ้นตอน hover */
    transform: scale(1.1);
}

/* 🕒 เวลารายการปัจจุบัน (แสดงเป็น 3 บรรทัด) */
#current-time {
    display: flex;
    flex-direction: column; /* ✅ แยกบรรทัด */
    align-items: center; /* ✅ จัดให้อยู่ตรงกลาง */
    text-align: center;
    font-weight: bold;
    font-size: 1.0rem;
    line-height: 1.2;
    min-height: 3em; /* ✅ บังคับให้มี 3 บรรทัดเสมอ */
    padding: 5px 8px; /* ✅ เพิ่มระยะห่างขอบตัวอักษร */
    background: rgba(255, 255, 255, 0.5); /* ✅ พื้นหลังขาวโปร่ง 20% */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 6px; /* ✅ ทำให้ขอบมน */
}

/* 🕒 เวลารายการถัดไป (แสดงแค่เวลาเริ่มต้น) */
#next-time {
    font-weight: bold;
    font-size: 0.9rem;
}

/* 📱 Responsive Design */
@media (max-width: 1025px) {
    #epg-overlay {
        max-width: 350px;
        padding: 10px 12px;
    }

    .epg-logo {
        width: 40px;
        height: 40px;
    }

    .epg-title {
        font-size: 1rem;
    }

    #current-program, #next-program {
        font-size: 0.85rem;
    }

    .epg-time {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    #epg-overlay {
        max-width: 300px;
    }

    .epg-logo {
        width: 35px;
        height: 35px;
    }

    .epg-title {
        font-size: 0.9rem;
    }

    #current-program, #next-program {
        font-size: 0.8rem;
    }

    .epg-time {
        font-size: 0.8rem;
    }
}

/* 📌 ปรับขนาดของ EPG Modal ให้เล็กลง */
#epg-modal {
    display: none;
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* ✅ ลดขนาดเหลือ 90% ของหน้าจอ */
    max-width: 600px; /* ✅ จำกัดขนาดสูงสุด */
    background: rgba(0, 0, 0, 0.9); /* 🔥 พื้นหลังสีดำโปร่ง */
    border-radius: 12px;
    padding: 15px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#epg-modal .epg-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    width: 100%;
}

/* ❌ ปุ่มปิด Modal */
#epg-modal .close-modal {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9); /* 🔴 สีแดง */
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}

#epg-modal .close-modal:hover {
    background: rgba(200, 35, 51, 1); /* 🔴 สีแดงเข้มขึ้นตอน hover */
    transform: scale(1.1);
}

/* ✅ ปรับสไตล์ iframe ของ EPG ให้พอดีกับขนาดใหม่ */
#epg-iframe {
    width: 100%;
    height: 450px; /* ✅ ลดความสูงลง */
    border: none;
}

/* ✅ ปุ่ม "ดูตารางออกอากาศ" โทนฟ้า */
.view-full-epg-button {
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    background: rgba(0, 123, 255, 0.5); /* 🔵 สีฟ้าโปร่งแสง */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.view-full-epg-button:hover {
    background: rgba(0, 86, 179, 1); /* 🔵 สีฟ้าเข้มขึ้น */
    transform: scale(1.05);
}

/* 📌 ปุ่มแชท */
.chat-toggle-container {
    position: fixed;
    bottom: 0;
    right: 10px;
    width: auto;
    display: flex;
    justify-content: flex-end;
    z-index: 100;
    transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.chat-toggle-button {
    background: #2e2e2e;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.chat-toggle-button:hover {
    background: #444;
}

/* ✅ ซ่อนปุ่มแชทเมื่อแชทเปิดอยู่ */
.chat-toggle-container.hidden {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

/* 🎭 กล่องแชทเป็นป๊อปอัพ */
#chat-container {
    position: fixed;
    bottom: 0px;
    right: 10px;
    width: 29%;
    max-height: 60vh;
    height: 550px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
    transform: translateY(0);
    z-index: 99;
}

/* ✅ เมื่อแชทถูกปิด */
#chat-container.closed {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
}

/* 💬 กรอบภายในของแชท */
#chat-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 350px;
}

/* ❌ ปุ่มปิดแชท */
#close-chat {
    position: absolute;
    top: 5px;
    right: 10px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
}

#close-chat:hover {
    background: darkred;
}

/* 📌 แสดงแชทเต็มจอในมือถือ */
@media (max-width: 1025px) {
    #chat-container {
        max-height: 44vh;
        width: 100vw;
        max-width: none;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        box-shadow: none;
        z-index: 99;
        position: fixed;
    }

    /* เมื่อเปิดตัวเลือก (มี .options-visible) ให้ลดความสูงของแชท */
    .options-visible #chat-container {
        max-height: 19vh; /* ปรับค่าตามที่คุณต้องการ */
    }
	
    /* เมื่อเปิดตัวเลือก (มี .options-visible) ให้ลดความสูงของแชท */
    .options-visible2 #chat-container {
        max-height: 19vh; /* ปรับค่าตามที่คุณต้องการ */
    }

    /* 🔹 ปุ่มปิดแชทในมือถือ */
    #close-chat {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        background: red;
        padding: 10px;
        border-radius: 50%;
    }
}

/* 📌 แสดงแชทเต็มจอในมือถือ */
@media (max-width: 768px) {
    #chat-container {
        max-height: 47vh;
        width: 100vw;
        max-width: none;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        box-shadow: none;
        z-index: 99;
        position: fixed;
    }

    /* เมื่อเปิดตัวเลือก (มี .options-visible) ให้ลดความสูงของแชท */
    .options-visible #chat-container {
        max-height: 10vh; /* ปรับค่าตามที่คุณต้องการ */
    }
	
    /* เมื่อเปิดตัวเลือก (มี .options-visible) ให้ลดความสูงของแชท */
    .options-visible2 #chat-container {
        max-height: 10vh; /* ปรับค่าตามที่คุณต้องการ */
    }

    /* 🔹 ปุ่มปิดแชทในมือถือ */
    #close-chat {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        background: red;
        padding: 10px;
        border-radius: 50%;
    }
}

/* ✅ ซ่อนช่อง, บิตเรท และหัวข้อคำพูดบนมือถือ (ค่าเริ่มต้น) */
@media (max-width: 1025px) {
    .channel-container, 
    h1.carousel-container.mobile  {
        display: none;
    }
	
	
}

/* 📌 ซ่อนปุ่มตัวเลือกบน PC */
.toggle-options-container {
    display: none;
}

/* ✅ แสดงปุ่มตัวเลือกเฉพาะบนมือถือ */
@media (max-width: 1025px) {
    .toggle-options-container {
        display: block;
        text-align: center; /* ทำให้ปุ่มอยู่ตรงกลาง */
        margin-top: 6px; /* เพิ่มระยะห่างจากองค์ประกอบข้างบน */
    }
	
	/* ✅ แสดงตัวเลือกเมื่อกดปุ่ม */
	.options-visible .channel-container,
	.options-visible h1.carousel-container.mobile  {
	    display: flex; /* แสดงตัวเลือกเมื่อกดปุ่ม */
	}	

    .toggle-options-button {
        background: rgba(33, 33, 33, 0.9);
        color: white;
        font-size: 16px;
        font-weight: bold;
        padding: 6px 10px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: 0.3s;
    }

    .toggle-options-button:hover {
        background: rgba(50, 50, 50, 1);
        transform: scale(1.05);
    }
}

/* ✅ แสดงตัวเลือกเมื่อกดปุ่ม */
.options-visible .channel-container,
.options-visible h1.carousel-container.mobile  {
    display: flex; /* แสดงตัวเลือกเมื่อกดปุ่ม */
}

/* ✅ แสดงตัวเลือกเมื่อกดปุ่ม */
.options-visible2 .channel-container,
.options-visible2 h1.carousel-container.mobile  {
    display: none; /* แสดงตัวเลือกเมื่อกดปุ่ม */
}

/* Customize scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #2c2c2c;
}

::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
    border: 2px solid #2c2c2c;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #888 #2c2c2c;
}

/* ✅ ปรับสไตล์ของหัวข้อช่องและบิทเรท */
h1.carousel-container.mobile {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
/*    background: rgba(0, 0, 0, 0.75); */
    padding: 6px 12px;
    border-radius: 10px;
    margin: 8px auto;
/*    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); */
    letter-spacing: 0.5px;
}


/* ✅ ปรับสไตล์ของปุ่มบิทเรทในโอเวอรเลย */
h1.epg-overlay-bitrate {
    font-size: 18px;
    color: #8ebd5c;
    padding: 1px 14px;
    border-radius: 10px;
}

/* ✅ ปรับให้สวยขึ้นบนมือถือ */
@media (max-width: 1025px) {
    h1.carousel-container.mobile {
        font-size: 16px;
        padding: 5px 10px;
    }
}

/* ✅ ซ่อนปุ่มตัวเลือกทั้งหมดบน PC */
.toggle-options-bitrate-container {
    display: none;
}

.video-container.fade-out {
  opacity: 0;
  transition: opacity 1s ease-out;
}
.video-container.fade-in {
  opacity: 1;
  transition: opacity 1s ease-in;
}

.program-card {
  background: #0d1b3e;
  padding: 1px;
  margin: 9px 9px;
  border-radius: 5px;
}
.program-card.live-now {
/*      background-color: #ffeb3b; */
  color: black;
  font-weight: bold;
  box-shadow: 0 0 2px 5px rgba(255, 0, 0, 0.6);
}
.program-card.live-now .program-time {
  background-color: red; /* พื้นหลังสีแดง */
  color: white;          /* ตัวอักษรสีขาว */
  font-weight: bold;
}	
@keyframes pulse {
  from { transform: scale(1.05); }
  to { transform: scale(1.08); }
}
.program-card.finished {
  background: #dcdcdc;
  color: #666;
}
/* .program-card.upcoming { */
/*   border-left: 5px solid #007bff; */
/* } */
/* .animation { border-left: 5px solid #8A2BE2 !important; } */
.program-name {
  font-size: 17px;
  color: white;          /* ตัวอักษรสีขาว */
  margin: 2px 4px;
  padding: 2px;  
  border-radius: 5px;
  min-height: 48px; /* ปรับความสูงให้พอดีกับ 2 บรรทัด */
  line-height: 1.5; /* กำหนดระยะห่างของแต่ละบรรทัด */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.program-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: bold;
}
.time { color: #333; }
.genre { 
  color: #007BFF;
  padding: 2px 8px;
  font-weight: bold;
}
.date { color: #333; }
.status {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
}
.status-left { color: #ff9800; }
.program-time {
  background: #007bff;
  color: white;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 15px;
  min-width: 50px;
  text-align: center;
  display: inline; /* หรือ inline-block ถ้าต้องการควบคุม width */
  white-space: nowrap;
  overflow: hidden;      /* หากต้องการซ่อนข้อความที่เกิน */
  text-overflow: ellipsis; /* เพื่อแสดง ... เมื่อข้อความเกิน */
}
.program-date {
  font-size: 12px;
  font-weight: bold;
  color: #666;
}
.status-left.live-now {
  color: red !important;
  font-weight: bold;
}
.status-right {
  padding: 3px 8px;
  color: #676767;
  border-radius: 5px;
  font-weight: bold;
}	

#current-channel-info {

  bottom: 10px;           /* ปรับตำแหน่งได้ตามต้องการ */
  left: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  color: white;
  z-index: 100;
}

#current-channel-info img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 26%;
}

#current-channel-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#current-channel-name {
  font-weight: bold;
  font-size: 1rem;
}

#current-program-name {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #ddd;
}

#toggle-name-format {
  background-color: #007BFF;    /* พื้นหลังสีฟ้า */
  color: #fff;                  /* ตัวอักษรสีขาว */
  border: none;                 /* ไม่มีขอบ */
  padding: 8px 12px;            /* ระยะห่างด้านใน */
  font-size: 14px;              /* ขนาดตัวอักษร */
  font-weight: bold;            /* ตัวหนา */
  border-radius: 4px;           /* มุมโค้ง */
  cursor: pointer;              /* เปลี่ยนเป็น pointer เมื่อ hover */
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-bottom: 10px;          /* ระยะห่างด้านล่าง */
}

#toggle-name-format:hover {
  background-color: #0056b3;    /* สีเข้มขึ้นเมื่อ hover */
  transform: scale(1.05);       /* ขยายเล็กน้อยเมื่อ hover */
}

.vjs-audio-track-button .fa-headphones {
    font-size: 18px; /* ขนาดไอคอน */
}

.vjs-audio-track-button {
    position: relative;
    display: inline-block;
}

.vjs-audio-track-menu {
    display: none;
    position: absolute;
    bottom: 35px;
    left: 0;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    overflow: hidden;
    z-index: 100;
    width: 100px;
}

.vjs-audio-track-menu button {
    display: block;
    background: none;
    border: none;
    color: #fff;
    padding: 10px;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

/* 🎥 Video Player */
.video-container {
    width: 100%;
    margin-top: 0px; /* ระยะห่างจากองค์ประกอบข้างบน */	
    /* max-width: 1111px; */
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;	
}

.video-js {
    width: 100%;
    height: 100%;
    margin-top: 0px; /* ระยะห่างจากองค์ประกอบข้างบน */		
    border-radius: 5px;
}

/* 🔊 Unmute Button */
#unmute-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    padding: 20px 30px;
    background: linear-gradient(145deg, rgba(33, 33, 33, 0.8), rgba(0, 0, 0, 0.8));
    color: #fff;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    transition: transform 0.2s ease;
}

#unmute-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(50, 50, 50, 0.9);
}

/* 📌 Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

#loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-bar {
    width: 0%;
    height: 100%;
    background: #00ff99;
    transition: width 0.3s ease-in-out;
}

#loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 📱 Responsive Design */
@media (max-width: 1025px) {
    .channel-button {
        width: 130px;
    }

    .channel-button img {
        width: 70px;
        height: 70px;
    }

    #unmute-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .channel-button {
        width: 120px;
    }

    .channel-button img {
        width: 60px;
        height: 60px;
    }

    .bitrate-button {
        padding: 5px 10px;
        font-size: 14px;
    }
}
/* ===== Channel button number + label ===== */
.ch-num {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    line-height: 1;
    z-index: 2;
    background: rgba(0,0,0,0.35);
    padding: 1px 5px;
    border-radius: 6px;
}
.ch-label {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-align: center;
}
