/* ══════════════════════════════════════════════════════════
   Smart App Banner — Hepsiburada / Trendyol-inspired
   Bottom fixed, branded, mobile-only
   ══════════════════════════════════════════════════════════ */

/* ── Base Banner ── */
#smartbanner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, var(--th-color-primary) 0%, var(--th-ink-700) 40%, var(--th-color-accent) 100%);
  background-image: url('../images/smart-banner-bg.webp');
  background-size: cover;
  background-position: center;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .15);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

#smartbanner.shown {
  transform: translateY(0);
}

/* ── Container Layout ── */
#smartbanner .sb-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  max-width: 100%;
  position: relative;
}

/* ── Close Button ── */
#smartbanner .sb-close {
  position: absolute;
  top: 6px; right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  transition: background .2s;
}

#smartbanner .sb-close:hover,
#smartbanner .sb-close:active {
  background: rgba(255, 255, 255, .35);
}

#smartbanner .sb-close svg {
  width: 12px;
  height: 12px;
}

/* ── App Icon ── */
#smartbanner .sb-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  left: auto;
  top: auto;
}

#smartbanner .sb-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  padding: 6px;
}

#smartbanner .sb-icon.gloss::after { display: none; }
#smartbanner.no-icon .sb-icon { display: none; }

/* ── Info Area ── */
#smartbanner .sb-info {
  flex: 1;
  min-width: 0;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  text-shadow: none;
  padding-right: 20px;
}

#smartbanner .sb-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  text-shadow: none;
}

#smartbanner .sb-info > span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  line-height: 1.4;
}

/* ── Store Name ── */
#smartbanner .sb-store {
  display: none;
}

/* ── Incentive Text ── */
#smartbanner .sb-incentive {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, .9);
  font-weight: 500;
  line-height: 1.3;
}

/* ── Install Button ── */
#smartbanner .sb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 100px;
  height: 38px;
  padding: 0 18px;
  border: 2px solid #fff;
  border-radius: 24px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
  position: static;
  right: auto;
  top: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#smartbanner .sb-button span {
  display: block;
  padding: 0;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
  text-align: center;
  background: transparent;
}

#smartbanner .sb-button:hover,
#smartbanner .sb-button:active {
  background: rgba(255, 255, 255, .3);
  transform: translateY(-1px);
}

#smartbanner .sb-button:active span,
#smartbanner .sb-button:hover span {
  background: transparent;
}


/* ══════════════════════════════════════════════════════════
   Platform Overrides — unified look (no per-platform diff)
   ══════════════════════════════════════════════════════════ */

#smartbanner.ios,
#smartbanner.android,
#smartbanner.windows {
  background: linear-gradient(135deg, var(--th-color-primary) 0%, var(--th-ink-700) 40%, var(--th-color-accent) 100%);
  background-image: url('../images/smart-banner-bg.webp');
  background-size: cover;
  background-position: center;
  border-top: none;
  border-bottom: none;
  border-color: transparent;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .15);
  position: fixed !important;
}

#smartbanner.ios .sb-close,
#smartbanner.android .sb-close {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  font-size: 16px;
  text-shadow: none;
  box-shadow: none;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 8px;
  left: auto;
}

#smartbanner.ios .sb-close:active,
#smartbanner.android .sb-close:active {
  background: rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 16px;
}

#smartbanner.ios .sb-info,
#smartbanner.android .sb-info {
  color: rgba(255, 255, 255, .85);
  text-shadow: none;
}

#smartbanner.ios .sb-info strong,
#smartbanner.android .sb-info strong {
  color: #fff;
  font-size: 14px;
  text-shadow: none;
  font-weight: 700;
}

#smartbanner.ios .sb-button,
#smartbanner.android .sb-button {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 24px;
  min-width: 100px;
  min-height: 38px;
  padding: 0 18px;
  font-weight: 700;
}

#smartbanner.ios .sb-button span,
#smartbanner.android .sb-button span {
  text-shadow: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

#smartbanner.ios .sb-button:hover,
#smartbanner.ios .sb-button:active,
#smartbanner.android .sb-button:hover,
#smartbanner.android .sb-button:active {
  background: rgba(255, 255, 255, .3);
}

#smartbanner.ios .sb-button:active span,
#smartbanner.ios .sb-button:hover span,
#smartbanner.android .sb-button:active span,
#smartbanner.android .sb-button:hover span {
  background: transparent;
}


/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */

/* Küçük ekranlar — daha kompakt */
@media (max-width: 374px) {
  #smartbanner .sb-container {
    gap: 10px;
    padding: 12px 12px;
  }
  #smartbanner .sb-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
  #smartbanner .sb-info strong { font-size: 13px; }
  #smartbanner .sb-button {
    min-width: 80px;
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
  }
  #smartbanner .sb-close {
    width: 22px;
    height: 22px;
  }
  #smartbanner .sb-close svg {
    width: 10px;
    height: 10px;
  }
}

/* Tablet ve üzeri — banner gösterme (masaüstünde gereksiz) */
@media (min-width: 769px) {
  #smartbanner { display: none !important; }
}

/* ── Print: gizle ── */
@media print {
  #smartbanner { display: none !important; }
}
