/* ==========================================================================
   Polat Emence Core — Mobil Bottom Navbar (Faz 4, v1.2.0)
   Amethyst token'ları; light/dark otomatik; >=922px gizli; safe-area destekli.
   ========================================================================== */

.pm-mnav { display: none; }

@media (max-width: 921px) {
  html {
    scroll-padding-bottom: calc(max(60px, calc(4rem - 12px)) + env(safe-area-inset-bottom, 0px) + 12px);
  }
  /* --- Bar --- */
  .pm-mnav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9990;
    height: calc(max(60px, calc(4rem - 12px)) + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--pm-surface);
    border-top: 1px solid var(--pm-border);
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  /* --- Öğeler --- */
  .pm-mnav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 0 2px;
    text-decoration: none;
    color: var(--pm-muted);
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  .pm-mnav-item svg { width: 20px; height: 20px; display: block; }
  .pm-mnav-label {
    font-family: var(--pm-font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  /* --- Aktif sekme: renk + ağırlık + üst gösterge (renge güvenmiyoruz) --- */
  .pm-mnav-item.is-active { color: var(--pm-accent); }
  .pm-mnav-item.is-active .pm-mnav-label { font-weight: 700; }
  .pm-mnav-item.is-active::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--pm-accent);
  }

  /* --- CV merkez butonu: accent dolgu, dengeli (44px dokunma alanı) --- */
  .pm-mnav-item.pm-mnav-cv {
    align-self: center;
    margin: 8px 6px;
    min-height: 0;
    height: 44px;
    border-radius: 999px;
    background: var(--pm-accent);
    color: var(--pm-on-accent);
    flex-direction: row;
    gap: 7px;
    transition: background-color 0.2s ease;
  }
  .pm-mnav-item.pm-mnav-cv svg { width: 17px; height: 17px; }
  .pm-mnav-item.pm-mnav-cv .pm-mnav-label { font-weight: 600; }
  .pm-mnav-item.pm-mnav-cv.is-active { color: var(--pm-on-accent); }
  .pm-mnav-item.pm-mnav-cv.is-active::before { display: none; }
  .pm-mnav-item.pm-mnav-cv:hover,
  .pm-mnav-item.pm-mnav-cv:focus-visible { background: var(--pm-accent-hover); }

  /* --- Odak (focus-visible) --- */
  .pm-mnav-item:focus-visible {
    outline: 2px solid var(--pm-accent);
    outline-offset: -3px;
    border-radius: 10px;
  }

  /* --- İçerik navbar altında kalmasın: tam navbar yüksekliği kadar --- */
  body { padding-bottom: calc(max(60px, calc(4rem - 12px)) + env(safe-area-inset-bottom, 0px)); }
  #content :is(a, button, input, textarea, select):focus { scroll-margin-block: 12px; }

  /* --- Hamburger ve off-canvas menü gizli (masaüstü etkilenmez) --- */
  .ast-mobile-header-wrap .main-header-menu-toggle,
  .ast-mobile-header-wrap button.menu-toggle,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle {
    display: none !important;
  }
  .ast-mobile-popup-drawer { display: none !important; }
}

@media (min-width: 922px) {
  .pm-mnav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-mnav, .pm-mnav-item, .pm-mnav-item.pm-mnav-cv { transition: none; }
}
