/* ==========================================================================
   drawer-mobile.css
   Menu Mobile Drawer — Standalone, override semua konflik
   ========================================================================== */

/* Sembunyikan social icons lama */
.menu-drawer .mobile-social-icons {
  display: none !important;
}

/* ============================================================
   PANEL DRAWER
   ============================================================ */
.menu-drawer {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  width: 300px !important;
  height: 100dvh !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12) !important;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 10001 !important;
  border-radius: 0 20px 20px 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.menu-drawer.is-active {
  left: 0 !important;
  visibility: visible !important;
}

body.dark-mode .menu-drawer {
  background: #0f172a !important;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================================
   HEADER PANEL (Logo & Tombol Tutup)
   ============================================================ */
.drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important; /* Memisahkan logo (kiri) & tombol (kanan) */
  padding: 20px 20px 15px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
}

body.dark-mode .drawer-header {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

.drawer-logo .custom-logo {
  max-width: 170px !important; /* Logo diperbesar agar proporsional */
  height: auto !important;
  display: block !important;
}

/* Tombol close dipaksa ke ujung kanan */
.menu-drawer .menu-close-btn {
  margin-left: auto !important; /* Memaksa elemen ke kanan dalam flexbox */
  width: 32px !important;
  height: 32px !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important; /* Ikon X mepet ke kanan */
  padding: 0 !important;
  transition: color 0.2s ease !important;
}

.menu-drawer .menu-close-btn:hover {
  color: #ef4444 !important; /* Berubah merah saat hover */
}

body.dark-mode .menu-drawer .menu-close-btn {
  color: #94a3b8 !important;
}

/* ============================================================
   BODY (SCROLLABLE)
   ============================================================ */
.drawer-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 6px 0 12px !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.drawer-section {
  padding: 2px 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.drawer-section-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  color: #9ca3af !important;
  padding: 10px 18px 4px !important;
  margin: 0 !important;
  display: block !important;
}

body.dark-mode .drawer-section-label {
  color: #64748b !important;
}

.drawer-divider {
  height: 1px !important;
  background: #e5e7eb !important;
  margin: 6px 18px !important;
  display: block !important;
}

body.dark-mode .drawer-divider {
  background: #1e293b !important;
}

/* ============================================================
   NAV ITEMS
   ============================================================ */
.drawer-nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 10px 18px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: background 0.15s ease !important;
  text-align: left !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.dark-mode .drawer-nav-item {
  color: #e2e8f0 !important;
}

.drawer-nav-item:hover {
  background: #eff6ff !important;
  color: #0056b3 !important;
  text-decoration: none !important;
}

body.dark-mode .drawer-nav-item:hover {
  background: rgba(79, 156, 249, 0.1) !important;
  color: #4a9eff !important;
}

/* Ikon kotak */
.drawer-nav-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #0056b3 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.dark-mode .drawer-nav-icon {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #4a9eff !important;
}

.drawer-nav-item:hover .drawer-nav-icon {
  background: #0056b3 !important;
  border-color: #0056b3 !important;
  color: #fff !important;
}

.drawer-nav-label {
  flex: 1 !important;
  display: block !important;
}

.drawer-nav-arrow {
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease !important;
}

.drawer-nav-item:hover .drawer-nav-arrow {
  opacity: 1 !important;
}

/* Chevron kategori */
.drawer-chevron {
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  transition: transform 0.25s ease !important;
  flex-shrink: 0 !important;
}

.drawer-cat-toggle[aria-expanded="true"] .drawer-chevron {
  transform: rotate(180deg) !important;
}

.drawer-cat-toggle[aria-expanded="true"] {
  color: #0056b3 !important;
  background: #eff6ff !important;
}

body.dark-mode .drawer-cat-toggle[aria-expanded="true"] {
  color: #4a9eff !important;
  background: rgba(79, 156, 249, 0.1) !important;
}

/* ============================================================
   DROPDOWN KATEGORI
   ============================================================ */
.drawer-cat-dropdown {
  overflow: hidden !important;
  max-height: 0 !important;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: block !important;
}

.drawer-cat-dropdown.is-open {
  max-height: 1000px !important;
}

