/* Enhanced PWA Install Notification Styles */
/* Add to your static/css/pwa-styles.css or create new file */

/* Main install notification - appears at top */
.pwa-install-notification {
  position: fixed;
  top: 60px; /* Below navbar */
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  background: linear-gradient(135deg, #8B1538 0%, #6B0F28 100%);
  border-bottom: 3px solid #D4AF37;
  box-shadow: 0 4px 20px rgba(139, 21, 56, 0.5);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
  animation: slide-down 0.5s ease forwards;
}

.pwa-install-notification.show {
  transform: translateY(0);
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.pwa-notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 15px;
}

.pwa-notification-icon {
  flex-shrink: 0;
  font-size: 2rem;
  color: #D4AF37;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.pwa-notification-text {
  flex-grow: 1;
  color: white;
}

.pwa-notification-text h6 {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  color: white;
}

.pwa-notification-text p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.pwa-notification-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.pwa-notification-actions .btn {
  white-space: nowrap;
  font-weight: 600;
  min-height: 36px;
  border-radius: 20px;
}

.pwa-notification-actions .btn-light {
  background: #D4AF37;
  border: none;
  color: #000;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.pwa-notification-actions .btn-light:hover {
  background: #B8941F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.pwa-notification-actions .btn-link {
  text-decoration: none;
  opacity: 0.8;
}

.pwa-notification-actions .btn-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Toast notifications */
.pwa-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  max-width: 350px;
  animation: slide-in 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 4px solid currentColor;
}

@keyframes slide-in {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.pwa-toast.fade-out {
  animation: fade-out 0.3s ease forwards;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .pwa-install-notification {
    top: 56px; /* Adjust for mobile navbar */
  }
  
  .pwa-notification-content {
    padding: 12px 15px;
    gap: 10px;
  }
  
  .pwa-notification-icon {
    font-size: 1.5rem;
  }
  
  .pwa-notification-text h6 {
    font-size: 0.9rem;
  }
  
  .pwa-notification-text p {
    font-size: 0.75rem;
  }
  
  .pwa-notification-actions {
    gap: 8px;
  }
  
  .pwa-notification-actions .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
    min-height: 32px;
  }
  
  .pwa-toast {
    bottom: 70px; /* Above mobile navigation if any */
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .pwa-notification-content {
    flex-wrap: wrap;
  }
  
  .pwa-notification-text {
    flex-basis: 100%;
    order: 1;
    margin-bottom: 8px;
  }
  
  .pwa-notification-icon {
    order: 0;
  }
  
  .pwa-notification-actions {
    order: 2;
    flex-basis: 100%;
    justify-content: stretch;
  }
  
  .pwa-notification-actions .btn {
    flex: 1;
  }
}

/* Loading animation for install button */
.pwa-installing {
  position: relative;
  pointer-events: none;
}

.pwa-installing::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pulse effect for notification */
.pwa-install-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Accessibility */
.pwa-install-notification:focus-within {
  outline: 3px solid #D4AF37;
  outline-offset: -3px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .pwa-install-notification,
  .pwa-toast,
  .pwa-notification-icon {
    animation: none !important;
    transition: none !important;
  }
  
  .pwa-install-notification {
    transform: translateY(0);
  }
}

/* Standalone mode adjustments */
@media all and (display-mode: standalone) {
  .pwa-install-notification {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .pwa-install-notification {
    border: 3px solid currentColor;
  }
  
  .pwa-notification-actions .btn-light {
    border: 2px solid #000;
  }
}