/**
 * ============================================================================
 * MOBILE DRAWER NAVIGATION STYLES — FIKI ARDIANSYAH PERSONAL BRAND
 * ============================================================================
 * Desain: Slide-in Drawer Metalik dari Samping dengan Backdrop Glassmorphic Blur
 * Aksen: Precision Metallic Red & Hairline Titanium Borders
 * Aksesibilitas: Keyboard Tab Trapping, ESC key dismissal, WCAG AA touch targets
 */

/* 1. Backdrop Overlay Gelap Blur Metalik */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-drawer, 200);
  background: rgba(10, 11, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base, 250ms) cubic-bezier(0.16, 1, 0.3, 1),
              visibility var(--transition-base, 250ms);
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 2. Panel Drawer Slide-In Metalik */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  height: 100vh;
  max-height: -webkit-fill-available;
  z-index: calc(var(--z-drawer, 200) + 1);
  background: var(--surface-card, #151820);
  border-left: 1px solid var(--border-medium, rgba(255, 255, 255, 0.16));
  box-shadow: -12px 0 36px -4px rgba(0, 0, 0, 0.85),
              inset 1px 0 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--transition-slow, 400ms) cubic-bezier(0.16, 1, 0.3, 1),
              visibility var(--transition-slow, 400ms);
  will-change: transform;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* 3. Header Drawer: Brand Identitas & Tombol Tutup */
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  height: var(--navbar-height, 72px);
  min-height: var(--navbar-height, 72px);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.mobile-drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  color: var(--text-primary, #f5f6f8);
  text-decoration: none;
}

.mobile-drawer-brand .brand-monogram-wrapper {
  width: 32px;
  height: 32px;
}

.mobile-drawer-brand .brand-monogram-svg {
  width: 18px;
  height: 18px;
}

.mobile-drawer-brand .brand-wordmark {
  font-size: var(--text-sm, 0.875rem);
  letter-spacing: 0.06em;
}

.mobile-drawer-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--surface-card, #151820);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-md, 8px);
  color: var(--text-secondary, #9da3b0);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast, 150ms);
}

.mobile-drawer-close-btn:hover {
  border-color: var(--red-badge-border, rgba(230, 46, 61, 0.32));
  color: var(--red-hover, #ff3b4b);
  box-shadow: 0 0 14px -2px var(--red-glow, rgba(230, 46, 61, 0.28));
  background: var(--surface-card-hover, #1c202a);
}

.mobile-drawer-close-btn:focus-visible {
  outline: 2px solid var(--red-hover, #ff3b4b);
  outline-offset: 3px;
}

.mobile-drawer-close-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

/* 4. Konten Navigasi Drawer Vertikal */
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-6, 1.5rem) var(--space-4, 1rem);
  gap: var(--space-2, 0.5rem);
  flex: 1;
}

.mobile-drawer-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  font-family: var(--font-sans, sans-serif);
  font-size: var(--text-base, 1rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--text-secondary, #9da3b0);
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
  border-left: 3px solid transparent;
  background: transparent;
  transition: all var(--transition-fast, 150ms);
}

.mobile-drawer-link:hover {
  color: var(--text-primary, #f5f6f8);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--red-hover, #ff3b4b);
  padding-left: calc(var(--space-4, 1rem) + 4px);
}

.mobile-drawer-link.active {
  color: var(--text-primary, #f5f6f8);
  font-weight: var(--font-weight-semibold, 600);
  background: var(--red-badge-bg, rgba(230, 46, 61, 0.09));
  border-left-color: var(--red-primary, #e62e3d);
  box-shadow: inset 1px 0 0 var(--red-primary, #e62e3d);
}

.mobile-drawer-link:focus-visible {
  outline: 2px solid var(--red-hover, #ff3b4b);
  outline-offset: 2px;
}

/* 5. Footer Drawer: Metadata Singkat */
.mobile-drawer-footer {
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #676e7d);
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs, 0.75rem);
  letter-spacing: 0.04em;
  text-align: center;
}

/* 6. Disembunyikan Total di Resolusi Layar Lebar (Desktop >= 768px) */
@media (min-width: 768px) {
  .mobile-drawer-backdrop,
  .mobile-drawer {
    display: none !important;
  }
}
