/* X40B 22/11: the "Live" and "Đá gà" lobby pages (static/js/bob_lobby.js). Same file in public/web/static/css and
   public/m/static/css; every rule under .bl / .bl-view / .bl-modal-back / the two menu hooks; colours only from the X16 / X36
   tokens of eagle_theme.css (night = navy + champagne, day = the light set), so both themes follow the switch. */
.bl, .bl *, .bl-modal-back, .bl-modal-back * { box-sizing: border-box; }
.bl [hidden], .bl-modal-back [hidden] { display: none !important; }

/* ---- the admin "show menu" switch (bob_lobby.js sets html[data-lobby-off]) */
html[data-lobby-off~="live"] [data-lobby-menu="live"], html[data-lobby-off~="daga"] [data-lobby-menu="daga"] { display: none !important; }

/* ---- frames */
.bl-view-pc { background: var(--eg-bg); min-height: 640px; }
.bl-view-wap { width: 100%; min-height: 100vh; background: var(--eg-bg); }
.bl { color: var(--eg-text); font-family: var(--eg-font, inherit); font-size: 15px; line-height: 1.4; text-align: left; }
.bl button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bl button:focus-visible, .bl-modal-back button:focus-visible { outline: 2px solid var(--eg-gold); outline-offset: 2px; }
.bl.bl-pc { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; padding: 22px 0 56px; }
.bl.bl-wap { padding: 10px 10px 40px; font-size: 14px; }

/* ---- category row: small round icons */
.bl-cats { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; min-height: 92px; }
.bl-cats::-webkit-scrollbar { display: none; }
.bl-cat { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; padding: 0; border: 0; background: none; color: var(--eg-text-2); font-size: 13px; font-weight: 600; }
.bl-cat-ic { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--eg-surface-2); border: 1px solid var(--eg-line-2); box-shadow: var(--eg-shadow-s); transition: border-color var(--eg-t), box-shadow var(--eg-t), transform var(--eg-t) var(--eg-ease); }
.bl-cat-ic img { width: 30px; height: 30px; object-fit: contain; }
.bl-cat-t { white-space: nowrap; line-height: 1.2; }
.bl-cat:hover .bl-cat-ic { border-color: var(--eg-gold-line); transform: translateY(-2px); }
.bl-cat.on { color: var(--eg-gold); }
.bl-cat.on .bl-cat-ic { border-color: var(--eg-gold); box-shadow: var(--eg-glow); background: var(--eg-gold-bg); }

/* ---- title + sort */
.bl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; min-height: 36px; }
.bl-title { margin: 0; font-size: 22px; font-weight: 800; color: var(--eg-text); letter-spacing: .2px; }
.bl-title::before { content: ""; display: inline-block; width: 4px; height: 20px; margin-right: 10px; vertical-align: -3px; border-radius: 2px; background: var(--eg-gold-grad); }
.bl-sort { display: flex; align-items: center; gap: 6px; }
.bl-sort-l { color: var(--eg-text-3); font-size: 13px; margin-right: 2px; }
.bl-sort-b { border: 1px solid var(--eg-line-2); background: var(--eg-surface); color: var(--eg-text-2); border-radius: var(--eg-r-pill); padding: 5px 14px; font-size: 13px; font-weight: 600; }
.bl-sort-b:hover { border-color: var(--eg-gold-line); color: var(--eg-text); }
.bl-sort-b.on { background: var(--eg-gold-grad); border-color: var(--eg-gold); color: var(--eg-on-gold); }

/* ---- hall logo strip ("Tất cả" first) */
.bl-halls { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; min-height: 70px; }
.bl-halls::-webkit-scrollbar { display: none; }
.bl-hall { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 148px; height: 54px; padding: 6px 12px; border-radius: var(--eg-r);
  border: 1px solid var(--eg-line-2); background: var(--eg-surface); color: var(--eg-text-2); font-size: 14px; font-weight: 700; transition: border-color var(--eg-t), background var(--eg-t); }
.bl-hall img { max-width: 120px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
.bl-hall-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-hall-all { width: 96px; }
.bl-hall:hover { border-color: var(--eg-gold-line); }
.bl-hall.on { border-color: var(--eg-gold); background: var(--eg-gold-bg); color: var(--eg-gold); box-shadow: var(--eg-glow); }

/* ---- tile grid: PC 6 columns (5 under 1200 px), tablet 4 / 3, phone 2; 3:4 tiles */
.bl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1199px) { .bl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .bl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 767px)  { .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 599px)  { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.bl-tile { min-width: 0; }
.bl-tile-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--eg-line); border-radius: var(--eg-r); overflow: hidden; background: var(--eg-surface);
  color: inherit; text-align: left; box-shadow: var(--eg-shadow-s); transform: translateZ(0);
  transition: transform var(--eg-t) var(--eg-ease), box-shadow var(--eg-t) var(--eg-ease), border-color var(--eg-t); }
