/* File: wp-content/plugins/gear-cat/assets/panel.css */

/* =======================
   Button (nếu đặt ở header)
   ======================= */
.gcm-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #296fff;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 3px 14px;
  font-weight: 400;
  cursor: pointer;
  margin-right: 0;
  text-transform: math-auto;
}
.gcm-btn:hover {
  opacity: 0.95;
}

/* =======================
   Overlay + Panel
   ======================= */
.gcm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10040;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.gcm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gcm-panel {
  position: fixed;
  top: var(--gcm-top, 100px);
  left: var(--gcm-left, 145px);
  width: 231px;
  background: #fff;
  border: 1px solid #e8e8e8;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  /* QUAN TRỌNG: cho flyout tràn khỏi panel */
  overflow: visible;
  z-index: 10050;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  transition: top 0.25s ease, left 0.25s ease;
}
.gcm-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header panel */
.gcm-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 700;
}
.gcm-close {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Thân panel: chính nó mới scroll */
.gcm-body {
  max-height: calc(100vh - 110px);
}

/* =======================
   List
   ======================= */
.gcm-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gcm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 4.6px 10px;
  color: #222;
  text-decoration: none;
}

/* trạng thái bình thường */
.gcm-level-1 > li > .gcm-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  line-height: 1.4;
  overflow: visible; /* để tam giác vượt ra ngoài */
}

/* HOVER = dải đỏ có đuôi nhọn */
.gcm-level-1 > li:hover > .gcm-item {
  background: #ff7001; /* đỏ chủ đạo của bạn */
  color: #fff;
}

/* tam giác nhọn bên phải */
.gcm-level-1 > li:hover > .gcm-item::after {
  content: "";
  position: absolute;
  right: -12px; /* đưa ra ngoài để tạo đuôi */
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 12px solid #ff7001; /* cùng màu nền */
  z-index: 99999;
  background: transparent;
}

/* dấu › ở mép phải */
.gcm-level-1 > li:hover > .gcm-item::before {
  content: "\203A"; /* ký tự › */
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: currentColor; /* trắng theo màu chữ */
}

/* nếu icon là SVG, cho nó nhận màu chữ */
.gcm-level-1 > li > .gcm-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor; /* hoặc stroke: currentColor; tùy SVG */
}

.gcm-level-1 > li:hover > .gcm-item img {
  filter: brightness(0) invert(1) !important;
}

