/* ===================================
   PWA Install Banner - Elegant Design
   =================================== */

.pwa-install-banner {
  position: fixed;
  bottom: -500px;
  left: 0;
  right: 0;
  z-index: 99999;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pwa-install-banner.pwa-banner-visible {
  bottom: 0;
}

.pwa-banner-wrapper {
  background: linear-gradient(135deg, #667eea 0%, #118ed5  100%);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.pwa-banner-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  background-size: 30px 30px;
  opacity: 0.3;
}

.pwa-banner-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.pwa-banner-icon {
  flex-shrink: 0;
}

.pwa-banner-icon img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.pwa-banner-text {
  flex: 1;
  color: white;
}

.pwa-banner-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pwa-banner-description {
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
  opacity: 0.95;
  line-height: 1.5;
}

.pwa-banner-features {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pwa-banner-features span {
  font-size: 0.875rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pwa-banner-features i {
  font-size: 0.75rem;
}

.pwa-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pwa-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.pwa-btn-primary {
  background: white;
  color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pwa-btn-primary:active {
  transform: translateY(0);
}

.pwa-btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(10px);
}

.pwa-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pwa-banner-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.pwa-banner-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* ===================================
   Update Notification
   =================================== */

.pwa-update-notification {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-update-notification.visible {
  top: 20px;
}

.pwa-update-content {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
}

.pwa-update-content i {
  font-size: 1.5rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pwa-update-content span {
  flex: 1;
  font-weight: 600;
}

.pwa-btn-update {
  background: white;
  color: #11998e;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pwa-btn-update:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-btn-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pwa-btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===================================
   iOS Install Prompt
   =================================== */

.ios-install-prompt {
  position: fixed;
  bottom: -300px;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
  backdrop-filter: blur(20px);
  padding: 2rem 1.5rem;
  text-align: center;
  z-index: 99999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-install-prompt.show {
  bottom: 0;
}

.ios-prompt-content {
  max-width: 500px;
  margin: 0 auto;
}

.ios-prompt-content h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.ios-prompt-content p {
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.ios-prompt-btn {
  background: #007AFF;
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.ios-prompt-btn:hover {
  background: #0051D5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.5);
}

/* ===================================
   Offline Indicator
   =================================== */

.pwa-offline-indicator {
  position: fixed;
  top: -60px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
  color: white;
  padding: 1rem;
  text-align: center;
  z-index: 100000;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-offline-indicator.show {
  top: 0;
}

.pwa-offline-indicator svg,
.pwa-offline-indicator i {
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ===================================
   Mobile Responsive
   =================================== */

@media (max-width: 768px) {
  .pwa-banner-content {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem 1.5rem 1rem;
  }
  
  .pwa-banner-features {
    justify-content: center;
    font-size: 0.8rem;
  }
  
  .pwa-banner-actions {
    width: 100%;
  }
  
  .pwa-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
  
  .pwa-banner-close {
    top: 0.75rem;
    right: 0.75rem;
  }
  
  .pwa-update-notification {
    left: 1rem;
    right: 1rem;
    transform: none;
  }
  
  .pwa-update-content {
    min-width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pwa-banner-icon img {
    width: 56px;
    height: 56px;
  }
  
  .pwa-banner-title {
    font-size: 1.1rem;
  }
  
  .pwa-banner-description {
    font-size: 0.875rem;
  }
  
  .pwa-banner-features {
    font-size: 0.75rem;
    gap: 0.75rem;
  }
}