/* JustGlow PWA Styles */

/* PWA Install Button */
.pwa-install-btn {
  background: linear-gradient(135deg, #6A0DAD, #4A148C);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
  display: none;
  align-items: center;
  gap: 8px;
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 13, 173, 0.4);
}

.pwa-install-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pwa-install-btn i {
  font-size: 16px;
}

/* PWA Toast Messages */
.pwa-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 350px;
  border-left: 4px solid #6A0DAD;
}

.pwa-toast.show {
  transform: translateX(0);
}

.pwa-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-toast i {
  font-size: 18px;
  color: #6A0DAD;
}

.pwa-toast span {
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

/* Toast Types */
.pwa-toast-success {
  border-left-color: #28a745;
}

.pwa-toast-success i {
  color: #28a745;
}

.pwa-toast-error {
  border-left-color: #dc3545;
}

.pwa-toast-error i {
  color: #dc3545;
}

.pwa-toast-info {
  border-left-color: #17a2b8;
}

.pwa-toast-info i {
  color: #17a2b8;
}

/* PWA Install Prompt */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  max-width: 400px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.pwa-install-prompt h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 18px;
}

.pwa-install-prompt p {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.pwa-install-prompt .pwa-prompt-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.pwa-install-prompt .btn {
  padding: 10px 20px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pwa-install-prompt .btn-primary {
  background: #6A0DAD;
  color: white;
}

.pwa-install-prompt .btn-primary:hover {
  background: #4A148C;
}

.pwa-install-prompt .btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #e0e0e0;
}

.pwa-install-prompt .btn-secondary:hover {
  background: #e9ecef;
}

/* PWA Status Bar */
.pwa-status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #6A0DAD;
  color: white;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  z-index: 9998;
  display: none;
}

.pwa-status-bar.show {
  display: block;
}

/* PWA Offline Indicator */
.pwa-offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #dc3545;
  color: white;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  z-index: 9998;
  display: none;
}

.pwa-offline-indicator.show {
  display: block;
}

/* PWA Install Success */
.pwa-install-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  max-width: 400px;
  display: none;
}

.pwa-install-success.show {
  display: block;
}

.pwa-install-success .success-icon {
  width: 80px;
  height: 80px;
  background: #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 40px;
}

.pwa-install-success h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 24px;
}

.pwa-install-success p {
  margin: 0 0 24px 0;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

.pwa-install-success .btn {
  background: #6A0DAD;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pwa-install-success .btn:hover {
  background: #4A148C;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pwa-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .pwa-toast.show {
    transform: translateY(0);
  }
  
  .pwa-install-prompt {
    bottom: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: none;
  }
  
  .pwa-install-success {
    left: 20px;
    right: 20px;
    transform: translateY(-50%);
    max-width: none;
  }
}

/* PWA Meta Tags Support */
@media (display-mode: standalone) {
  .pwa-install-btn {
    display: none !important;
  }
  
  .pwa-install-prompt {
    display: none !important;
  }
}

/* PWA Loading States */
.pwa-loading {
  opacity: 0.6;
  pointer-events: none;
}

.pwa-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #6A0DAD;
  border-radius: 50%;
  animation: pwa-spin 1s linear infinite;
}

@keyframes pwa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 