/**CSS homepage**/

.header {
    display: flex !important;
    z-index: 1500;
    background: linear-gradient(360deg, rgb(39 41 71), rgb(5 12 42 / 87%)) !important;
    justify-content: center !important;
}

.nav-tabs {
    margin: 0 15px !important;
}

.header-content {
    margin: 0 !important;
}

a.btn {
    text-transform: uppercase !important;
}

.btn-primary {
    font-size: 12px !important;
}

.btn-secondary {
    font-size: 12px !important;
}

.header-buttons {
    align-items: center !important;
    margin-right: 20px !important;
}

.match-item-head {
    padding: 5px 15px !important;
}

.match-item__comp {
    color: #fff !important;
    max-width: 120px !important;
}

.match-item__time {
     background: linear-gradient(#1a1e23, #1a1e23) padding-box, linear-gradient(180deg, #1a1e23 0%, #ff9e00 100%) border-box !important;
    border: 1px solid transparent !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    border-radius: 30px !important;
    color: #fff !important;
}

.match-home, .match-away {
        align-items: center !important;
}

.match-score-live {
    padding: 0 20px !important;
}

.match-score-live .home-score, .match-score-live .divide-score, .match-score-live .away-score {
    color: #fff !important;
}

.match-score-live {
    font-size: 20px !important;
    padding: 3px 20px !important;
}

.ht-label {
    font-size: 12px !important;
}

.quick-stat-home, .quick-stat-sep, .quick-stat-away, .vs-match {
    color: #fff !important;
}

.match-item__live-badge span {
        border: 1px solid #09db2a85 !important;
    background: linear-gradient(113deg, #00af2b 7.37%, #00af2b 57.22%, #00af2b 66.05%, #000 131.67%) !important;
    box-shadow: inset 0 0 0 1px #00af2b !important;
    text-transform: uppercase !important;
}

.match-item.running-border {
        border: 1px solid rgb(34 197 94) !important;
} 

.match-item {
    background: url(/wp-content/uploads/2025/07/bg-match.png) #000069 50% / cover no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
    z-index: 10;
}

.blv-list {
    justify-content: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    min-width: max-content !important;
}

    .match-item-footer {
        overflow-x: auto !important;
        position: relative; 
        z-index: 20;
    }
    
    .match-item-footer::-webkit-scrollbar { 
        height: 6px; 
        
    } 
    
    .match-item-footer::-webkit-scrollbar-thumb { 
        background: #555; border-radius: 3px; 
        
    }

.blv-name {
    font-size: 13px;
}

.match-item-head {
    border-bottom: none !important;
}

.match-item.live-match:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgb(53 255 167 / 39%) !important;
    transition: all 0.3s ease;
}

.match-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgb(255 101 53 / 39%) !important; 
    transition: all 0.3s ease;
}

.blv-link:hover {
    background: #ff7e07 !important;
}

.filter-tab {
    font-size: 13px !important;
}

.match-item, .filters-content {
        border: 1px solid #3c4459 !important;
}

@media (max-width: 480px) {
    a.btn.btn-primary {
        order: 2 !important;
    }
    
    .btn-secondary {
        order: 2 !important;
    }

    
    .filter-tab {
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
    
    .filter-tab.active {
        font-size: 14px !important;
    }
    
    .match-item__live-badge span {
        padding: 4px 20px !important;
        font-size: 12px !important;
    }
    
    .match-item-head {
        padding-top: none !important;
    }
    
    .match-item__comp {
        text-align: left !important;
        max-width: 150px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 12px !important;
        max-width: 120px !important;
    }
    
    .match-item__time {
        font-size: 12px !important;
    }
    
    .ht-label, .quick-stat-values, .quick-stat-item {
        font-size: 12px !important;
    }
    
    .quick-stat-icon img {
        width: 15px !important;
        height: 15px !important;
    }
    
    .blv-name {
        font-size: 12px !important;
    }
    
    .blv-avatar {
        width: 25px !important;
        height: 25px !important;
    }
    
    .name-team {
        font-size: 12px;
    }
}



/**css watch**/
.match-header {
        display: grid !important;
    grid-template-columns: 1fr auto 1fr; /* trái – giữa – phải */
    align-items: center;
    position: relative;
}

.blv-matches-section {
    margin: 20px 0 !important;
}

.blv-matches-list {
        display: flex !important;
    overflow-x: auto;
    gap: 12px;
    padding: 10px !important;
    scroll-snap-type: x mandatory;
}

a.blv-match-card {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
    border: 1px solid #ffffff80;
}

.blv-match-card {
        background: url(/wp-content/uploads/2025/07/bg-match.png) #000069 50% / cover no-repeat !important;
        background-size: cover !important;
}


.blv-matches-title {
    font-size: 15px;
}

.blv-matches-section {
    background: none !important;
}

#blv-matches-list::-webkit-scrollbar {
    height: 6px;
}