.bl-thumb, .bl-modal-art { position: relative; width: 100%; padding-top: 133.333%; overflow: hidden; background: var(--eg-img-bg); }
.bl-thumb img, .bl-modal-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease, transform .4s var(--eg-ease); }
.bl-thumb.is-in img, .bl-modal-art.is-in img { opacity: 1; }
.bl-thumb::after, .bl-modal-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }
.bl-thumb-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-weight: 800; font-size: 16px; color: var(--eg-gold);
  background: radial-gradient(circle at 50% 35%, var(--eg-gold-bg), transparent 70%); }
.bl-badge { position: absolute; z-index: 2; top: 8px; right: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .5px; line-height: 18px; }
.bl-badge-hot { background: #c8332b; color: #fff; }
.bl-badge-new { background: var(--eg-gold-grad); color: var(--eg-on-gold); }
.bl-players { position: absolute; z-index: 2; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--eg-r-pill);
  background: rgba(6, 10, 22, .66); color: #f3f5fa; font-size: 12px; line-height: 18px; white-space: nowrap; }
.bl-players b { font-weight: 700; color: #fff; }
.bl-players-ic { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3fd28b; box-shadow: 0 0 0 2px rgba(63, 210, 139, .25); }
.bl-play { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -40%); opacity: 0; padding: 8px 26px; border-radius: var(--eg-r-pill);
  background: var(--eg-gold-grad); color: var(--eg-on-gold); font-weight: 800; font-size: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: opacity var(--eg-t), transform var(--eg-t) var(--eg-ease); pointer-events: none; }
.bl-meta { padding: 8px 10px 10px; min-height: 56px; }
.bl-name { font-weight: 700; font-size: 14px; color: var(--eg-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-hallname { margin-top: 2px; font-size: 12px; color: var(--eg-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* PC: hover lift + "Chơi" */
@media (hover: hover) and (pointer: fine) {
  .bl-tile-btn:hover { transform: translateY(-4px); box-shadow: var(--eg-shadow); border-color: var(--eg-gold-line); }
  .bl-tile-btn:hover .bl-thumb img { transform: scale(1.04); }
  .bl-tile-btn:hover .bl-play, .bl-tile-btn:focus-visible .bl-play { opacity: 1; transform: translate(-50%, -50%); }
}
.bl-tile-btn:focus-visible { outline: 2px solid var(--eg-gold); outline-offset: 2px; }
.bl-tile-btn:active { transform: scale(.985); }
.bl-wap .bl-meta { padding: 6px 8px 8px; min-height: 50px; }
.bl-wap .bl-name { font-size: 13px; }
.bl-wap .bl-title { font-size: 18px; }
.bl-wap .bl-cats { gap: 6px; min-height: 84px; }
.bl-wap .bl-cat { width: 66px; font-size: 12px; }
.bl-wap .bl-cat-ic { width: 50px; height: 50px; }
.bl-wap .bl-hall { width: 124px; height: 48px; }
.bl-wap .bl-hall-all { width: 80px; }
.bl-wap .bl-hall img { max-width: 104px; max-height: 34px; }
.bl-wap .bl-halls { min-height: 62px; }

/* ---- skeleton (the page keeps its size while the answer and the pictures come) */
@keyframes bl-shine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.bl-sk .bl-thumb, .bl-thumb:not(.is-in):not(.is-err), .bl-sk.bl-hall, .bl-sk .bl-cat-ic, .bl-sk .bl-name, .bl-sk .bl-hallname, .bl-modal-art:not(.is-in):not(.is-err) {
  background-image: linear-gradient(90deg, var(--eg-surface-2) 0%, var(--eg-raise) 50%, var(--eg-surface-2) 100%); background-size: 200% 100%; animation: bl-shine 1.4s linear infinite; }
.bl-sk .bl-name, .bl-sk .bl-hallname { border-radius: 4px; color: transparent; }
.bl-sk .bl-name { width: 70%; } .bl-sk .bl-hallname { width: 45%; }
.bl-sk.bl-tile { pointer-events: none; border-radius: var(--eg-r); overflow: hidden; border: 1px solid var(--eg-line); background: var(--eg-surface); }
.bl-sk.bl-cat { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .bl *, .bl-modal-back * { animation: none !important; transition: none !important; } }

/* ---- empty / closed / error state */
.bl-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 16px; border: 1px dashed var(--eg-line-2); border-radius: var(--eg-r-l); background: var(--eg-surface); text-align: center; }
.bl-empty-ic { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--eg-gold-line); position: relative; }
.bl-empty-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 3px; margin: -1.5px 0 0 -11px; background: var(--eg-gold); border-radius: 2px; }
.bl-empty-t { margin: 0; color: var(--eg-text-2); font-size: 15px; }
.bl-btn { border: 0; border-radius: var(--eg-r-pill); padding: 9px 26px; background: var(--eg-gold-grad); color: var(--eg-on-gold); font-weight: 800; font-size: 14px; cursor: pointer; }
.bl-btn:hover { filter: brightness(1.06); }

/* ---- popup */
html.bl-modal-open, html.bl-modal-open body { overflow: hidden !important; }
.bl-modal-back { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--eg-overlay);
  animation: bl-fade .18s ease; font-family: var(--eg-font, inherit); text-align: left; }
@keyframes bl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bl-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bl-modal { position: relative; display: flex; width: 640px; max-width: 100%; border-radius: var(--eg-r-l); overflow: hidden; background: var(--eg-surface); color: var(--eg-text);
  border: 1px solid var(--eg-gold-line); box-shadow: var(--eg-shadow-xl); animation: bl-pop .22s var(--eg-ease); }
.bl-modal-art { flex: 0 0 220px; width: 220px; padding-top: 0; min-height: 293px; }
.bl-modal-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 28px 26px 24px; }
.bl-modal-game { font-size: 21px; font-weight: 800; color: var(--eg-text); line-height: 1.25; padding-right: 26px; }
.bl-modal-hall { font-size: 14px; color: var(--eg-gold); font-weight: 700; }
.bl-modal-state { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 6px; padding: 6px 12px; border-radius: var(--eg-r-pill);
  background: var(--eg-st-wait-bg); border: 1px solid var(--eg-st-wait-line); color: var(--eg-st-wait); font-weight: 700; font-size: 14px; }
