/* AppVault Theme CSS v1.0 — dev.com.vn */

/* ══════════════════════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════════════════════ */
.av-topbar {
  background: rgba(255,255,255,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--av-card-border);
  position: sticky; top: 0; z-index: 1000;
  height: var(--av-topbar-h);
  box-shadow: 0 1px 12px rgba(91,78,255,0.06);
}
.av-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px;
}

.av-topbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.av-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--av-primary), #a084ff);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff;
}
.av-logo-text { font-size: 20px; font-weight: 800; color: var(--av-text); }
.av-logo-text span { color: var(--av-primary); }

/* ── NAV LIST ── */
.av-topbar-nav { flex: 1; display: flex; justify-content: center; }
.av-nav-list { list-style: none; display: flex; gap: 2px; align-items: center; }
.av-menu-item { position: relative; }
.av-menu-link {
  display: flex; align-items: center; gap: 5px;
  color: var(--av-text-muted); padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer;
}
.av-menu-link:hover { color: var(--av-primary); background: var(--av-primary-light); }
.av-menu-item.active > .av-menu-link { color: var(--av-primary); background: var(--av-primary-light); font-weight: 600; }
.av-menu-arrow { font-size: 10px; transition: transform 0.25s; }
.av-menu-item:hover > .av-menu-link .av-menu-arrow { transform: rotate(180deg); }

/* ── DROPDOWN (level 1) ── */
.av-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  min-width: 200px; background: #fff; border: 1.5px solid var(--av-card-border);
  border-radius: var(--av-radius); box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 6px; list-style: none; z-index: 500;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(-50%) translateY(8px);
}
.av-menu-item:hover > .av-dropdown-menu {
  opacity: 1; pointer-events: all; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.av-dropdown-menu .av-menu-link {
  border-radius: 8px; padding: 9px 14px; width: 100%; font-size: 13px;
  white-space: nowrap;
}
/* Depth 2 (level 2 sub-menu) opens to the right */
.av-dropdown-menu .av-dropdown-menu {
  top: 0; left: 100%; transform: translateX(4px);
}
.av-dropdown-menu .av-menu-item:hover > .av-dropdown-menu {
  transform: translateX(4px) translateY(0);
}

/* ── TOPBAR SEARCH ── */
.av-topbar-search-wrap { position: relative; }
.av-topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--av-bg3); border: 1.5px solid var(--av-card-border);
  border-radius: var(--av-radius-sm); padding: 8px 14px; width: 220px; transition: all 0.3s;
}
.av-topbar-search:focus-within {
  border-color: var(--av-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(91,78,255,0.1); width: 260px;
}
.av-topbar-search input { background: transparent; border: none; outline: none; color: var(--av-text); font-size: 14px; width: 100%; }
.av-topbar-search kbd { font-size: 10px; color: var(--av-text-dim); background: var(--av-bg3); padding: 2px 7px; border-radius: 5px; border: 1px solid var(--av-card-border); flex-shrink: 0; }

/* ── TOPBAR ACTIONS ── */
.av-topbar-actions { display: flex; align-items: center; gap: 10px; }
.av-btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px; border: 1.5px solid var(--av-card-border);
  background: #fff; color: var(--av-text); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.av-btn-ghost:hover { border-color: var(--av-primary); color: var(--av-primary); background: var(--av-primary-light); }

/* Hamburger */
.av-mobile-menu-btn {
  display: none; flex-direction: column; justify-content: space-around;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 6px;
}
.av-mobile-menu-btn span {
  display: block; height: 2px; background: var(--av-text); border-radius: 2px; transition: all 0.3s;
}

/* ══════════════════════════════════════════════════════════
   MOBILE DRAWER
══════════════════════════════════════════════════════════ */
.av-mobile-drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: 300px; z-index: 400;
  background: #fff; box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(-100%); transition: transform 0.3s ease; overflow-y: auto;
  padding-bottom: 80px;
}
.av-mobile-drawer.open { transform: translateX(0); }
.av-mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--av-card-border);
}
.av-mobile-drawer-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--av-text-dim); }
.av-mobile-search { padding: 14px 20px; border-bottom: 1px solid var(--av-bg3); }
.av-mobile-search form { display: flex; gap: 8px; }
.av-mobile-search input { flex: 1; padding: 8px 12px; border: 1.5px solid var(--av-card-border); border-radius: 8px; font-size: 14px; }
.av-mobile-search button { padding: 8px 14px; background: var(--av-primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.av-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 399; display: none; }

/* Mobile nav list */
.av-mobile-nav-list { list-style: none; padding: 8px 0; }
.av-mobile-nav-list .av-menu-item { border-bottom: 1px solid var(--av-bg3); }
.av-mobile-nav-list .av-menu-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 20px; color: var(--av-text); font-size: 14px; font-weight: 500;
  border-radius: 0;
}
.av-mobile-nav-list .av-menu-link:hover { background: var(--av-primary-light); color: var(--av-primary); }
.av-mobile-nav-list .av-menu-item.active > .av-menu-link { color: var(--av-primary); background: var(--av-primary-light); }
.av-mobile-nav-list .av-dropdown-menu {
  position: static; opacity: 1; visibility: visible; pointer-events: all;
  transform: none; box-shadow: none; border: none; border-radius: 0;
  padding: 0 0 0 20px; display: none; background: var(--av-bg3);
}
.av-mobile-nav-list .av-menu-item.open > .av-dropdown-menu { display: block; }
.av-mobile-nav-list .av-dropdown-menu .av-menu-link { padding: 10px 20px; font-size: 13px; }
.av-mobile-nav-list .av-menu-arrow { transition: transform 0.3s; }
.av-mobile-nav-list .av-menu-item.open > .av-menu-link .av-menu-arrow { transform: rotate(180deg); }

