/**
 * KH Core V5 — Mobil deneyim (alt menü, story continue, slider touch)
 */

@media (max-width: 1024px) {
  body.kh-mobile-v5.kh-has-bottom-nav {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ─── Alt menü V5 ─── */
  .kh-bottom-nav--v5 {
    display: flex !important;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(8, 12, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.5),
      0 0 24px rgba(0, 212, 255, 0.08);
  }

  .kh-bottom-nav--v5 .kh-bottom-nav__item,
  .kh-bottom-nav--v5 .kh-bottom-nav__item--action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 6px 4px;
    margin: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    border-radius: 14px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.25s ease;
  }

  .kh-bottom-nav__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }

  .kh-bottom-nav__active-pill {
    position: absolute;
    inset: -4px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    opacity: 0;
    transform: scale(0.6);
    transition:
      opacity 0.28s ease,
      transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
  }

  .kh-bottom-nav--v5 .kh-bottom-nav__item.is-active .kh-bottom-nav__active-pill,
  .kh-bottom-nav--v5 .kh-bottom-nav__item--action.is-active .kh-bottom-nav__active-pill,
  body.kh-mdrawer-open .kh-bottom-nav__item--action[data-kh-bottom-categories] .kh-bottom-nav__active-pill {
    opacity: 1;
    transform: scale(1);
  }

  .kh-bottom-nav--v5 .kh-bottom-nav__item.is-active,
  .kh-bottom-nav--v5 .kh-bottom-nav__item--action.is-active,
  body.kh-mdrawer-open [data-kh-bottom-categories] {
    color: #00d4ff;
  }

  .kh-bottom-nav--v5 .kh-bottom-nav__item.is-active svg,
  .kh-bottom-nav--v5 .kh-bottom-nav__item--action.is-active svg,
  body.kh-mdrawer-open [data-kh-bottom-categories] svg {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.55));
    transform: translateY(-2px);
    transition: transform 0.25s ease, filter 0.25s ease;
  }

  .kh-bottom-nav__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    max-width: 64px;
    text-align: center;
    line-height: 1.15;
  }

  /* Floating actions — alt menü üstünde */
  body.kh-mobile-v5 .kh-fab--contact.kh-fab--standalone {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  body.kh-mobile-v5 .kh-fab--top.kh-fab--standalone {
    bottom: calc(168px + env(safe-area-inset-bottom, 0px));
  }

  /* Story Continue mobil */
  body.kh-mobile-v5.kh-story-continue-v5 .kh-continue-card__glass {
    grid-template-columns: 1fr;
    padding: 20px 18px;
    text-align: center;
  }

  body.kh-mobile-v5 .kh-continue-card__media {
    display: none;
  }

  body.kh-mobile-v5 .kh-continue-card__cta {
    width: 100%;
    justify-content: center;
  }

  body.kh-mobile-v5 .kh-auto-next {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
  }

  body.kh-mobile-v5 .kh-chapter-v5 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.kh-mobile-v5 .kh-chapter-v5__card {
    padding: 16px;
  }

  /* Swiper touch performans */
  body.kh-mobile-v5 .kh-home-swiper,
  body.kh-mobile-v5 .kh-similar-swiper {
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  body.kh-mobile-v5 .swiper-wrapper {
    will-change: transform;
  }

  body.kh-mobile-v5 .kh-home-swiper .swiper-slide,
  body.kh-mobile-v5 .kh-similar-swiper .swiper-slide {
    touch-action: manipulation;
  }
}

@media (min-width: 1025px) {
  .kh-bottom-nav--v5 {
    display: none !important;
  }
}
