/* ==========================================================================
   Vietnam Post header  —  isolated layer
   Tách riêng khỏi style.css để không phải đánh nhau với 132 dòng patch cuối file.
   Mọi selector đều scope dưới .vp-header / .mobile-nav-drawer.
   ========================================================================== */

:root {
  --vp-orange: #f9a81a;
  --vp-orange-deep: #e0900a;
  --vp-navy: #1d376d;
  --vp-ink: #444444;
  --vp-ink-soft: #5b5b5b;
  --vp-yellow: #ffc600;
  --vp-line: #ececec;
  --vp-header-h: 92px;
}

/* ---------- shell ---------- */
.vp-header {
  position: relative;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid var(--vp-line);
  font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.vp-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1280px;
  min-height: var(--vp-header-h);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

/* ---------- logo ---------- */
.vp-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  line-height: 0;
}
.vp-logo img {
  display: block;
  width: 86px;
  height: auto;
}

/* ---------- primary nav ---------- */
.vp-primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.1vw, 19px);
  flex: 0 0 auto;
}
.vp-primary-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--vp-ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.vp-primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--vp-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.vp-primary-nav a:hover,
.vp-primary-nav a:focus-visible { color: #111; }
.vp-primary-nav a:hover::after,
.vp-primary-nav a:focus-visible::after,
.vp-primary-nav a.is-active::after { transform: scaleX(1); }
.vp-primary-nav a.is-active { color: #111; }

/* ---------- utility nav ---------- */
.vp-utility-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 0.9vw, 14px);
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
}
.vp-utility-nav > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px;
  color: var(--vp-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.vp-utility-nav > a:hover,
.vp-utility-nav > a:focus-visible { color: #111; }

.vp-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--vp-orange);
  font-size: 17px;
  line-height: 1;
}

/* ---------- tools: search + flag + menu ---------- */
.vp-header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.vp-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--vp-yellow);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.vp-search-btn:hover { background: #f0b900; }
.vp-search-btn:active { transform: scale(.96); }
.vp-search-btn[aria-expanded="true"] { background: #f0b900; }

.vp-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  line-height: 0;
  text-decoration: none;
}
.vp-lang-btn img {
  display: block;
  width: 40px;
  height: 27px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.vp-lang-btn:hover { background: #f4f4f4; }

.vp-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #173b4d;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}

/* ---------- search panel ---------- */
.vp-search-panel {
  border-top: 1px solid var(--vp-line);
  background: #fff;
  box-shadow: 0 12px 24px -18px rgba(7,59,76,.5);
}
.vp-search-panel[hidden] { display: none; }

.vp-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 32px);
}
.vp-search-form > i {
  color: var(--vp-orange);
  font-size: 17px;
  flex: 0 0 auto;
}
.vp-search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  color: var(--vp-ink);
  font: inherit;
  font-size: 15px;
}
.vp-search-form input[type="search"]:focus {
  outline: 0;
  border-color: var(--vp-orange);
  box-shadow: 0 0 0 3px rgba(249,168,26,.18);
}
.vp-search-form button[type="submit"] {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--vp-yellow);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.vp-search-form button[type="submit"]:hover { background: #f0b900; }

.vp-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f4f4f4;
  color: var(--vp-ink);
  font-size: 16px;
  cursor: pointer;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .vp-utility-nav > a .vp-util-label { display: none; }
  .vp-utility-nav { gap: 14px; }
  .vp-utility-nav > a { padding: 6px; }
  .vp-ico { width: 22px; height: 22px; font-size: 21px; }
}

@media (max-width: 900px) {
  :root { --vp-header-h: 72px; }
  .vp-header-inner { gap: 16px; }
  .vp-primary-nav { display: none; }
  .vp-utility-nav { display: none; }
  /* utility nav is gone, so it can no longer push the tools right */
  .vp-header-tools { margin-left: auto; }
  .vp-menu-btn { display: inline-flex; }
  .vp-logo img { width: 74px; }
}

