/* ==========================================================================
   Sorry Kitty — Smart PWA Install Prompt UI (11-pwa-install.css)
   Compact, non-blocking product suggestion card using Sorry Kitty's
   white/pastel-blue surface and Nunito Sans typography.
   ========================================================================== */

.sk-pwa-banner {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, 24px, 0) scale(0.96);
  width: calc(100vw - 28px);
  max-width: 396px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  box-shadow:
    0 14px 36px -6px rgba(15, 23, 42, 0.14),
    0 4px 12px -2px rgba(37, 99, 235, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 15px 16px 14px;
  z-index: 9400;
  font-family: var(--font-sans, 'Nunito Sans', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif);
  color: #0f172a;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}

.sk-pwa-banner.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
}

/* Desktop positioning: compact card in bottom-right corner */
@media (min-width: 768px) {
  .sk-pwa-banner {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: translate3d(0, 20px, 0) scale(0.96);
    width: 376px;
  }
  .sk-pwa-banner.is-visible {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.sk-pwa-banner__top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  position: relative;
}

.sk-pwa-banner__icon-wrap {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sk-pwa-banner__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.sk-pwa-banner__content {
  flex: 1;
  min-width: 0;
  padding-right: 22px;
}

.sk-pwa-banner__title {
  margin: 0 0 3px 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: #0f172a;
}

.sk-pwa-banner__desc {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #475569;
}

.sk-pwa-banner__close {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(241, 245, 249, 0.85);
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sk-pwa-banner__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sk-pwa-banner__close:active {
  transform: scale(0.92);
}

/* iOS Add to Home Screen compact step strip */
.sk-pwa-banner__ios-steps {
  margin-top: 11px;
  padding: 9px 12px;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.35;
}

.sk-pwa-banner__ios-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 7px;
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.12);
}

/* Action buttons row */
.sk-pwa-banner__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.sk-pwa-banner__btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.sk-pwa-banner__btn:active {
  transform: scale(0.96);
}

.sk-pwa-banner__btn--secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.sk-pwa-banner__btn--secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.sk-pwa-banner__btn--primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  border: 1px solid rgba(29, 78, 216, 0.2);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sk-pwa-banner__btn--primary:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.34);
}

.sk-pwa-banner__btn--primary:disabled {
  opacity: 0.65;
  cursor: default;
}

@media (max-width: 380px) {
  .sk-pwa-banner {
    width: calc(100vw - 20px);
    padding: 13px 14px 12px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  .sk-pwa-banner__icon-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
  }
  .sk-pwa-banner__title {
    font-size: 14px;
  }
  .sk-pwa-banner__desc {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-pwa-banner {
    transition: opacity 0.15s ease, visibility 0.15s ease !important;
  }
}
