/* UI 7 — xsmb.me: dùng CSS gốc (main.css + all.css). cv-1 giữ nguyên bản gốc; cv-2..8 đổi màu & kiểu bằng biến --ui-* */
body.ui-7:not(.cv-1) .txt-logo-text { display: inline-block; font: 800 26px/40px "Segoe UI", system-ui, Arial, sans-serif; color: var(--ui-primary); letter-spacing: .5px; }
body.ui-7:not(.cv-1) header .txt-logo-text { line-height: 46px; }
body.ui-7:not(.cv-1) nav { background: var(--ui-primary) !important; border-radius: var(--ui-radius); }
@media (min-width: 901px) {
  body.ui-7:not(.cv-1) nav li:hover, body.ui-7:not(.cv-1) .menu-pc li.active { background: var(--ui-nav-active-bg) !important; }
  body.ui-7:not(.cv-1) nav li.fl:hover a { color: var(--ui-nav-text) !important; }
  body.ui-7:not(.cv-1) nav li.fl:hover li a { color: #333 !important; }
  body.ui-7:not(.cv-1) .menu-pc li.active a { color: var(--ui-nav-active-text) !important; }
}
body.ui-7:not(.cv-1) .title, body.ui-7:not(.cv-1) .title-bor, body.ui-7:not(.cv-1) .title-r { background: var(--ui-primary-dark) !important; color: #fff; }
body.ui-7:not(.cv-1) .title-r a, body.ui-7:not(.cv-1) .title-a { color: var(--ui-accent) !important; }
body.ui-7:not(.cv-1) a { color: var(--ui-link); }
body.ui-7:not(.cv-1) a.clred, body.ui-7:not(.cv-1) .clred { color: var(--ui-db) !important; }
body.ui-7:not(.cv-1) .box { border-radius: var(--ui-radius); border: 1px solid var(--ui-border); overflow: hidden; }
body.ui-7:not(.cv-1) footer { background: var(--ui-footer-bg); border-top: 3px solid var(--ui-primary); }
body.ui-7:not(.cv-1) { background: var(--ui-bg); font-family: var(--ui-font); }
body.ui-7:not(.cv-1) .navbar-toggle { border-color: var(--ui-primary) !important; }
body.ui-7:not(.cv-1) .navbar-toggle .icon-bar { background: var(--ui-primary) !important; }

/* cv-2: sidebar bên trái */
@media (min-width: 901px) {
  body.ui-7.cv-2 .col2 { display: flex; gap: 16px; align-items: flex-start; }
  body.ui-7.cv-2 .col-l { order: 2; float: none; width: auto; flex: 1 1 auto; }
  body.ui-7.cv-2 .col-r { order: 1; float: none; width: 320px; flex: 0 0 320px; }
  /* cv-3: menu viên thuốc căn giữa */
  body.ui-7.cv-3 .menu-pc { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
  body.ui-7.cv-3 .menu-pc li.fl:not(.menu-header) { float: none; }
  body.ui-7.cv-3 .menu-pc li.menu-header { display: none; }
  body.ui-7.cv-3 .menu-pc li a { border-radius: 18px; }
  /* cv-6: menu căn giữa */
  body.ui-7.cv-6 .menu-pc { display: flex; justify-content: center; }
  body.ui-7.cv-6 .menu-pc li.fl:not(.menu-header) { float: none; }
  body.ui-7.cv-6 .menu-pc li.menu-header { display: none; }
}
/* cv-4: góc vuông, viền đậm */
body.ui-7.cv-4 .box { border-width: 2px; border-radius: 0; }
body.ui-7.cv-4 nav { border-radius: 0; }
/* cv-5: bảng kết quả sọc */
body.ui-7.cv-5 .kqmb tbody tr:nth-child(even) td, body.ui-7.cv-5 .colgiai tbody tr:nth-child(even) td { background: var(--ui-stripe); }
/* cv-7: header căn giữa */
body.ui-7.cv-7 header .main { text-align: center; }
body.ui-7.cv-7 .txt-logo.fl { float: none; display: inline-block; }
body.ui-7.cv-7 header h1.txt-top { text-align: center; }
/* cv-8: giải ĐB cỡ lớn */
body.ui-7.cv-8 .kqmb .v-gdb, body.ui-7.cv-8 .kqmb .giaidb { font-size: 38px !important; }

/* Màu chữ: link trong menu & tiêu đề không bị ghi đè bởi màu link chung */
@media (min-width: 901px) {
  body.ui-7:not(.cv-1) nav a, body.ui-7:not(.cv-1) nav li.fl a { color: var(--ui-nav-text); }
  body.ui-7:not(.cv-1) .menu-pc li.active a, body.ui-7:not(.cv-1) nav li.fl.active a { color: var(--ui-nav-active-text) !important; }
}
body.ui-7:not(.cv-1) .title a, body.ui-7:not(.cv-1) .title-bor a, body.ui-7:not(.cv-1) .title-r a { color: var(--ui-accent) !important; }

/* Mobile (áp dụng cho cả cv-1 lẫn cv-2..8): sửa chữ trắng trên nền trắng ở drawer & bỏ thanh cuộn ngang */
@media (max-width: 900px) {
  html:has(body.ui-7), body.ui-7 { overflow-x: hidden !important; max-width: 100% !important; }
  body.ui-7 header .main { padding: 4px 10px !important; }
  body.ui-7 .ui-hdr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  body.ui-7 .txt-logo { float: none !important; display: inline-flex !important; align-items: center; }
  body.ui-7 .txt-logo-text { font-size: 20px !important; line-height: 1.2 !important; white-space: nowrap; }
  body.ui-7 .navbar-toggle { display: block !important; position: static !important; margin: 0 0 0 auto !important; flex: none; border-radius: 5px; padding: 7px 9px !important; }
  body.ui-7 .col-l, body.ui-7 .col-r, body.ui-7 .box { max-width: 100%; box-sizing: border-box; }
  body.ui-7 .menu-mobi { scrollbar-width: none; -ms-overflow-style: none; padding: 0 6px !important; overflow-x: auto !important; white-space: nowrap; }
  body.ui-7 .menu-mobi::-webkit-scrollbar { display: none; }
  body.ui-7 .menu-mobi li { float: none !important; height: auto !important; line-height: normal !important; padding: 4px 2px !important; margin: 0 !important; }
  body.ui-7 .menu-mobi li a { color: var(--ui-nav-text, #ffffff) !important; font-weight: 700 !important; font-size: 13px !important; line-height: 30px !important; padding: 0 9px !important; border-radius: 4px; white-space: nowrap; background: transparent !important; }
  body.ui-7 .menu-mobi li.active { background: transparent !important; }
  body.ui-7 .menu-mobi li.active a { background: var(--ui-nav-active-bg, #fbefca) !important; color: var(--ui-nav-active-text, #d32f2f) !important; }

  body.ui-7 #list-cate { padding: 0 0 28px !important; background: #ffffff !important; }
  body.ui-7 #list-cate li.menu-header { display: block !important; float: none !important; width: 100% !important; height: auto !important; line-height: normal !important; padding: 12px 14px !important; background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; }
  body.ui-7 #list-cate li.menu-header .txt-logo { float: none !important; }
  body.ui-7 #list-cate li.menu-header .txt-logo-text { color: var(--ui-primary, #ea730b) !important; font-size: 19px !important; }
  body.ui-7 #list-cate li.fl:not(.menu-header) { float: none !important; display: block !important; width: 100% !important; height: auto !important; min-height: 42px; line-height: normal !important; position: relative !important; border-bottom: 1px solid #eef2f7 !important; background: #ffffff !important; padding: 0 !important; }
  body.ui-7 #list-cate li.fl:not(.menu-header):hover { background: #f8fafc !important; }
  body.ui-7 #list-cate li.fl.active { background: #fffbeb !important; height: auto !important; }
  body.ui-7 #list-cate li.fl:not(.menu-header) > a { display: block !important; height: auto !important; line-height: 22px !important; padding: 10px 44px 10px 14px !important; color: #1e293b !important; font-size: 13.5px !important; font-weight: 700 !important; text-transform: uppercase; background: transparent !important; border-radius: 0 !important; white-space: normal !important; }
  body.ui-7 #list-cate li.fl.active > a { color: var(--ui-primary, #ea730b) !important; background: transparent !important; }
  body.ui-7 #list-cate li:hover > .child-menu { display: none; }
  body.ui-7 #list-cate ol.child-menu { position: static !important; top: auto !important; left: auto !important; width: 100% !important; float: none !important; clear: both !important; border: none !important; border-top: 1px solid #e2e8f0 !important; box-shadow: none !important; background: #f8fafc !important; padding: 4px 0 !important; margin: 0 !important; }
  body.ui-7 #list-cate ol.child-menu li { float: none !important; display: block !important; width: 100% !important; height: auto !important; line-height: normal !important; padding: 0 !important; border-bottom: 1px dashed #e2e8f0 !important; }
  body.ui-7 #list-cate ol.child-menu li:last-child { border-bottom: none !important; }
  body.ui-7 #list-cate ol.child-menu li a { display: block !important; height: auto !important; line-height: 20px !important; padding: 8px 14px 8px 26px !important; color: #334155 !important; font-size: 13px !important; font-weight: 600 !important; text-transform: none !important; }
  body.ui-7 #list-cate .ic-drop { display: block !important; position: absolute !important; top: 0 !important; right: 0 !important; width: 42px !important; height: 42px !important; background-position: center center !important; z-index: 2; cursor: pointer; }
}