#blv-matches-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

#blv-matches-list > div {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.tabs-nav li a {
    border-radius: 6px 6px 0 0 !important;
}

.video-footer {
    padding: 15px !important;
}

.blv-follow-btn {
    border-radius: 5px !important;
    background: #DD1818 !important;
}

.blv-followers {
    display: none !important;
}

/* ========== MOBILE MENU ========== */
@media (max-width: 768px) {
    
    /* Header nằm trên cùng (như đã làm) */
    .header {
        position: sticky !important;
        z-index: 2000;
    }
    
    .header-buttons {
        margin: 0 10px !important;
    }

  /* Nút hamburger */
  .mobile-menu-toggle {
    margin: 10px !important;
    width: 32px;
    height: 24px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff; /* chỉnh theo màu header Colatv */
    border-radius: 4px;
  }

  /* Ẩn layout nav cũ trên mobile và chuyển thành side-menu */
  .nav-tabs {
    position: fixed;
    top: var(--header-height, 60px);       /* luôn ngay dưới header */
    width: 100%;
    background: #050511f2;
    z-index: 1500;

    /* QUAN TRỌNG: ẩn dần từ dưới lên */
    overflow: hidden;
    max-height: 0;                         /* đóng = 0, không thấy gì */
    opacity: 0;
    transition: max-height 0.25s ease-out,
                opacity 0.2s ease-out;
    pointer-events: none;                  /* không click được khi đóng */
  }

  .nav-tabs .nav-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .nav-tabs .nav-content a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
  }

  /* Overlay tối phía sau */
  .mobile-menu-overlay {
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1400;
  }

  /* Khi mở menu */
  body.menu-open .nav-tabs {
    max-height: calc(100vh - var(--header-height, 60px));  /* hoặc 80vh */
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.menu-open {
    overflow: hidden; /* chặn scroll nền */
  }
  
  .c-right {
      max-width: 100% !important;
  }
  
  .blv-follow-btn {
      margin-left: auto !important;
  }
}



/* Desktop: giữ nguyên nav như cũ (nếu cần có thể style riêng >768px) */
@media (min-width: 769px) {
  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none;
  }
  
  .fixed-bottom-menu {
      display: none !important;
  }
}


@media (max-width: 480px) {
    .team img {
        max-width: 50px !important;
        max-height: 50px !important;
    }
    
    .team-logo {
        max-width: 50px !important;
        max-height: 50px !important;
    }
    
    .match-header-wrapper .match-header {
        display: flex !important;
    }
    
    .quick-stats.active {
        order: 1 !important;
    }
    
    .quick-stats {
        border-radius: 0 0 10px 10px !important;
        background: none !important;
    }
    
    .blv-matches-list {
        display: flex !important;
        padding: 10px !important;
    }
    
    .tabs-nav {
    overflow-x: auto;
    width: 100%;
}

    .tabs-nav ul {
            flex-wrap: nowrap;
        white-space: nowrap;
        gap: 10px;
        min-width: max-content;
        overflow-x: auto;
    }
    
    .tabs-nav a {
        padding: 5px 10px !important; 
        font-size: 13px !important;
    }
    
    .blv-followers {
        display: none !important;
    }
    
    .blv-match-status {
        font-size: 12px !important;
    }
    
    .blv-match-team span {
        max-width: 100px !important;
    }
    
    .blv-matches-title {
        color: #fff !important;
    }
    
    .code2m-xem-live .heading-watch {
        font-size: 1.1rem !important;
    }
    
    .video-footer .tab-button {
        font-size: 12px !important;
    }
    .video-player.is-floating.floating-draggable {
        margin: 70px 10px 0 0;
    }
    
    .video-player.is-floating.floating-draggable {
            position: fixed;
    z-index: 9999;
    width: 45vw;
    max-width: 260px;
    aspect-ratio: 16 / 9;
    /* giá trị mặc định khi mới bật mini */
    top: env(safe-area-inset-top, 0px);
    right: 8px;
    }
    
    #chat_messages.chat-messages {
        max-height: 50vh !important;
        min-height: 46vh !important;
    }
    
    .chat-message {
        margin-bottom: 3px !important;
    }
    
    .chat-message p {
        line-height: 15px !important;
    }
    
    .video-section {
        border-radius: 5px 5px 0 0;
    }
    
    .chat-section {
        border-radius: 0 0 5px 5px;
    }
    
    .container-extend {
        padding: 0px;
    }
}