.drawer-cat-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 2px 0 8px 64px !important;
  display: block !important;
}

.drawer-cat-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 18px 8px 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

body.dark-mode .drawer-cat-item {
  color: #94a3b8 !important;
}

.drawer-cat-item:hover {
  color: #0056b3 !important;
  text-decoration: none !important;
}

body.dark-mode .drawer-cat-item:hover {
  color: #4a9eff !important;
}

.drawer-cat-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #cbd5e1 !important;
  flex-shrink: 0 !important;
}

.drawer-cat-item:hover .drawer-cat-dot {
  background: #0056b3 !important;
}

.drawer-cat-count {
  display: none !important; /* Baris ini yang akan menyembunyikan angkanya */
  margin-left: auto !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
  background: #f1f5f9 !important;
  padding: 1px 7px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
}

body.dark-mode .drawer-cat-count {
  display: none !important; /* Menyembunyikan juga di mode gelap */
  background: #1e293b !important;
}

/* ============================================================
   FOOTER SOSIAL MEDIA
   ============================================================ */
.drawer-footer {
  border-top: 1px solid #e5e7eb !important;
  padding: 14px 18px 18px !important;
  flex-shrink: 0 !important;
  background: #f8fafc !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.dark-mode .drawer-footer {
  border-top-color: #1e293b !important;
  background: #0a0f1e !important;
}

.drawer-footer-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  color: #94a3b8 !important;
  margin: 0 0 10px !important;
  display: block !important;
}

.drawer-social {
  display: flex !important;
  gap: 8px !important;
}

.drawer-social-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

body.dark-mode .drawer-social-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

.drawer-social-btn:hover {
  background: #0056b3 !important;
  border-color: #0056b3 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
}

/* ============================================================
   LOGO & TOMBOL X (MENGATASI KONFLIK RESPONSIVE.CSS)
   ============================================================ */
html body .site-header .menu-drawer .drawer-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 20px !important;
}

html body .site-header .menu-drawer .drawer-logo {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html body .site-header .menu-drawer .drawer-logo a,
html body .site-header .menu-drawer .drawer-logo img,
html body .site-header .menu-drawer .drawer-logo .custom-logo {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-width: 150px !important;
  height: auto !important;
  margin: 0 !important;
}

html body .site-header .menu-drawer .menu-close-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 40px !important;
  height: 40px !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  color: #64748b !important;
  position: static !important;
}

html body.dark-mode .site-header .menu-drawer .menu-close-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
}

/* ============================================================
   MENYEMBUNYIKAN TOC SAAT MENU MOBILE TERBUKA
   ============================================================ */
body.menu-open #mtTocMobileBtn,
body.menu-open #mtToc {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================================
   STYLING UNTUK MENU BAWAAN WORDPRESS (wp_nav_menu) DI MOBILE
   ============================================================ */

/* Paksa menu untuk tampil (mengabaikan perintah display: none lama) */
.menu-drawer .drawer-wp-menu,
.menu-drawer .drawer-wp-menu ul {
  display: block !important;
  visibility: visible !important;
}

.drawer-wp-menu {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.drawer-wp-menu li {
  border-bottom: 1px solid var(--border) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.drawer-wp-menu li:last-child {
  border-bottom: none !important;
}

.drawer-wp-menu a {
  display: block !important;
  padding: 16px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  transition:
    background 0.2s,
    color 0.2s !important;
}

.drawer-wp-menu a:hover,
.drawer-wp-menu a:focus {
  background: var(--blue-light) !important;
  color: var(--blue) !important;
}

body.dark-mode .drawer-wp-menu a {
  color: #e2e8f0 !important;
}

/* Mendukung sub-menu / dropdown bawaan WordPress di mobile jika Anda menambahkannya */
.drawer-wp-menu .sub-menu {
  list-style: none !important;
  padding: 0 0 0 15px !important;
  background: var(--bg) !important;
  border-top: 1px solid var(--border) !important;
}

.drawer-wp-menu .sub-menu a {
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

body.dark-mode .drawer-wp-menu .sub-menu {
  background: var(--surface) !important;
}