.bl-modal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--eg-st-wait); flex: 0 0 auto; }
.bl-modal-text { margin: 4px 0 10px; color: var(--eg-text-2); font-size: 14px; line-height: 1.5; }
.bl-modal-ok { align-self: flex-start; }
.bl-x { position: absolute; z-index: 3; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--eg-line-2); background: var(--eg-bar);
  color: var(--eg-text); font-size: 22px; line-height: 30px; text-align: center; cursor: pointer; padding: 0; }
.bl-x:hover { border-color: var(--eg-gold); color: var(--eg-gold); }
@media (max-width: 599px) {
  .bl-modal-back { align-items: flex-end; padding: 0; }
  .bl-modal { flex-direction: column; width: 100%; border-radius: var(--eg-r-l) var(--eg-r-l) 0 0; }
  .bl-modal-art { flex: 0 0 auto; width: 100%; min-height: 0; height: 180px; }
  .bl-modal-art img { object-position: 50% 22%; }
  .bl-modal-body { padding: 18px 18px 22px; }
  .bl-modal-game { font-size: 19px; }
  .bl-modal-ok { align-self: stretch; text-align: center; padding: 12px; }
}

/* ---- toast (an active tile that could not start) */
.bl-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: 90vw; z-index: 3100; padding: 10px 16px; border-radius: 12px;
  background: var(--eg-gold); color: var(--eg-on-gold); font-weight: 700; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }

/* ---- WAP home menu entries (catalogTabs, bob_lobby.js wapTabs) and the WAP nav bar of the pages */
ul.catalogTabs i.catalogTabIcon.bl-tab-ic--live { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M5.5 3h9a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-9a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm4.5 4.3c-1.3 1.7-3.3 2.9-3.3 4.6 0 1.1.8 1.8 1.8 1.8.5 0 .9-.2 1.1-.5l-.5 2.1h1.8l-.5-2.1c.3.3.7.5 1.1.5 1 0 1.8-.7 1.8-1.8 0-1.7-2-2.9-3.3-4.6zM18.5 7a5 5 0 0 1 0 10v-1.7a3.3 3.3 0 0 0 0-6.6zm0 2.8a2.2 2.2 0 0 1 0 4.4z'/%3E%3C/svg%3E"); }
ul.catalogTabs i.catalogTabIcon.bl-tab-ic--daga { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.6 2.5c.7 0 1.3.4 1.5 1 .4-.4 1-.6 1.6-.4.7.3 1 1 .8 1.7l-.3.7c1 .6 1.6 1.7 1.6 2.9 0 .4-.1.9-.2 1.3l2.5-1.5c.4-2.2 1.7-4 3.5-4.6-.6 1.4-.5 3 .1 4.4.6 1.4.4 3-.3 4.3-1.3 2.6-4.2 4.2-7 4.2l.5 2h-1.6l-.5-2-.6.1.4 1.9H9l-.5-2.3c-2.1-.9-3.6-3-3.6-5.4 0-1.5.5-2.9 1.4-4L3.6 8.6l2.2-1.7C6 4.6 7.2 2.5 8.6 2.5zm.6 3.3a.9.9 0 1 0 0 1.8.9.9 0 0 0 0-1.8z'/%3E%3C/svg%3E"); }
.bl-view-wap .bl-navbar { background-color: var(--eg-bg-2, #ede9e7) !important; }