/* ══════════════════════════════════════════════════════════
   FLOAT CHAT BUTTON
══════════════════════════════════════════════════════════ */
.av-float-chat {
  position: fixed; bottom: 88px; right: 20px; z-index: 200;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #0068FF, #0091FF);
  color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,104,255,0.35); transition: transform 0.2s;
}
.av-float-chat:hover { transform: scale(1.1); color: #fff; }
@media (max-width: 480px) { .av-float-chat { bottom: 76px; } }

/* ══════════════════════════════════════════════════════════
   WORDPRESS POST STYLES
══════════════════════════════════════════════════════════ */
.av-wp-post-header { margin-bottom: 28px; }
.av-wp-featured-img { margin-bottom: 20px; border-radius: var(--av-radius); overflow: hidden; }
.av-wp-featured-img img { width: 100%; height: auto; display: block; }
.av-wp-post-title { font-size: 30px; font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
.av-wp-post-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--av-text-muted); }
.av-wp-post-meta span { display: flex; align-items: center; gap: 5px; }
.av-wp-post-meta i { color: var(--av-text-dim); }
.av-wp-post-content { font-size: 15px; line-height: 1.8; color: var(--av-text); }
.av-wp-post-content p { margin-bottom: 16px; }
.av-wp-post-content h2 { font-size: 22px; font-weight: 700; margin: 28px 0 12px; }
.av-wp-post-content h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.av-wp-post-content ul, .av-wp-post-content ol { padding-left: 24px; margin-bottom: 16px; }
.av-wp-post-content li { margin-bottom: 6px; }
.av-wp-post-content img { border-radius: 8px; max-width: 100%; }
.av-wp-post-content blockquote { border-left: 4px solid var(--av-primary); padding: 12px 20px; background: var(--av-primary-light); border-radius: 0 8px 8px 0; margin: 20px 0; }
.av-wp-post-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--av-card-border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }

/* ══════════════════════════════════════════════════════════
   TOPBAR RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .av-topbar-nav { display: none; }
  .av-topbar-search-wrap { display: none; }
  .av-mobile-menu-btn { display: flex; }
  .av-topbar-actions .av-btn-ghost { display: none; }
}
@media (max-width: 480px) {
  .av-topbar-inner { padding: 0 16px; }
  .av-topbar-actions .av-btn-primary { padding: 7px 14px; font-size: 13px; }
}

/* ── Updated footer overrides ── */
/* Remove old footer from main.css scope, theme handles layout */
footer.av-footer { margin: 0; }

/* Ensure no underline on footer nav links */
.av-footer-col a,
.av-footer-bottom a,
.av-footer-logo,
.av-footer-socials a { text-decoration: none !important; }


/* Site Identity logo support */
.av-logo-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.av-logo-img {
  display: block;
  max-width: 180px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.av-footer-logo-img {
  display: block;
  max-width: 190px;
  max-height: 54px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.av-topbar-logo .av-logo-image + .av-logo-text,
.av-footer-logo .av-logo-image + span {
  margin-left: 0;
}
.av-float-chat { display: none !important; }

@media (max-width: 480px) {
  .av-logo-img { max-width: 138px; max-height: 36px; }
  .av-footer-logo-img { max-width: 160px; max-height: 48px; }
}
