/* ==========================================================
   CLOUDX HỌC 247 UI - HEADER v1.11.0
   Desktop 1 tầng; mobile theo bố cục Udemy.
========================================================== */

.cloudx-flic-ui-active .site-header:not(.cflic-header),
.cloudx-flic-ui-active #masthead:not(.cflic-header),
.cloudx-flic-ui-active .ast-mobile-header-wrap {
  display: none !important;
}

.cflic-header {
  position: relative;
  z-index: 99990;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #172033;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cflic-headerbar {
  background: #ffffff;
  border-bottom: 1px solid #e7e9ed;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .055);
}

.cflic-header .cflic-container {
  width: min(1620px, calc(100% - 64px));
  max-width: 1620px;
  margin: 0 auto;
}

.cflic-headerbar-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

/* Logo: dùng nguyên Site Logo của WordPress, không recolor/filter. */
.cflic-brand {
  flex: 0 0 auto;
  min-width: 155px;
  margin-right: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
}

.cflic-brand .custom-logo-link,
.cflic-brand > a {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
}

.cflic-brand img,
.cflic-brand .custom-logo {
  display: block;
  width: auto;
  max-width: 178px;
  max-height: 52px;
  object-fit: contain;
  filter: none !important;
  transform: none !important;
}

.cflic-brand-text {
  color: #1d4f91;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  text-decoration: none !important;
}

.cflic-navigation {
  flex: 0 0 auto;
  min-width: 0;
}

.cflic-nav-menu,
.cflic-nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cflic-nav-menu {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: var(--cflic-menu-item-gap, 10px);
  min-width: 0;
}

.cflic-nav-menu > li {
  position: relative;
  flex: 0 0 auto;
}

.cflic-nav-menu > li > a,
.cflic-nav-menu > li > .menu-link {
  min-height: 66px;
  padding: 0 var(--cflic-menu-item-pad, 7px);
  display: flex;
  align-items: center;
  color: #161b22 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  font-size: 15.5px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
  box-sizing: border-box;
  transition: color .16s ease, box-shadow .16s ease;
}

.cflic-nav-menu > li:hover > a,
.cflic-nav-menu > li.current-menu-item > a,
.cflic-nav-menu > li.current-menu-ancestor > a,
.cflic-nav-menu > li.flic-mega:focus-within > a {
  color: #355d8a !important;
  background: transparent !important;
  box-shadow: inset 0 -2px 0 #4f7198;
}

.cflic-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 235px;
  background: #fff;
  border: 1px solid #dde1e6;
  border-radius: 0 !important;
  box-shadow: 0 14px 30px rgba(31, 45, 61, .13);
  z-index: 999999;
}

.cflic-nav-menu li:hover > .sub-menu,
.cflic-nav-menu li:focus-within > .sub-menu { display: block; }

.cflic-nav-menu .sub-menu a {
  display: block;
  padding: 11px 15px;
  border-bottom: 1px solid #eef0f3;
  color: #252a31 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
}

.cflic-nav-menu .sub-menu li:last-child > a { border-bottom: 0; }
.cflic-nav-menu .sub-menu a:hover { color: #355d8a !important; background: #f5f7fa; }

.cflic-header-search-wrap {
  flex: 1 1 240px;
  min-width: 170px;
  max-width: 440px;
  width: auto;
  margin-left: var(--cflic-nav-search-gap, 17px);
}

.cflic-search-header {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfd5dd;
  border-radius: 6px;
}

.cflic-search-header:focus-within {
  border-color: #0092e8;
  box-shadow: 0 0 0 3px rgba(0, 146, 232, .12);
}

.cflic-search-header input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 14px !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #202832;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
}

