/* LeadJaw PWA Install Banner */
/* File: assets/css/pwa.css */

#lj-pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1d2e;
  border-top: 1px solid rgba(108, 99, 255, 0.3);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

#lj-pwa-banner.lj-pwa-visible {
  transform: translateY(0);
}

.lj-pwa-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.lj-pwa-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.lj-pwa-icon img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
}

.lj-pwa-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lj-pwa-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.lj-pwa-text span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Share icon inline in iOS instructions */
.lj-share-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: middle;
  margin: 0 1px;
  color: #6c63ff;
}

/* Install button */
.lj-pwa-install {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  background: #6c63ff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-appearance: none;
}

.lj-pwa-install:hover {
  background: #7c74ff;
}

.lj-pwa-install:active {
  opacity: 0.85;
}

/* Close button */
.lj-pwa-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
  -webkit-appearance: none;
}

.lj-pwa-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Push permission prompt - used in settings page */
.lj-push-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 8px;
  margin-top: 16px;
}

.lj-push-prompt p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.lj-push-prompt strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.lj-push-toggle {
  flex-shrink: 0;
}

/* Status badge for push state */
.lj-push-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.lj-push-status.enabled {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.lj-push-status.disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
}

.lj-push-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Safe area padding for iOS home bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #lj-pwa-banner {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #lj-pwa-banner {
    transition: none;
  }
}
