/* Teklimakan Android uygulaması: yalnızca Capacitor içinde etkinleşir. */
html.teklimakan-native-app {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

html.teklimakan-native-app input,
html.teklimakan-native-app textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ئەپ ئىچىدە ئەپ چۈشۈرۈش بۆلىكىنى ئاپتوماتىك يوشۇرۇش */
html.teklimakan-native-app .footer-app-showcase {
  display: none !important;
}

/* ئەپ ئىچىدە لەيلىمە كۇنۇپكىلارنى ئاستى تىزىملىكنىڭ ئۈستىگە رەتلىك چىقىرىش */
html.teklimakan-native-app .floating-contact-hub {
  bottom: calc(76px + var(--app-safe-bottom, 0px)) !important;
}

html.teklimakan-native-app .floating-lucky-wheel-btn {
  bottom: calc(76px + var(--app-safe-bottom, 0px)) !important;
}

html.teklimakan-native-app body {
  padding-top: var(--app-safe-top);
  padding-bottom: calc(76px + var(--app-safe-bottom));
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}

html.teklimakan-native-app .main-navbar {
  top: var(--app-safe-top);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 7px 22px rgba(15, 23, 42, 0.08);
}

html.teklimakan-native-app .store-bottom-nav {
  display: block !important;
  padding-bottom: var(--app-safe-bottom);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #dbe3ef;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html.teklimakan-native-app .store-bottom-nav-container {
  max-width: 760px;
  min-height: 68px;
  margin: 0 auto;
  padding: 4px 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}

html.teklimakan-native-app .bottom-nav-item {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 7px 3px 5px;
  border-radius: 14px;
  color: #64748b;
  gap: 4px;
}

html.teklimakan-native-app .bottom-nav-item.is-active,
html.teklimakan-native-app .bottom-nav-item:active {
  color: #1e3a8a;
  background: #eff6ff;
}

html.teklimakan-native-app .bottom-nav-icon-wrap,
html.teklimakan-native-app .native-nav-icon {
  min-height: 24px;
  display: grid;
  place-items: center;
  font-size: 1.12rem;
}

html.teklimakan-native-app .bottom-nav-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 800;
}

html.teklimakan-native-app .bottom-nav-cart-circle {
  width: 42px;
  height: 42px;
}

html.teklimakan-native-app .bottom-nav-wishlist {
  display: none !important;
}

.native-network-banner {
  position: fixed;
  z-index: 12000;
  left: 14px;
  right: 14px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 13px;
  background: #991b1b;
  color: #fff;
  box-shadow: 0 12px 30px rgba(153, 27, 27, 0.28);
  font-size: 0.86rem;
  font-weight: 800;
}

.native-network-banner.is-visible { display: flex; }

.native-account-backdrop {
  position: fixed;
  z-index: 11950;
  inset: 0;
  display: none;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.native-account-backdrop.is-open { display: flex; }

.native-account-sheet {
  width: 100%;
  max-height: min(78vh, 680px);
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 26px 26px 0 0;
  background: #fff;
  overflow-y: auto;
  box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.2);
  animation: native-sheet-in 180ms ease-out;
}

.native-sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 15px;
  border-radius: 999px;
  background: #cbd5e1;
}

.native-account-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 2px 2px 18px;
}

.native-account-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  background: #eff6ff;
}

.native-account-title { margin: 0; color: #0f172a; font-size: 1.08rem; }
.native-account-subtitle { margin: 4px 0 0; color: #64748b; font-size: 0.82rem; }

.native-account-actions {
  display: grid;
  gap: 9px;
}

.native-account-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  font: inherit;
  font-weight: 800;
}

.native-account-action i:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #dbeafe;
  color: #1d4ed8;
}

.native-account-action .fa-chevron-right {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.76rem;
}

@keyframes native-sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 420px) {
  html.teklimakan-native-app .bottom-nav-text { font-size: 0.61rem; }
  html.teklimakan-native-app .store-bottom-nav-container { padding-inline: 2px; }
}

/* ==================== 🚀 ئەپ ئىچىدىن ئاپتوماتىك نەشر تەكشۈرۈش (In-App Auto-Update) ==================== */
.native-update-backdrop {
  position: fixed;
  z-index: 12050;
  inset: 0;
  display: none;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.native-update-backdrop.is-open { display: flex; }

.native-update-sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 26px 22px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 28px 28px 0 0;
  background: #ffffff;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.25);
  animation: native-sheet-in 220ms ease-out;
  text-align: center;
}

.native-update-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.35);
}

.native-update-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.native-update-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.native-update-desc {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

.native-update-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.native-update-btn-download {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.native-update-btn-later {
  background: transparent;
  border: none;
  color: #64748b;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px;
  cursor: pointer;
}
