/* PWA Install Banner Styles */
#pwa-install-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #004aad 0%, #0066cc 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-width: 90%;
  width: 500px;
  animation: slideUpBanner 0.5s ease-out;
  backdrop-filter: blur(10px);
}

@keyframes slideUpBanner {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.pwa-install-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-install-banner-icon {
  font-size: 2.5rem;
  color: #ffd700;
  flex-shrink: 0;
}

.pwa-install-banner-text {
  flex: 1;
}

.pwa-install-banner-text h5 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.pwa-install-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.pwa-install-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-install-btn,
.pwa-dismiss-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pwa-install-btn {
  background: white;
  color: #004aad;
}

.pwa-install-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-dismiss-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pwa-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Install Success Message */
.pwa-install-success {
  position: fixed;
  top: 80px;
  right: 20px;
  background: white;
  color: #333;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  animation: slideInRight 0.5s ease-out;
  max-width: 350px;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.pwa-install-success-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-install-success-content i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pwa-install-success-content span {
  flex: 1;
  font-weight: 500;
}

.pwa-install-success-content button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.pwa-install-success-content button:hover {
  background: #f0f0f0;
  color: #333;
}

/* Manual Install Instructions Modal */
.pwa-install-instructions-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pwa-install-instructions-content {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.pwa-install-close:hover {
  background: #f0f0f0;
  color: #333;
}

.pwa-install-instructions h5 {
  color: #004aad;
  margin-bottom: 1rem;
  font-weight: 600;
}

.pwa-install-instructions ol {
  padding-left: 1.5rem;
}

.pwa-install-instructions li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.pwa-install-instructions i {
  color: #004aad;
  margin: 0 0.25rem;
}

/* Install Button in Navbar */
#pwa-install-btn {
  display: none;
  margin-left: 0.5rem;
}

#pwa-install-btn i {
  margin-right: 0.25rem;
}

/* Manual Install Button */
#pwa-manual-install-btn {
  display: none;
}

/* Install Steps Styling */
.install-steps {
  margin: 1.5rem 0;
  text-align: left;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #004aad 0%, #0066cc 100%);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content strong {
  display: block;
  color: #004aad;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.step-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.install-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #e6f0ff;
  border-radius: 8px;
  margin-top: 1rem;
}

.install-note i {
  color: #004aad;
  font-size: 1.1rem;
}

.install-note small {
  color: #666;
  font-size: 0.85rem;
}

/* iOS Standalone Mode Support */
.ios-standalone {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Safe Area Support for Notched Devices */
@supports (padding: max(0px)) {
  #pwa-install-banner {
    bottom: max(20px, env(safe-area-inset-bottom));
  }
  
  .pwa-install-success {
    top: max(80px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  #pwa-install-banner {
    width: calc(100% - 40px);
    max-width: none;
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 1rem;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .pwa-install-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .pwa-install-banner-icon {
    font-size: 2rem;
  }
  
  .pwa-install-banner-text h5 {
    font-size: 1rem;
  }
  
  .pwa-install-banner-text p {
    font-size: 0.85rem;
  }
  
  .pwa-install-banner-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .pwa-install-btn,
  .pwa-dismiss-btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  
  .pwa-install-success {
    right: 10px;
    left: 10px;
    max-width: none;
    top: max(70px, env(safe-area-inset-top));
    padding: 0.75rem 1rem;
  }
  
  .pwa-install-success-content {
    gap: 0.75rem;
  }
  
  .pwa-install-success-content span {
    font-size: 0.9rem;
  }
  
  .pwa-install-instructions-content {
    width: 95%;
    padding: 1.5rem;
    max-height: 85vh;
  }
  
  .install-steps {
    margin: 1rem 0;
  }
  
  .step {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .step-content strong {
    font-size: 0.95rem;
  }
  
  .step-content p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  #pwa-install-banner {
    width: calc(100% - 20px);
    padding: 0.875rem;
    border-radius: 10px;
  }
  
  .pwa-install-banner-icon {
    font-size: 1.75rem;
  }
  
  .pwa-install-banner-text h5 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  
  .pwa-install-banner-text p {
    font-size: 0.8rem;
  }
  
  .pwa-install-btn,
  .pwa-dismiss-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }
  
  .pwa-install-instructions-content {
    padding: 1rem;
  }
  
  .pwa-install-instructions h5 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #pwa-install-banner {
    border: 2px solid white;
  }
  
  .pwa-install-btn {
    border: 2px solid #004aad;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #pwa-install-banner,
  .pwa-install-success,
  .pwa-install-instructions-modal,
  .pwa-install-instructions-content {
    animation: none;
  }
}

