/* HocLaiXeSG — header + dock toàn màn hình dùng chung
   Áp dụng: index, on-luyen, thanh-tich, tai-khoan. KHÔNG đụng thi.html khi đang thi. */

:root {
  --ry-red: #c75b4e;
  --ry-red-dark: #b14a3f;
  --primary-dark: #b14a3f;
  --primary-gradient: linear-gradient(180deg, #d9897e 0%, #c75b4e 100%);
}

.app-header {
  background: var(--primary-gradient);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(177, 74, 63, 0.22);
}
.app-header a { text-decoration: none; color: inherit; }
.app-header .header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  min-height: 64px;
}
.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}
.app-logo-icon {
  background: #fff;
  color: var(--ry-red-dark);
  font-weight: 900;
  font-size: 0.72rem;
  padding: 5px 8px;
  border-radius: 8px;
  letter-spacing: 0.4px;
}
.app-logo-text {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.15;
}
.app-logo-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,.86);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.header-btn {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.05rem;
}
.header-btn:hover { background: rgba(255,255,255,.28); }

.desktop-nav {
  display: none;
}
@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
  }
  .desktop-nav a {
    color: rgba(255,255,255,.92) !important;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .desktop-nav a:hover {
    background: rgba(255,255,255,.16);
    color: #fff !important;
  }
  .desktop-nav a.active {
    background: #fff;
    color: var(--ry-red-dark) !important;
  }
  nav.bottom-nav { display: none !important; }

  /* Ôn luyện: bỏ header mobile (mũi tên + chữ dính) */
  .ol-header { display: none !important; }

  .ol-search-bar {
    width: 100% !important;
    max-width: 960px !important;
    margin: 14px auto 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }
  .ol-search-input {
    width: 100% !important;
  }
  .ol-hang-bar {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
  .ol-main {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 991.98px) {
  .desktop-nav { display: none !important; }
  body.has-hlx-chrome .ol-header { display: none !important; }
}

body.has-hlx-chrome .ol-header { display: none !important; }

/* Ẩn nút đen cũ "Toàn màn hình" */
.fs-btn { display: none !important; }

/* Dock: Trang chủ xanh + nút icon — hover hiện chữ */
.hlx-fs-dock {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hlx-fs-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  background: #16a34a;
  color: #fff !important;
  font-weight: 800;
  font-size: 15px;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(22,163,74,.28);
}
.hlx-fs-home:hover { background: #15803d; color: #fff !important; }

.hlx-fs-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(15,23,42,.12);
  color: #111;
}
.hlx-fs-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
}
.hlx-fs-tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s;
}
.hlx-fs-btn:hover .hlx-fs-tip,
.hlx-fs-btn:focus .hlx-fs-tip {
  opacity: 1;
  transform: translateY(0);
}

body.exam-active .hlx-fs-dock,
body.practice-active .hlx-fs-dock,
.ol-practice-screen.active ~ .hlx-fs-dock {
  display: none !important;
}

/* Trang chủ: không hiện nút Trang chủ. Desktop ẩn FAB Zalo/gọi. */
body.page-index .hlx-fs-home { display: none !important; }

@media (min-width: 992px) {
  .floating-action-menu,
  .fab-3d-btn,
  .hv-fab,
  #button-widget,
  .zalo-chat-widget,
  iframe[src*="zalo"] {
    display: none !important;
  }

  .hlx-fs-dock {
    right: 20px;
    bottom: 24px;
    z-index: 60;
  }

  body.page-index .main-content,
  body.page-index .content-wrapper {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

html:fullscreen body.page-index .main-content,
html:fullscreen body.page-index .content-wrapper,
:-webkit-full-screen body.page-index .main-content {
  max-width: 1180px !important;
}
html:fullscreen .floating-action-menu,
:-webkit-full-screen .floating-action-menu {
  display: none !important;
}


/* Ôn luyện mobile: header site không đè hàng số 1–15 */
body.practice-active .app-header,
body.practice-active #hlxAppHeader {
  display: none !important;
}
.ol-practice-screen.active {
  z-index: 2000 !important;
}
@media (max-width: 991.98px) {
  .ol-prac-matrix,
  #olPracMatrixBar {
    height: 56px !important;
    min-height: 56px !important;
  }
  .ol-prac-matrix-grid {
    grid-template-rows: repeat(2, 24px) !important;
  }
}
