/* Cola Header Styles */
body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

html {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Loại bỏ khoảng trống từ #app */
#app.ok365-app {
  margin-top: 0 !important;
  padding-top: 0 !important;
  top: 0 !important;
}

.cola-header {
  background: #fff;
  border-bottom: 1px solid #e3e3e3;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.cola-header-container {
  max-width: 1308px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 65px;
}

.cola-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #000;
  cursor: pointer;
}

.cola-logo-img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.cola-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.cola-nav-item {
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cola-nav-item:hover {
  color: #dd1818;
  background: rgba(221, 24, 24, 0.05);
}

.cola-nav-item.active {
  color: #fff;
  background: #dd1818;
}

.cola-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cola-language {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.cola-globe-icon {
  width: 20px;
  height: 20px;
  color: #666;
  transition: color 0.2s;
}

.cola-language:hover .cola-globe-icon {
  color: #dd1818;
}

.cola-language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px 12px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.cola-language:hover .cola-language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.cola-lang-item {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cola-lang-item:last-child {
  border-bottom: none;
}

.cola-lang-text {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  display: block;
}

.cola-lang-timezone {
  font-size: 11px;
  color: #999;
  display: block;
}

.cola-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cola-btn-login {
  padding: 8px 20px;
  border: 1px solid #dd1818;
  border-radius: 6px;
  color: #dd1818;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  background: #fff;
}

.cola-btn-login:hover {
  background: #dd1818;
  color: #fff;
}

.cola-btn-register {
  padding: 8px 20px;
  background: #dd1818;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.cola-btn-register:hover {
  background: #c01515;
}

.cola-gift {
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cola-gift svg {
  width: 100%;
  height: 100%;
}

/* User Menu Styles */
.cola-user-menu {
  position: relative;
}

.cola-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.cola-user-avatar:hover {
  border-color: #dd1818;
}

.cola-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cola-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.cola-user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* User Info Section */
.cola-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.cola-user-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cola-user-details {
  flex: 1;
  min-width: 0;
}

.cola-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cola-user-role {
  display: inline-block;
  padding: 4px 10px;
  background: #ffd700;
  color: #000;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.cola-btn-logout {
  padding: 6px 16px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.cola-btn-logout:hover {
  background: #e8e8e8;
  border-color: #d0d0d0;
}

/* Progress Bar Section */
.cola-user-progress {
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.cola-progress-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cola-level-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.cola-level-badge.current {
  background: #9ca3af;
}

.cola-level-badge.next {
  background: #dd1818;
}

.cola-progress-bar {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.cola-progress-fill {
  height: 100%;
  background: #ffd700;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.cola-exp-text {
  font-size: 12px;
  color: #333;
  text-align: center;
  margin-top: 4px;
}

/* Action Buttons */
.cola-user-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cola-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-decoration: none;
  color: #333;
  border-radius: 8px;
  transition: background 0.2s;
}

.cola-action-btn:hover {
  background: #f5f5f5;
}

.cola-action-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.cola-action-icon.center {
  background: #9333ea;
}

.cola-action-icon.follow {
  background: #9333ea;
  border-radius: 8px;
  font-size: 24px;
}

.cola-action-icon.schedule {
  background: #9333ea;
  font-size: 18px;
}

.cola-action-btn span {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {
  .cola-header-container {
    padding: 0 15px;
    height: 60px;
  }
  
  .cola-nav {
    display: none;
  }
  
  .cola-language {
    display: flex;
  }
  
  .cola-auth {
    gap: 8px;
  }
  
  .cola-btn-login,
  .cola-btn-register {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .cola-gift {
    display: none;
  }
  
  .cola-user-dropdown {
    width: 280px;
    right: -20px;
  }
}

/* Hide old header */
.site-header {
  display: none !important;
}

/* Đồng bộ khoảng cách giữa header và nội dung trên tất cả các trang */
#page.site {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#content.site-content,
.main_body,
.site-main,
main#main {
  margin-top: 0 !important;
  padding-top: 65px !important;
}

/* Xóa khoảng cách giữa header và nội dung trên trang phonglive */
body.single-phonglive .homestream.pt-5,
body.single-phonglive .homestream {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.single-phonglive .row.pt-5,
body.single-phonglive .homestream .row {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Đảm bảo container không có margin-top thừa */
.container,
.container-fluid,
.site-content,
.container-xxl {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Loại bỏ margin-top từ các element đầu tiên trong content */
#content > *:first-child,
.main_body > *:first-child,
.site-main > *:first-child,
main#main > *:first-child,
.container > *:first-child,
.container-fluid > *:first-child {
  margin-top: 0 !important;
}

/* Loại bỏ padding-top từ các row/col đầu tiên */
.row:first-child,
.col:first-child,
[class*="col-"]:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Đảm bảo các trang match, highlights, category có khoảng cách đồng bộ */
.matches_page,
.archive,
.category,
.page-template {
  padding-top: 65px !important;
  margin-top: 0 !important;
}

/* Override padding-top lớn từ custom.css */
body.page-template-page-ok365-home .site-content,
body.page-id-202 .site-content {
  padding-top: 65px !important;
}

/* Đảm bảo tất cả các trang đều có khoảng cách đồng bộ (chỉ bằng chiều cao header) */
body .site-content,
body #content,
body .main_body,
body main#main,
body .matches_page,
body .archive,
body .category {
  padding-top: 65px !important;
  margin-top: 0 !important;
}

/* Đặc biệt cho các trang category và archive */
body.category .site-content,
body.archive .site-content,
body.category #content,
body.archive #content,
body.category main#main,
body.archive main#main {
  padding-top: 65px !important;
  margin-top: 0 !important;
}

/* Trang match */
body .matches_page,
.matches_page .container-xxl {
  padding-top: 65px !important;
  margin-top: 0 !important;
}

/* Loại bỏ khoảng trống từ các element trước header */
body > *:first-child,
#page > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Override padding-top lớn từ style.css */
.site-content {
  padding-top: 65px !important;
}

@media (min-width: 992px) {
  .site-content {
    padding-top: 65px !important;
  }
  body.admin-bar .site-content {
    padding-top: 65px !important;
  }
}

/* Đảm bảo #page không có margin/padding */
#page.site {
  margin: 0 !important;
  padding: 0 !important;
}

/* Đảm bảo header ngay sát top */
body > .cola-header,
#page > .cola-header,
body .cola-header {
  margin-top: 0 !important;
  top: 0 !important;
  position: fixed !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Đảm bảo không có element nào tạo khoảng trống trước header */
body > *:not(.cola-header):first-child,
#page > *:not(.cola-header):first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Điều chỉnh padding-top của content để bù cho fixed header (chỉ bằng chiều cao header) */
body .site-content,
body #content,
body .main_body,
body main#main {
  padding-top: 65px !important;
  margin-top: 0 !important;
}

/* Trang chủ - tăng padding-top để tạo khoảng cách header giống ảnh 2 */
body.home .site-content,
body.home #content,
body.home .main_body,
body.home main#main,
body.home .cola-home-page .main_body {
  padding-top: 100px !important;
  margin-top: 0 !important;
}

