/* === Tokens === */
:root {
  --icv-blue: #103275;
  --icv-blue-600: #0f3a8d;
  --icv-red: #e22437;
  --icv-border: #e9eef7;
  --icv-soft: #f7f9fd;
  --icv-font: system-ui, -apple-system, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

/* === Off-canvas === */
.icvmm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  z-index: 998
}

.icvmm-overlay.is-open {
  opacity: 1;
  visibility: visible
}

.icvmm-drawer.is-hidden { display: none !important; }
.icvmm-only.is-hidden { display: none !important; }


.icvmm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 88vw;
  max-width: 420px;
  background: #fff;
  transform: translateX(100%);
  transition: transform .30s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .14);
  border-left: 1px solid var(--icv-border)
}


.icvmm-drawer[aria-hidden="false"] {
  transform: translateX(0)
}

body.icvmm-no-scroll {
  overflow: hidden;
  touch-action: none
}

/* Nút Hamburger (nếu bật) */
.icvmm-trigger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid #e0e6f4;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 50, 117, .06)
}

.icvmm-trigger div {
  display: block;
  height: 2px;

  /* Background with webkit prefix (not strictly necessary, but added for completeness) */
  background: #0f3a8d !important;
  background-color: #0f3a8d !important;
  /* No -webkit prefix needed for background in modern usage */

  /* Border radius */
  -webkit-border-radius: 2px;
  border-radius: 2px;

  /* For better rendering on Safari in some edge cases (optional) */
  -webkit-transform: translateZ(0);
}

.icvmm-trigger:active {
  transform: translateY(.5px)
}

/* === Content === */
.icvmm-only,
.icvmm-only * {
  box-sizing: border-box
}

.icvmm-only {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  font-family: var(--icv-font);
  padding-top: 56px;
  text-align: left
}

.icvmm-only ul {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: initial !important
}

/* Nút X to */
.icvmm-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e0e6f4;
  background: #fff;
  color: var(--icv-red);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06)
}

.icvmm-close:active {
  transform: translateY(.5px)
}

.icvmm-nav {
  flex: 1;
  overflow: auto
}

/* Item: block để text không bẹp */
.icvmm-item {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--icv-border);
  background: #fff
}

/* Link full width, chừa chỗ mũi tên bên phải */
.icvmm-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 48px 16px 16px;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word
}

/* Icon trái */
.icvmm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px
}

.icvmm-icon svg {
  width: 20px;
  height: 20px;
  display: block
}

/* Mũi tên phải */
.icvmm-next {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e0e6f4;
  background: #fff;
  cursor: pointer
}

.icvmm-next::before {
  content: "›";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--icv-blue-600);
  font-size: 18px
}

.icvmm-item.is-open>.icvmm-next::before {
  content: "⌄"
}

/* Cấp 1: tiêu đề lớn xanh đậm */
.icvmm-list>.icvmm-item>.icvmm-link {
  color: var(--icv-blue-600);
  font-weight: 700;
	font-size: 20px;
	line-height: 36px;
}

/* Submenu accordion xổ ngay dưới */
.icvmm-item>ul[data-submenu] {
  width: 100%;
  margin: 0;
  padding: 0 0 6px 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .25s ease, opacity .2s ease
}

.icvmm-item.is-open>ul[data-submenu] {
  max-height: 1200px;
  opacity: 1
}

.icvmm-item.is-open > .sub-menu {
	max-height: 550px !important;
}

/* Cấp 2 */
.icvmm-list>.icvmm-item>ul[data-submenu]>.icvmm-item {
  padding-left: 16px !important;
}

.icvmm-list>.icvmm-item>ul[data-submenu]>.icvmm-item>.icvmm-link {
  padding: 14px 48px 14px 16px;
  color: #111;
  font-weight: 700;
  border-bottom: 1px dashed #edf2fb;
  font-size: 18px !important;
}

/* Cấp 3+ */
.icvmm-item>ul[data-submenu]>.icvmm-item>ul[data-submenu]>.icvmm-item {
  padding-left: 24px !important ;
	
}

.icvmm-item>ul[data-submenu]>.icvmm-item>ul[data-submenu]>.icvmm-item>.icvmm-link {
  padding: 12px 48px 12px 16px;
  color: #222;
  font-weight: 500
}

/* CTA (nếu có) */
.icvmm-actions {
  padding: 14px 12px 18px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--icv-border)
}

.icvmm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none
}

.icvmm-btn--primary {
  background: #0f3a8d;
  color: #fff
}

