/* ============================================================
   DENTAIX — Mobile sidebar + hamburger
   ============================================================ */

/* ── Sexy hamburger button (mobile + tablet only) ───────── */
.dx-hamburger {
  position: relative;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0088ff 0%, #3d5ef5 100%) !important;
  box-shadow:
    0 4px 16px rgba(0, 136, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  flex-shrink: 0 !important;
}

/* Desktop: hide hamburger — full nav shows instead */
@media (min-width: 992px) {
  .th-header .dx-hamburger,
  .th-header .th-menu-toggle.dx-hamburger {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
}

/* Mobile + tablet: show hamburger */
@media (max-width: 991.98px) {
  .th-header .dx-hamburger,
  .th-header .th-menu-toggle.dx-hamburger {
    display: inline-flex !important;
    visibility: visible !important;
  }
}

.dx-hamburger:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 6px 22px rgba(0, 136, 255, 0.45) !important;
}

.dx-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

html[data-theme='dark'] .dx-hamburger {
  background: linear-gradient(135deg, #1a6fd4 0%, #456ff8 100%) !important;
  box-shadow: 0 4px 20px rgba(69, 111, 248, 0.4) !important;
}

/* ── Sidebar overlay ─────────────────────────────────────── */
.th-menu-wrapper.dx-mobile-sidebar {
  background: rgba(6, 14, 40, 0.55) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.35s ease, visibility 0.35s ease !important;
}

.th-menu-wrapper.dx-mobile-sidebar .th-menu-area {
  width: min(88vw, 320px) !important;
  max-width: 320px !important;
  height: 100% !important;
  left: auto !important;
  right: -110% !important;
  border-right: none !important;
  border-left: none !important;
  border-radius: 24px 0 0 24px !important;
  background: linear-gradient(165deg, #0a1628 0%, #0d1f3c 45%, #091428 100%) !important;
  box-shadow:
    -12px 0 48px rgba(0, 0, 0, 0.45),
    inset 1px 0 0 rgba(69, 111, 248, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
  padding: 0 !important;
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0.35s ease !important;
  overflow: hidden;
}

.th-menu-wrapper.dx-mobile-sidebar.th-body-visible .th-menu-area {
  left: auto !important;
  right: 0 !important;
}

/* Accent glow line */
.th-menu-wrapper.dx-mobile-sidebar .th-menu-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #52b4ff, #456ff8, #38bdf8);
  z-index: 2;
  pointer-events: none;
}

/* ── Sidebar header ──────────────────────────────────────── */
.dx-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.th-menu-wrapper.dx-mobile-sidebar .mobile-logo {
  padding: 0 !important;
  background: transparent !important;
  text-align: left !important;
  display: block !important;
}

.th-menu-wrapper.dx-mobile-sidebar .mobile-logo img.dx-logo {
  height: 44px !important;
  max-height: 44px !important;
  width: auto !important;
  border-radius: 6px;
}

.dx-sidebar-close {
  position: static !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  font-size: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
  flex-shrink: 0;
}

.dx-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  transform: rotate(90deg);
}

/* Hide old floating close button position */
.th-menu-wrapper.dx-mobile-sidebar > .th-menu-area > .th-menu-toggle:not(.dx-sidebar-close) {
  display: none !important;
}

/* ── Nav links ───────────────────────────────────────────── */
.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  margin-top: 0 !important;
  padding: 12px 16px 16px 20px !important;
  max-height: none !important;
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul {
  padding: 0 !important;
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li {
  border: none !important;
  margin-bottom: 6px;
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: rgba(235, 242, 255, 0.92) !important;
  background: transparent !important;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li a::before {
  display: none !important;
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li a:hover,
.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li a:focus {
  background: rgba(69, 111, 248, 0.18) !important;
  color: #fff !important;
  transform: translateX(4px);
}

.th-menu-wrapper.dx-mobile-sidebar .th-mobile-menu ul li a i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  color: #52b4ff;
  opacity: 0.9;
}

/* ── Sidebar footer CTA ──────────────────────────────────── */
.dx-sidebar-footer {
  padding: 16px 20px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.dx-sidebar-cta {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  padding: 14px 20px !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #0088ff, #456ff8) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 136, 255, 0.35) !important;
  text-decoration: none !important;
}

.dx-sidebar-cta:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 136, 255, 0.45) !important;
}

/* Light theme sidebar — same dark drawer for contrast */
html[data-theme='light'] .th-menu-wrapper.dx-mobile-sidebar .th-menu-area,
html:not([data-theme]) .th-menu-wrapper.dx-mobile-sidebar .th-menu-area {
  background: linear-gradient(165deg, #0a1628 0%, #0d1f3c 45%, #091428 100%) !important;
}

/* Logo on light header — no black badge box */
img.dx-logo.dx-logo-light {
  border-radius: 0;
}

img.dx-logo.dx-logo-dark {
  border-radius: 6px;
}

@media (max-width: 575px) {
  .th-menu-wrapper.dx-mobile-sidebar .th-menu-area {
    width: min(92vw, 300px) !important;
    border-radius: 20px 0 0 20px !important;
  }

  .dx-hamburger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
}

/* Body lock when menu open */
body.th-body-visible {
  overflow: hidden !important;
}

/* Mobile header: logo left, theme switch + hamburger right (theme NOT in drawer) */
@media (max-width: 991.98px) {
  .th-header.header-layout2 .header-logo {
    flex: 0 0 auto !important;
  }

  .th-header.header-layout2 .col-auto:last-child {
    margin-left: auto !important;
  }

  .th-header.header-layout2 .header-button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .th-header .dx-header-theme-btn,
  .th-header .header-button .dx-theme-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    pointer-events: auto !important;
    z-index: 2;
  }
}
