/**
 * WordBlast PWA – Install UI Styles
 * Scope: .wb-game-wrapper and its children
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.wb-game-wrapper {
  position: relative;
  overflow: hidden;
}

/* ── Iframe ───────────────────────────────────────────────────────────────── */
.wb-game-wrapper iframe#wb-game-iframe {
  display: block;
  width: 100%;
  min-height: 560px;
  border: none;
  background: #08061a;
}

/* ── Install banner (bottom-slide) ───────────────────────────────────────── */
.wb-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  background: linear-gradient(135deg, #1a0533 0%, #0e1547 100%);
  border-top: 1.5px solid rgba(139, 92, 246, .45);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .55);
  animation: wb-slide-up .35s cubic-bezier(.34, 1.12, .64, 1) both;
}

@keyframes wb-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.wb-install-banner__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  max-width: 520px;
  margin: 0 auto;
}

.wb-install-banner__icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.wb-install-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wb-install-banner__text strong {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.wb-install-banner__text span {
  font-size: 11px;
  color: rgba(255, 255, 255, .65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-install-banner__btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #f97316, #fbbf24);
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(120, 40, 0, .6);
  transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}

.wb-install-banner__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(120, 40, 0, .6);
}

.wb-install-banner__btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(120, 40, 0, .6);
}

.wb-install-banner__dismiss {
  flex-shrink: 0;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: background .15s;
}

.wb-install-banner__dismiss:hover {
  background: rgba(255, 255, 255, .18);
}

/* ── iOS "Add to Home Screen" hint ───────────────────────────────────────── */
.wb-ios-hint {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 420px;
  animation: wb-fade-in .3s ease both;
}

@keyframes wb-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.wb-ios-hint__inner {
  position: relative;
  background: rgba(10, 40, 110, .97);
  border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  padding: 12px 40px 12px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, .85);
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  text-align: center;
}

.wb-ios-hint__inner strong {
  color: #fff;
}

.wb-ios-hint__close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(255, 255, 255, .12);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .wb-install-banner__text span {
    display: none;
  }
}

/* Hide banner arrow for non-standalone iOS (triangle pointer) */
.wb-ios-hint__inner::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(10, 40, 110, .97);
}
