/* APK update banner — Telegram sheet style */

.update-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 0 var(--safe-bottom, env(safe-area-inset-bottom, 0px));
  animation: iosSheetUp .38s cubic-bezier(.2, .9, .2, 1);
  /* Outer shell must not steal taps from the composer / send button. */
  pointer-events: none;
}

@keyframes iosSheetUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.update-banner.hidden {
  display: none;
}

.update-banner-inner {
  margin: 8px 12px max(14px, var(--safe-bottom, 0px));
  background: color-mix(in srgb, var(--surface, #fff) 94%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-radius: 18px;
  box-shadow: var(--shadow, 0 12px 40px rgba(0,0,0,.18)), 0 0 0 0.5px var(--hairline, rgba(0,0,0,.08));
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.update-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent, #3390EC);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.update-content {
  display: grid;
  gap: 4px;
  text-align: center;
}

.update-content strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text, #000);
}

.update-content span {
  font-size: 13px;
  color: var(--accent, #007AFF);
  font-weight: 600;
}

.update-changelog {
  font-size: 14px;
  color: var(--text-soft, #3C3C43);
  margin: 2px 0 0;
  line-height: 1.4;
}

.update-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.update-actions .primary-btn {
  background: var(--accent, #3390EC);
  box-shadow: none;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 600;
}

.update-actions .secondary-btn {
  border-radius: 12px;
  min-height: 48px;
  color: var(--accent, #3390EC);
  background: var(--fill-2, rgba(112,117,121,.12));
  font-weight: 600;
}

.update-actions .primary-btn:active,
.update-actions .secondary-btn:active {
  transform: scale(.97);
}

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

.update-progress.hidden { display: none; }

.update-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--fill, rgba(120,120,128,.16));
  overflow: hidden;
}

.update-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent, #3390EC);
  transition: width .3s ease;
}

#update-progress-text {
  font-size: 12px;
  color: var(--muted, #8E8E93);
  text-align: center;
  font-weight: 500;
}

.apk-publish-section {
  margin-top: 0;
  padding: 16px;
  background: var(--surface, #fff);
  border-radius: 16px;
  border: 0;
}

.apk-publish-section.hidden { display: none; }

.apk-mandatory-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-soft, #3C3C43);
  cursor: pointer;
}

.apk-mandatory-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--accent, #3390EC);
}