@media (max-width: 420px) {
  .vp-header-inner { gap: 10px; padding: 0 14px; }
  .vp-logo img { width: 66px; }
  .vp-header-tools { gap: 8px; }
  .vp-search-btn { width: 36px; height: 36px; }
  .vp-lang-btn { width: 36px; height: 36px; }
  .vp-lang-btn img { width: 34px; height: 23px; }
  .vp-menu-btn { width: 38px; height: 38px; }
  .vp-search-form { flex-wrap: wrap; }
  .vp-search-form input[type="search"] { flex: 1 1 100%; order: 2; }
  .vp-search-form button[type="submit"] { order: 3; flex: 1 1 auto; }
  .vp-search-close { order: 1; margin-left: auto; }
  .vp-search-form > i { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vp-primary-nav a::after,
  .vp-search-btn,
  .vp-utility-nav > a,
  .vp-primary-nav a { transition: none !important; }
}

/* ==========================================================================
   Mobile drawer — restyled to match the Vietnam Post header.
   Scoped under #mobileNavDrawer so nothing leaks into style.css.
   ========================================================================== */

#mobileNavDrawer .mobile-drawer-header {
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--vp-line);
  border-bottom-width: 1px;
  flex: 0 0 auto;
}

#mobileNavDrawer .mobile-drawer-header img {
  display: block;
  width: 82px;
  height: auto;
  max-width: 60%;
  filter: none;
}

#mobileNavDrawer .drawer-close-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: #f4f4f4;
  color: var(--vp-ink);
  font-size: 1rem;
  border-radius: 10px;
}
#mobileNavDrawer .drawer-close-btn:hover {
  background: #eaeaea;
  color: #111;
}

#mobileNavDrawer .drawer-nav-menu {
  flex: 1 1 auto;
  padding: 18px 16px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mobileNavDrawer .drawer-section-label {
  display: block;
  margin: 0 0 8px;
  color: #9a9a9a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}
#mobileNavDrawer .drawer-section-label + .drawer-nav-list { margin-bottom: 20px; }

#mobileNavDrawer .drawer-nav-list li { margin-bottom: 2px; }

#mobileNavDrawer .drawer-nav-list li a {
  gap: 12px;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--vp-ink);
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}
#mobileNavDrawer .drawer-nav-list li a i {
  width: 20px;
  color: var(--vp-orange);
  font-size: 16px;
  text-align: center;
}
#mobileNavDrawer .drawer-nav-list li a:hover,
#mobileNavDrawer .drawer-nav-list li a:focus-visible {
  background: #fff6e4;
  color: #111;
  font-weight: 600;
}
#mobileNavDrawer .drawer-nav-list li a:hover i { color: var(--vp-orange-deep); }

#mobileNavDrawer .drawer-footer-actions {
  flex: 0 0 auto;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vp-line);
  background: #fff;
}

#mobileNavDrawer .drawer-hotline-btn {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid #ffe0b0;
  border-radius: 14px;
  background: #fff8ef;
  color: #b45309;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  justify-content: flex-start;
  gap: 12px;
  line-height: 1.35;
}
#mobileNavDrawer .drawer-hotline-btn i {
  flex: 0 0 auto;
  color: var(--vp-orange-deep);
  font-size: 19px;
}
#mobileNavDrawer .drawer-hotline-btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#mobileNavDrawer .drawer-hotline-btn strong {
  color: #8a3d00;
  font-size: 14px;
  font-weight: 800;
}
#mobileNavDrawer .drawer-hotline-btn small {
  color: #a16207;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}
#mobileNavDrawer .drawer-hotline-btn:hover { background: #fff1dd; }

/* keep the floating chat launcher clear of the drawer footer */
body.vp-drawer-open .cskh-widget-container { opacity: 0; pointer-events: none; }
