/* PWA Installation and Update Styles */

/* Install Banner */
.pwa-install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-install-banner.hide {
  transform: translateY(-100%);
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

.pwa-banner-icon img {
  border-radius: 8px;
  width: 48px;
  height: 48px;
}

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

.pwa-banner-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.pwa-banner-text p {
  margin: 2px 0 0 0;
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.2;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.pwa-install-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.pwa-later-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.pwa-later-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.pwa-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.pwa-close-btn:hover {
  opacity: 1;
}

/* Floating Install Button */
.pwa-floating-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  z-index: 9998;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.pwa-floating-button.show {
  transform: translateY(0);
  opacity: 1;
}

.pwa-floating-button.hide {
  transform: translateY(100px);
  opacity: 0;
}

.pwa-floating-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.pwa-floating-button svg {
  width: 20px;
  height: 20px;
}

/* Update Banner */
.pwa-update-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-update-banner.show {
  transform: translateY(0);
}

.pwa-update-banner.hide {
  transform: translateY(100%);
}

.pwa-update-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.pwa-update-text {
  font-size: 16px;
  font-weight: 500;
}

.pwa-update-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-update-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.pwa-update-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.pwa-update-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.pwa-update-close:hover {
  opacity: 1;
}

/* Success Message */
.pwa-success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90vw;
  width: 400px;
}

.pwa-success-message.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.pwa-success-message.hide {
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
}

.pwa-success-content {
  padding: 32px 24px;
  text-align: center;
}

.pwa-success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.pwa-success-text h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.pwa-success-text p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* iOS Install Banner */
.ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #000, #1a1a1a);
  color: white;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.ios-install-banner.show {
  transform: translateY(0);
}

.ios-install-content {
  display: flex;
  align-items: flex-start;
  padding: 20px 16px;
  gap: 16px;
  position: relative;
}

.ios-install-icon img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}

.ios-install-text {
  flex: 1;
}

.ios-install-text h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.ios-install-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.9;
}

.share-icon {
  font-size: 16px;
  vertical-align: middle;
}

.ios-install-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.ios-install-close:hover {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 640px) {
  .pwa-banner-content {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .pwa-banner-icon img {
    width: 40px;
    height: 40px;
  }
  
  .pwa-banner-text h3 {
    font-size: 14px;
  }
  
  .pwa-banner-text p {
    font-size: 12px;
  }
  
  .pwa-install-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .pwa-floating-button {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .pwa-floating-button span {
    display: none;
  }
  
  .pwa-success-message {
    width: 320px;
  }
  
  .ios-install-content {
    padding: 16px 12px;
    gap: 12px;
  }
  
  .ios-install-icon img {
    width: 50px;
    height: 50px;
  }
  
  .ios-install-text h3 {
    font-size: 16px;
  }
  
  .ios-install-text p {
    font-size: 13px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pwa-success-message {
    background: #1f2937;
    color: white;
  }
  
  .pwa-success-text h3 {
    color: white;
  }
  
  .pwa-success-text p {
    color: #d1d5db;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .pwa-install-banner {
    background: #000;
    border-bottom: 2px solid #fff;
  }
  
  .pwa-install-btn {
    background: #fff;
    color: #000;
    border: 2px solid #fff;
  }
  
  .pwa-floating-button {
    background: #000;
    border: 2px solid #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner,
  .pwa-floating-button,
  .pwa-update-banner,
  .pwa-success-message,
  .ios-install-banner {
    transition: none;
  }
  
  .pwa-floating-button:hover {
    transform: none;
  }
}
