/* MotoJaya PWA Installation & Bookmark Prompt Styles */

/* PWA Install Prompt */
.pwa-install-prompt,
.pwa-bookmark-prompt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 350px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border: 1px solid rgba(238, 28, 70, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(238, 28, 70, 0.2);
  backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  pointer-events: none;
  display: block !important;
}

/* Debug: Force visibility for testing - REMOVED FOR PRODUCTION */

.pwa-install-prompt.show,
.pwa-bookmark-prompt.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Prompts are hidden by default, shown with .show class */

/* iOS Installation Guide Styles */
.pwa-ios-instructions {
  padding: 1rem 0;
  max-height: 60vh;
  overflow-y: auto;
}

/* Android Installation Guide Styles */
.pwa-android-instructions {
  padding: 1rem 0;
  max-height: 60vh;
  overflow-y: auto;
}

.ios-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 4px solid #ee1c46;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ee1c46 0%, #ff6b35 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-content h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 16px;
}

.step-content p {
  color: #b0b0b0;
  margin: 0;
  line-height: 1.4;
  font-size: 14px;
}

.ios-benefits {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(238, 28, 70, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(238, 28, 70, 0.2);
}

.ios-benefits h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 16px;
}

.ios-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ios-benefits li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #b0b0b0;
  font-size: 14px;
}

.ios-benefits li i {
  color: #28a745;
  margin-right: 0.5rem;
  font-size: 16px;
}

/* Android Step Styles */
.android-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 4px solid #4CAF50;
}

.android-benefits {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.android-benefits h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 16px;
}

.android-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.android-benefits li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #b0b0b0;
  font-size: 14px;
}

.android-benefits li i {
  color: #28a745;
  margin-right: 0.5rem;
  font-size: 16px;
}

.pwa-prompt-content {
  padding: 20px;
  color: #ffffff;
}

.pwa-prompt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ee1c46 0%, #ff6b35 100%);
  border-radius: 50%;
  margin-bottom: 15px;
  font-size: 24px;
  color: white;
  box-shadow: 0 8px 20px rgba(238, 28, 70, 0.4);
}

.pwa-prompt-text h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pwa-prompt-text p {
  font-size: 14px;
  color: #b0b0b0;
  margin-bottom: 20px;
  line-height: 1.4;
}

.pwa-prompt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pwa-prompt-actions .btn {
  flex: 1;
  min-width: 80px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pwa-prompt-actions .btn-primary {
  background: linear-gradient(135deg, #ee1c46 0%, #ff6b35 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(238, 28, 70, 0.3);
}

.pwa-prompt-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(238, 28, 70, 0.4);
  background: linear-gradient(135deg, #d0163a 0%, #e55a2b 100%);
}

.pwa-prompt-actions .btn-outline-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #b0b0b0;
  backdrop-filter: blur(10px);
}

.pwa-prompt-actions .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Toast Notifications */
.pwa-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  color: white;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.pwa-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.pwa-toast-success {
  border-left: 4px solid #28a745;
}

.pwa-toast-error {
  border-left: 4px solid #dc3545;
}

.pwa-toast-info {
  border-left: 4px solid #17a2b8;
}

/* Modal Styles */
.pwa-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pwa-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.pwa-modal-content {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border: 1px solid rgba(238, 28, 70, 0.3);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow: visible;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.pwa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pwa-modal-header h4 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.pwa-modal-close {
  background: none;
  border: none;
  color: #b0b0b0;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.pwa-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.pwa-modal-body {
  padding: 20px;
  color: #b0b0b0;
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
  max-height: calc(80vh - 140px);
}

.pwa-modal-body h5 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 16px;
}

.pwa-modal-body p {
  margin-bottom: 10px;
  font-size: 14px;
}

.pwa-modal-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.pwa-modal-footer .btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pwa-install-prompt,
  .pwa-bookmark-prompt {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .pwa-prompt-actions {
    flex-direction: column;
  }
  
  .pwa-prompt-actions .btn {
    flex: none;
    width: 100%;
  }
  
  .pwa-toast {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .pwa-modal {
    padding: 10px;
  }
  
  .pwa-modal-content {
    max-height: 90vh;
    margin: 10px;
  }
  
  .pwa-modal-body {
    max-height: calc(90vh - 140px);
    padding: 15px;
  }
  
  .pwa-ios-instructions {
    max-height: 50vh;
  }
}

@media (max-width: 480px) {
  .pwa-prompt-content {
    padding: 15px;
  }
  
  .pwa-prompt-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 10px;
  }
  
  .pwa-prompt-text h4 {
    font-size: 16px;
  }
  
  .pwa-prompt-text p {
    font-size: 13px;
  }
  
  .pwa-prompt-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Animation keyframes */
@keyframes pwa-prompt-slide-in {
  from {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pwa-toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .pwa-install-prompt,
  .pwa-bookmark-prompt,
  .pwa-toast {
    transition: opacity 0.3s ease;
  }
  
  .pwa-install-prompt.show,
  .pwa-bookmark-prompt.show {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .pwa-install-prompt,
  .pwa-bookmark-prompt {
    border: 2px solid #ffffff;
    background: #000000;
  }
  
  .pwa-prompt-text h4,
  .pwa-prompt-text p {
    color: #ffffff;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pwa-install-prompt,
  .pwa-bookmark-prompt {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  }
}