.gcm-text {
  font-size: 13px;
  font-weight: 400;
  flex: 1;
}
.gcm-ic {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.gcm-caret {
  opacity: 0.45;
}

/* =======================
   Flyout / Mega
   ======================= */
/* .gcm-node {
  position: relative;
} */

/* Mega luôn căn đỉnh theo danh sách (top:0) */
.gcm-flyout {
  display: none;
  position: absolute;
  top: -1px;
  left: 103%;
  width: var(--gcm-width, 1120px);
  max-height: var(--gcm-height, 520px);
  min-height: var(--gcm-height, 520px);
  height: 100%;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  /* padding: 0px 16px 0px 16px; */
  gap: 16px;
  z-index: 10060; /* nổi lên trên banner/chat */
}

.gcm-flyout p {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 400;
}

.gcm-flyout .row {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 3 cột tuỳ chọn (nếu dùng ảnh trái/phải) */
.gcm-flyout .gcm-left,
.gcm-flyout .gcm-right {
  align-self: stretch;
}
.gcm-flyout .gcm-mid {
  min-height: var(--gcm-height, 520px);
}

.gcm-flyout .gcm-mid p {
  font-size: 13px;
  margin-bottom: 0;
}

.gcm-flyout img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Trigger hover / click */
.gcm-node.gcm-trigger-hover:hover > .gcm-flyout {
  display: flex;
}
.gcm-node.gcm-trigger-click > .gcm-item {
  cursor: pointer;
}
.gcm-node.gcm-open > .gcm-flyout {
  display: flex;
}

.gcm-node {
  margin: 0 !important;
}

/* =======================
   Sidebar cứng
   ======================= */
.gcm-sidebar {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  width: 231px;
  overflow: visible; /* KHÔNG cắt flyout */
  position: relative;
  z-index: 10050; /* tạo stacking context đúng */
}
.gcm-sb-head {
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.gcm-sb-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gcm-sidebar .gcm-level-1 > li {
  margin: 0;
}

/* Nếu muốn level-2 kiểu cổ điển trong sidebar (không dùng UX Block) */
.gcm-sidebar .gcm-level-2 {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 260px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.gcm-sidebar .gcm-level-1 > li:hover > .gcm-level-2 {
  display: block;
}

/* =======================
   Responsiveness
   ======================= */
@media (max-width: 991px) {
  .gcm-panel {
    left: 0;
    right: 0;
    width: auto;
    border-radius: 0;
    top: 60px;
  }
  .gcm-level-2,
  .gcm-sidebar .gcm-level-2 {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
  }
  .gcm-sidebar {
    width: 100%;
  }
}

/* =======================
   Bổ sung: tránh bị cắt bởi .row/.col của Flatsome
   (nếu layout khu vực menu đang dùng các class này)
   ======================= */
.row,
.col {
  overflow: visible;
}

.gcm-flyout .ux-menu-link {
  height: 26px !important;
}

.gcm-flyout .link-active .ux-menu-link__text {
  color: var(--main-color);
  font-weight: 600;
  font-size: 13px;
}
.link-active .ux-menu-link__text {
  color: red;
  font-weight: 600;
}

.link-active .ux-menu-link__link {
  justify-content: space-between;
}

.off-canvas-left.mfp-ready .mfp-content {
  background-color: white;
}
/* File: wp-content/plugins/gear-cat/assets/panel.css */
/* =============== Mobile menu shortcode =============== */
/* =======================
   Mobile menu shortcode
   ======================= */
.gcm-mobile-menu {
  border-radius: 0;
  border: 1px solid #f0f0f0;
  background: #fff;
  overflow: hidden;
}

/* Hàng CHA */
.gcm-m-item + .gcm-m-item {
  border-top: 1px solid #f2f2f2;
}

.gcm-m-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0px;
  padding: 12px 16px 12px 20px;
  background: #fff;
  border: 0;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.gcm-m-toggle.gcm-m-linkonly {
  text-decoration: none;
}

.gcm-m-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.gcm-m-text {
  flex: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Panel con (mega cho mobile) */
.gcm-m-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 0 0 0;
}

.gcm-m-item.is-open .gcm-m-panel {
  padding: 6px 0 10px 0;
}

/* Caret chung */
.gcm-m-caret {
  display: inline-block;
  font-size: 13px;
  transition: transform 0.25s ease;
}

/* Xoay caret của MỤC CHA khi mở */
.gcm-m-item.is-open > .gcm-m-toggle .gcm-m-caret {
  transform: rotate(180deg);
}

/* =======================
   Bên trong UX Block trên MOBILE
   ======================= */
@media (max-width: 991px) {
  .nav-sidebar .html_top_right_text {
    padding: 0px !important;
  }

  .gcm-mobile-menu {
    width: 100%;
  }

  /* Mỗi cột trong mega */
  .gcm-mobile-menu .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .gcm-mobile-menu .col-inner {
    padding-right: 0px !important;
    padding-bottom: 0px !important;
    padding-top: 0px !important;
  }

  .gcm-mobile-menu .col-inner .row .col {
    padding-right: 0px !important;
    padding-bottom: 0px !important;
  }

  .gcm-mobile-menu .ux-menu {
    padding: 0;
    background: transparent;
  }

  /* Tiêu đề nhóm (link-active) – đỏ, in hoa */
  .gcm-mobile-menu .ux-menu-link.link-active .ux-menu-link__text {
    display: block;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .gcm-mobile-menu .ux-menu-link.link-active {
    cursor: pointer;
  }

  /* Ẩn item con mặc định */
  .gcm-mobile-menu .ux-menu-link:not(.link-active) {
    display: none;
  }

  /* Khi nhóm mở -> hiện item con */
  .gcm-mobile-menu .ux-menu.is-open .ux-menu-link:not(.link-active) {
    display: flex;
  }

  .gcm-mobile-menu .ux-menu.is-open .ux-menu-link.link-active .gcm-m-caret {
    transform: rotate(180deg);
  }

  /* Dòng con – có chấm tròn như bullet */
  .gcm-mobile-menu .ux-menu-link:not(.link-active) {
    position: relative;
    padding: 4px 0 4px 30px;
    font-size: 13px;
  }

  .gcm-mobile-menu .ux-menu-link:not(.link-active)::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    border: 1px solid #111;
    margin-left: 10px !important;
  }

  .gcm-mobile-menu .ux-menu-link__text {
    color: #111;
  }
}