/**
 * Scoped Styles for PWA Install Prompt & Offline Connectivity Banner
 */

/* Floating / Header In-App Install Button */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffd700;
  color: #121212;
  font-family: 'Archivo Black', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
  line-height: 1;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.pwa-install-btn:hover {
  background: #ffea75;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.pwa-install-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

.pwa-install-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

/* Sidebar integration button */
.sidebar-pwa-item {
  margin: 12px 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px dashed #000;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.dark-theme .sidebar-pwa-item {
  background: #1e1e20;
  border-color: #333;
}

.sidebar-pwa-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dark-theme .sidebar-pwa-label {
  color: #94a3b8;
}

/* iOS Safari Install Guide Modal */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pwaFadeIn 0.2s ease-out;
}

.pwa-ios-card {
  background: #ffffff;
  color: #121212;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 8px 8px 0 #000;
  max-width: 380px;
  width: 100%;
  padding: 24px;
  position: relative;
  text-align: left;
}

.dark-theme .pwa-ios-card {
  background: #1c1c1e;
  color: #ffffff;
  border-color: #ffd700;
  box-shadow: 8px 8px 0 #ffd700;
}

.pwa-ios-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pwa-ios-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #000;
  overflow: hidden;
  background: #121212;
}

.pwa-ios-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 17px;
  margin: 0;
  line-height: 1.2;
}

.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: #334155;
}

.dark-theme .pwa-ios-step {
  color: #cbd5e1;
}

.pwa-step-num {
  background: #ffd700;
  color: #000;
  font-weight: 800;
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid #000;
}

.pwa-ios-close {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #121212;
  color: #ffffff;
  font-family: 'Archivo Black', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  border: 2px solid #000;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}

.dark-theme .pwa-ios-close {
  background: #ffd700;
  color: #000;
}

/* Offline Connectivity Banner / Toast */
.pwa-connectivity-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #121212;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  border: 2px solid #ffd700;
  box-shadow: 4px 4px 0 #000;
  font-size: 13px;
  font-weight: 600;
  animation: pwaSlideUp 0.25s ease-out;
}

.pwa-connectivity-toast.online {
  border-color: #00e676;
}

.pwa-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd700;
  animation: pwaPulse 1.5s infinite;
}

.pwa-connectivity-toast.online .pwa-pulse-dot {
  background: #00e676;
  animation: none;
}

@keyframes pwaPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pwaSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
