/* ==========================================================================
   KATKI YAP! - iOS Standartlarında Mobil Alt Menü (Tab Bar)
   Tasarım: Apple iOS Human Interface Guidelines (HIG) Standardı
   GEMINI.md Uyumlu: Feather/Lucide Çizgi SVG, Emojisiz, Slate & Royal Blue
   ========================================================================== */

/* Masaüstünde Tamamen Gizli */
.ios-tab-bar {
  display: none;
}

@media (max-width: 768px) {
  /* iOS Alt Tab Bar Konteyneri */
  .ios-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border-top: 0.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 -2px 14px rgba(15, 23, 42, 0.05);
    z-index: 995;
    align-items: stretch;
    justify-content: space-around;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  /* Backdrop filter desteklemeyen tarayıcılar için fallback */
  @supports not ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
    .ios-tab-bar {
      background: #ffffff;
      border-top: 1px solid #e2e8f0;
    }
  }

  /* Sayfa gövdesi alt dolgusu (Menünün sayfa altındaki içerikleri örtmesini engeller) */
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Bildirim Toast mesajı konumu */
  #toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Çerez uyarı çubuğu konumu */
  .ky-cookie-banner {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Tekil Tab Öğesi */
  .ios-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    position: relative;
    padding: 6px 2px 4px;
    min-width: 0;
    transition: color 0.15s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    cursor: pointer;
  }

  .ios-tab-item:active {
    transform: scale(0.92);
  }

  .ios-tab-item.active {
    color: var(--lp-blue, #2563eb);
  }

  /* İkon Sarmalayıcı */
  .ios-tab-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .ios-tab-icon-wrap svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: transform 0.15s ease, stroke-width 0.15s ease, stroke 0.15s ease;
  }

  .ios-tab-item.active .ios-tab-icon-wrap svg {
    stroke-width: 2.3;
    stroke: var(--lp-blue, #2563eb);
  }

  /* Tab Başlığı (Label) */
  .ios-tab-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
    color: inherit;
    transition: color 0.15s ease, font-weight 0.15s ease;
  }

  .ios-tab-item.active .ios-tab-label {
    font-weight: 700;
    color: var(--lp-blue, #2563eb);
  }

  /* Aktif nokta göstergesi (iOS ince vurgusu) */
  .ios-tab-item.active::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--lp-blue, #2563eb);
    display: block;
  }

  .ios-tab-item.ios-tab-center.active::after {
    display: none;
  }

  /* Bildirim Rozeti (Badge) */
  .ios-tab-badge {
    position: absolute;
    top: -3px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 1.5px #ffffff;
    z-index: 2;
  }

  /* -------------------------------------------------------------------------
     ORTADAKİ ÖNE ÇIKAN "OLUŞTUR" BUTONU (iOS Signature Action Button)
     ------------------------------------------------------------------------- */
  .ios-tab-item.ios-tab-center {
    overflow: visible;
    flex: 1.1;
  }

  .ios-tab-center-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    margin-top: -16px;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
    border: 3px solid #ffffff;
    box-sizing: border-box;
  }

  .ios-tab-center-btn svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.6;
  }

  .ios-tab-item.ios-tab-center:active .ios-tab-center-btn {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  }

  .ios-tab-item.ios-tab-center .ios-tab-label {
    color: var(--lp-blue, #2563eb);
    font-weight: 700;
    margin-top: 2px;
  }
}
