/* =========================================================
   MOBILE PRESENTATION SUITE (DOCK, ROTATE, SLIDE DRAWER)
   Khusus Tampilan Smartphone & Tablet
========================================================= */

@media (max-width: 1024px), (pointer: coarse) {
  /* Floating Mobile Dock */
  .mobile-dock {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-dock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .mobile-dock-btn:active {
    transform: scale(0.94);
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
  }

  .mobile-dock-btn.rotate-btn {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.9), rgba(13, 148, 136, 0.9));
    border-color: rgba(52, 211, 153, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  }

  .mobile-dock-btn.slide-select-btn {
    background: rgba(255, 255, 255, 0.12);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #a7f3d0;
  }

  .mobile-dock-btn.nav-btn {
    width: 36px;
    padding: 0;
  }

  .mobile-dock-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.4;
  }

  /* Smart Orientation Hint */
  .mobile-rotate-hint {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(6, 78, 59, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 9999px;
    color: #ecfdf5;
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 99998;
    pointer-events: none;
    animation: hintPulse 2.4s ease-in-out infinite alternate;
  }

  @keyframes hintPulse {
    0% { opacity: 0.85; transform: translateX(-50%) translateY(0); }
    100% { opacity: 1; transform: translateX(-50%) translateY(-2px); }
  }

  @media (orientation: landscape) {
    .mobile-rotate-hint {
      display: none !important;
    }
  }

  /* Virtual Force-Landscape Mode */
  body.virtual-landscape {
    overflow: hidden !important;
    position: fixed !important;
    width: 100vh !important;
    height: 100vw !important;
    top: 0 !important;
    left: 100vw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
  }

  body.virtual-landscape .mobile-rotate-hint {
    display: none !important;
  }

  body.virtual-landscape .mobile-dock {
    bottom: 12px;
  }

  /* Slide Drawer Sheet */
  .slide-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .slide-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .slide-drawer-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 82vh;
    background: #0f172a;
    border-top: 1.5px solid rgba(52, 211, 153, 0.3);
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  }

  .slide-drawer-overlay.active .slide-drawer-panel {
    transform: translateY(0);
  }

  .slide-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .slide-drawer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .slide-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .slide-drawer-close:active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
  }

  .slide-drawer-list {
    overflow-y: auto;
    padding: 12px 16px 28px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .slide-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .slide-drawer-item:active, .slide-drawer-item.current {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
  }

  .slide-drawer-item.current {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
  }

  .slide-drawer-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }

  .slide-drawer-item.current .slide-drawer-num {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
  }

  .slide-drawer-name {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slide-drawer-item.current .slide-drawer-name {
    color: #6ee7b7;
    font-weight: 700;
  }
}

/* Hide mobile dock on standard desktop viewports (> 1024px with mouse pointer) */
@media (min-width: 1025px) and (pointer: fine) {
  .mobile-dock, .mobile-rotate-hint, .slide-drawer-overlay {
    display: none !important;
  }
}