.icvmm-btn--ghost {
  background: #fff;
  border: 1px solid #d9e1f5;
  color: #0f3a8d
}

/* Touch feedback */
.icvmm-item:active {
  background: var(--icv-soft)
}

/* ==== ICV PATCH: scroll + clean artefacts (minimal) ==== */
/* 1) Cho drawer chứa nội dung, phần danh sách tự cuộn */
.icvmm-drawer {
  overflow: hidden;
  /* tránh tràn phần tử ra ngoài */
}

.icvmm-nav {
  flex: 1 1 auto;
  min-height: 0;
  /* fix flexbox không cuộn ở 1 số máy */
  overflow-y: auto;
  /* cuộn dọc trong menu */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* không kéo trang nền */
}

/* 2) Khi khóa nền, đừng chặn thao tác chạm bên trong drawer */
body.icvmm-no-scroll {
  overflow: hidden;
  touch-action: auto !important;
  /* ghi đè nếu có 'none' ở bản cũ */
}

/* 3) Ẩn toàn bộ bullet/marker/ô vuông dư thừa trong vùng menu */
.icvmm-only ul,
.icvmm-only li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.icvmm-only li::marker,
.icvmm-only li::before {
  content: none !important;
}

/* 4) Chắc chắn root ẩn hoàn toàn trước khi JS bỏ 'hidden' */
.icvmm-root[hidden] {
  display: none !important;
}

/* ==== FIX ONLY: scroll inside drawer + hide artefacts ==== */
/* Luôn nổi trên mọi thứ (che cả dot/pagination bên dưới) */
.icvmm-overlay {
  z-index: 2147483645 !important;
  background: rgba(0, 0, 0, .38) !important;
}

.icvmm-drawer {
  z-index: 2147483646 !important;
  height: 100dvh;
  /* chiều cao theo viewport động */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* tránh tràn phần tử lạ */
}

/* Khu danh sách trong menu: CHỈ nơi này được cuộn */
.icvmm-only {
  height: 100%;
}

.icvmm-nav {
  flex: 1 1 auto;
  min-height: 0;
  /* bắt buộc để flex-child cuộn */
  overflow-y: auto;
  /* bật scroll dọc */
  -webkit-overflow-scrolling: touch;
  /* mượt trên iOS */
  touch-action: pan-y;
  /* cho phép kéo dọc bên trong */
  overscroll-behavior: contain;
  /* không kéo trang nền */
}

/* Khoá nền nhưng KHÔNG khoá thao tác trong drawer */
body.icvmm-no-scroll {
  overflow: hidden;
  /* nếu bản cũ có touch-action:none thì rule dưới sẽ ghi đè */
  touch-action: auto !important;
}

/* Xoá sạch bullet/marker/ô tròn của <ul>/<li> trong off-canvas */
.icvmm-only ul,
.icvmm-only ol,
.icvmm-only li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.icvmm-only li::marker {
  content: none !important;
}

/* Root thật sự ẩn trước khi JS mở – tránh rò rỉ phần tử lạ */
.icvmm-root[hidden] {
  display: none !important;
}

/* ==== FIX ONLY: scroll inside drawer + hide artefacts ==== */
/* nổi hẳn trên nội dung nền để không lòi dot/ô tròn bên dưới */
.icvmm-overlay {
  z-index: 2147483645 !important;
  background: rgba(0, 0, 0, .38) !important;
}

.icvmm-drawer {
  z-index: 2147483646 !important;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* vùng danh sách cuộn được */
.icvmm-only {
  height: 100%;
}

.icvmm-nav {
  flex: 1 1 auto;
  min-height: 0;
  /* bắt buộc để flex child cuộn */
  overflow-y: auto;
  /* bật scroll dọc */
  -webkit-overflow-scrolling: touch;
  /* mượt trên iOS */
  touch-action: pan-y;
  /* cho phép kéo dọc */
  overscroll-behavior: contain;
  /* không kéo trang nền */
}

/* khóa nền nhưng không chặn thao tác trong drawer */
body.icvmm-no-scroll {
  overflow: hidden;
  touch-action: auto !important;
  /* ghi đè nếu có 'none' ở bản cũ */
}

/* xoá sạch bullet/marker trong off-canvas */
.icvmm-only ul,
.icvmm-only ol,
.icvmm-only li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.icvmm-only li::marker {
  content: none !important;
}

/* root ẩn hoàn toàn cho tới khi JS mở */
.icvmm-root[hidden] {
  display: none !important;
}



