/* ═══════════════════════════════════════════
   Chawang PWA Installer v2 — Banner Styles
   Covers: Standard / iOS / Firefox banners
═══════════════════════════════════════════ */

/* ── SHARED BASE ── */
#cpwa-banner,
#cpwa-ios-banner,
#cpwa-firefox-banner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2147483647;
  background: #1a1a1a;
  color: #fff;
  padding: 11px 14px;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 18px rgba(0,0,0,.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.3;
  animation: cpwa-in .4s cubic-bezier(.34,1.56,.64,1) both;
}

#cpwa-banner.cpwa-show,
#cpwa-ios-banner.cpwa-show,
#cpwa-firefox-banner.cpwa-show {
  display: flex;
}

@keyframes cpwa-in {
  from { transform: translateY(-110%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── ICON ── */
.cpwa-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}

.cpwa-letter {
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  color: #fff;
}

/* ── TEXT ── */
.cpwa-text {
  flex: 1;
  min-width: 0;
}

.cpwa-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpwa-text span {
  display: block;
  font-size: 11.5px;
  color: #bbb;
  margin-top: 2px;
}

.cpwa-share-icon {
  font-size: 14px;
  display: inline-block;
  transform: rotate(180deg);
  margin: 0 1px;
}

/* ── INSTALL BUTTON ── */
#cpwa-install-btn {
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .3px;
  transition: filter .15s, transform .1s;
}
#cpwa-install-btn:hover  { filter: brightness(1.15); }
#cpwa-install-btn:active { transform: scale(.95); }

/* ── DISMISS BUTTON ── */
#cpwa-dismiss-btn,
#cpwa-ios-dismiss,
#cpwa-firefox-dismiss {
  background: none;
  border: none;
  color: #888;
  font-size: 17px;
  cursor: pointer;
  padding: 4px 5px;
  line-height: 1;
  transition: color .2s;
  flex-shrink: 0;
}
#cpwa-dismiss-btn:hover,
#cpwa-ios-dismiss:hover,
#cpwa-firefox-dismiss:hover { color: #fff; }

/* ── iOS ARROW (points to Safari share button at bottom) ── */
.cpwa-ios-arrow {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: #fff;
  animation: cpwa-bounce .8s infinite alternate;
  pointer-events: none;
  display: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

#cpwa-ios-banner.cpwa-show ~ .cpwa-ios-arrow,
.cpwa-ios-arrow.cpwa-show { display: block; }

@keyframes cpwa-bounce {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-50%) translateY(8px); }
}

/* ── PUSH PAGE DOWN ── */
body.cpwa-pushed { margin-top: 70px; transition: margin-top .3s ease; }

/* ── RESPONSIVE ── */
@media (max-width: 380px) {
  #cpwa-install-btn { padding: 8px 11px; font-size: 12px; }
  .cpwa-text strong { font-size: 12.5px; }
}
