/* Foto Baskı Al — PWA Kurulum Bandı, iOS Rehberi ve Mobil Uygulama İyileştirmeleri
 * Mevcut fotobaskial-sade teması ve .sd-tabbar ile %100 uyumlu, izole fba-pwa-* önekli stiller.
 */

/* Standalone (Ana Ekrandan Açılan Uygulama) İyileştirmeleri */
@media (display-mode: standalone) {
  html, body {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
  }
  body {
    padding-top: env(safe-area-inset-top);
  }
}

/* Akıllı "Uygulamayı İndir" Bandı */
.fba-pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--fba-tabbar-h, 72px) + env(safe-area-inset-bottom, 0px));
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: linear-gradient(135deg, #15578a 0%, #0f4169 100%);
  color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 65, 105, 0.34), 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  max-width: 460px;
  margin: 0 auto;
}

.fba-pwa-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.fba-pwa-banner[hidden] {
  display: none !important;
}

.fba-pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  background: #fff;
}

.fba-pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.fba-pwa-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fba-pwa-banner-sub {
  font-size: 11.5px;
  line-height: 1.3;
  color: rgba(235, 245, 255, 0.88);
  margin: 0;
}

.fba-pwa-banner-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  background: #ffffff;
  color: #15578a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.fba-pwa-banner-btn:active {
  transform: scale(0.96);
}

.fba-pwa-banner-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* iPhone / iOS Safari Kurulum Rehber Modalı */
.fba-ios-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(12, 24, 38, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.fba-ios-backdrop[hidden] {
  display: none !important;
}

.fba-ios-sheet {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  color: #152536;
  border-radius: 22px;
  padding: 22px 20px 20px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fba-ios-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.fba-ios-head img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.fba-ios-head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
  color: #103b5e;
}

.fba-ios-head p {
  font-size: 12.5px;
  color: #54697d;
  margin: 0;
}

.fba-ios-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fba-ios-steps li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: #f3f7fb;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #1a2d40;
}

.fba-ios-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #15578a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fba-ios-ok {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: #15578a;
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Yedek Mobil Alt Navigasyon (sadece sayfada .sd-tabbar yoksa aktif olur) */
.fba-pwa-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #ffffff;
  border-top: 1px solid #e4e9ef;
  box-shadow: 0 -4px 16px rgba(20, 24, 34, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fba-pwa-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  color: #243647;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}

.fba-pwa-tabbar a.is-active {
  color: #15578a;
}

.fba-pwa-tabbar a.is-highlight {
  color: #15578a;
}

@media (min-width: 960px) {
  .fba-pwa-tabbar {
    display: none;
  }
  .fba-pwa-banner {
    left: auto;
    right: 20px;
    bottom: 20px;
    max-width: 380px;
  }
}
