/* PWA Installation Button Styles */
.pwa-install-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(90deg, #00bcd4 0%, #1de9b6 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-weight: bold;
  display: none; /* Hidden by default, shown when install is available */
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  max-width: calc(100% - 40px); /* Prevent overflow on small screens */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-install-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.pwa-install-button:active {
  transform: translateY(0);
}

/* Animation for the install button */
@keyframes pwaButtonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
}

.pwa-button-animate {
  animation: pwaButtonPulse 1.5s ease-in-out infinite;
}

.pwa-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 18px;
  border-radius: 50%;
  margin-left: 8px;
  cursor: pointer;
  color: white;
  line-height: 1;
  flex-shrink: 0; /* Prevent shrinking when space is limited */
}

/* iOS specific button style */
.ios-install-button {
  background: linear-gradient(90deg, #007aff 0%, #5ac8fa 100%);
}

/* iOS Installation Modal */
.pwa-install-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  max-width: 90%;
  width: 320px;
}

.pwa-install-modal-content {
  background: #181a1b;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid #00bcd4;
}

.pwa-install-modal-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #00bcd4;
  text-align: center;
}

.pwa-install-modal-content p {
  margin-bottom: 12px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pwa-install-modal-content i {
  color: #00bcd4;
  margin: 0 3px;
}

.pwa-install-modal-close {
  background: linear-gradient(90deg, #00bcd4 0%, #1de9b6 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: bold;
  margin-top: 16px;
  display: block;
  width: 100%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.pwa-install-modal-close:hover {
  background: linear-gradient(90deg, #00acc1 0%, #1ad1a3 100%);
}

/* For smaller screens, adapt the button style */
@media (max-width: 768px) {
  .pwa-install-button {
    bottom: 20px;
    right: 20px;
    font-size: 16px;
    padding: 14px 22px;
    /* Increase visibility on mobile */
    background: linear-gradient(90deg, #00bcd4 0%, #1de9b6 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
  
  /* Make icons more visible */
  .pwa-install-button i {
    font-size: 18px;
  }
}

@media (max-width: 576px) {
  .pwa-install-button {
    bottom: 20px;
    right: 20px;
    font-size: 15px;
    padding: 13px 20px;
    max-width: calc(100% - 40px);
    /* Make button more obvious */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    /* Add a subtle border to stand out more */
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .pwa-install-modal-content {
    padding: 20px;
  }
  
  .pwa-install-modal-content h3 {
    font-size: 1.2rem;
  }
  
  .pwa-install-modal-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  /* Adjust position for very small screens */
  .pwa-install-button {
    bottom: 65px; /* Move higher to avoid bottom navigation bars */
    font-weight: 600;
    padding: 12px 18px;
  }
}

@media (max-width: 380px) {
  .pwa-install-button {
    bottom: 60px;
    right: 15px;
    font-size: 14px;
    padding: 12px 16px;
    max-width: calc(100% - 30px);
  }
  
  .pwa-close-btn {
    width: 16px;
    height: 16px;
    font-size: 16px;
  }
  
  .pwa-install-modal {
    width: 300px;
  }
  
  .pwa-install-modal-content {
    padding: 16px;
  }
  
  .pwa-install-modal-content h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  
  .pwa-install-modal-content p {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }
  
  .pwa-install-modal-close {
    padding: 8px 20px;
    font-size: 14px;
  }
}

/* Add styles for Safari on iOS */
@supports (-webkit-touch-callout: none) {
  .pwa-install-button {
    bottom: 80px; /* Higher position to avoid Safari bottom bar */
    padding: 12px 20px;
    font-weight: 600;
  }
} 