.cflic-search-header input::placeholder { color: #8b95a2; font-weight: 400; }

.cflic-search-header button {
  flex: 0 0 46px;
  width: 46px;
  height: 100%;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-left: 1px solid #0085d4 !important;
  border-radius: 0 !important;
  background: #0092e8 !important;
  color: #fff;
  cursor: pointer;
  transition: background .16s ease;
}

.cflic-search-header button:hover,
.cflic-search-header button:focus { background: #0081cc !important; color: #fff; }
.cflic-search-header button svg { width: 18px; height: 18px; display: block; }

.cflic-actions {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cflic-cart,
.cflic-account {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #243246 !important;
  text-decoration: none !important;
  border: 1px solid #d9dee5;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(30, 43, 57, .06);
  transition: box-shadow .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.cflic-cart {
  position: relative;
  width: 46px;
  color: #0092e8 !important;
}

.cflic-cart:hover,
.cflic-cart:focus {
  color: #0081cc !important;
  border-color: #0092e8;
  box-shadow: 0 5px 14px rgba(0, 146, 232, .15);
  transform: translateY(-1px);
}

.cflic-account:hover {
  color: #355d8a !important;
  border-color: #c4ccd6;
  box-shadow: 0 5px 14px rgba(30, 43, 57, .10);
  transform: translateY(-1px);
}

.cflic-cart-icon,
.cflic-account-icon { display: inline-flex; align-items: center; justify-content: center; }
.cflic-cart-icon svg { width: 20px; height: 20px; display: block; }

.cflic-cart-count {
  position: absolute;
  top: -8px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0092e8;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cflic-account-wrap { display: inline-flex; align-items: center; }
.cflic-account {
  gap: 8px;
  min-width: 118px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.cflic-account-text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cflic-account-icon svg { width: 17px; height: 17px; display: block; }

/* Mobile-only controls are enabled in responsive.css. */
.cflic-mobile-toggle,
.cflic-mobile-quick-actions,
.cflic-mobile-search-popover,
.cflic-mobile-overlay,
.cflic-mobile-panel { display: none; }


/* ============================================================
   HOC247 v1.12.0 - Minimal learning/account UX
   ============================================================ */
.cflic-learn-now {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 102px;
  padding: 0 14px;
  color: #fff !important;
  text-decoration: none !important;
  border: 1px solid #0092e8;
  border-radius: 7px;
  background: #0092e8;
  box-shadow: 0 3px 10px rgba(0, 146, 232, .18);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cflic-learn-now:hover,
.cflic-learn-now:focus {
  color: #fff !important;
  background: #0081cc;
  border-color: #0081cc;
  box-shadow: 0 5px 14px rgba(0, 146, 232, .24);
  transform: translateY(-1px);
}
.cflic-learn-now-icon { display:inline-flex; align-items:center; justify-content:center; }
.cflic-learn-now-icon svg { width:18px; height:18px; display:block; }

.cflic-account-member { position:relative; }
.cflic-account-avatar,
.cflic-account-menu-avatar {
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#eef3f8;
  color:#456382;
  font-weight:700;
  line-height:1;
  text-transform:uppercase;
}
.cflic-account-avatar { width:27px; height:27px; font-size:11px; }
.cflic-account-chevron { display:inline-flex; width:15px; height:15px; flex:0 0 auto; transition:transform .16s ease; }
.cflic-account-chevron svg { width:15px; height:15px; display:block; }
.cflic-account-member:hover .cflic-account-chevron,
.cflic-account-member:focus-within .cflic-account-chevron { transform:rotate(180deg); }

.cflic-account-menu {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:100000;
  width:340px;
  padding:10px;
  border:1px solid #dfe5ec;
  border-radius:12px;
  background:#fff;
  box-shadow:0 16px 42px rgba(26,39,55,.16);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-5px);
  transition:opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.cflic-account-menu::before { content:""; position:absolute; left:0; right:0; top:-11px; height:12px; }
.cflic-account-member:hover .cflic-account-menu,
.cflic-account-member:focus-within .cflic-account-menu {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.cflic-account-menu-profile { display:flex; align-items:center; gap:10px; padding:8px 8px 10px; }
.cflic-account-menu-avatar { width:38px; height:38px; font-size:13px; }
.cflic-account-menu-identity { min-width:0; display:flex; flex-direction:column; gap:3px; }
.cflic-account-menu-identity strong { color:#182638; font-size:14px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
.cflic-account-menu-identity span { color:#6b7788; font-size:12px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
.cflic-account-menu-separator { height:1px; margin:6px 2px; background:#edf0f4; }
.cflic-account-menu > a {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:8px 10px;
  border-radius:8px;
  color:#253449 !important;
  text-decoration:none !important;
  font-size:14px;
  font-weight:500;
}
.cflic-account-menu > a:hover,
.cflic-account-menu > a:focus { background:#f4f7fa; color:#456382 !important; }
.cflic-account-menu > a.cflic-account-menu-logout { color:#b42318 !important; }
.cflic-account-menu > a.cflic-account-menu-logout:hover,
.cflic-account-menu > a.cflic-account-menu-logout:focus { background:#fff4f2; }

/* v1.13.3 - Tài khoản desktop: ưu tiên hiển thị đầy đủ họ tên. */
.cflic-account-member .cflic-account {
  min-width:160px;
  max-width:300px;
  padding:0 12px;
}
.cflic-account-member .cflic-account-text {
  min-width:0;
  max-width:235px;
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
}
