/* ================================================
   PWA INSTALL BANNER - ANDROID STYLE
   Matches the clean Android install prompt design
   ================================================ */

/* Android/Chrome Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 99999;
  display: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.pwa-install-banner.show {
  display: flex;
}

.pwa-install-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.pwa-install-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* App Icon */
.pwa-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: white;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Text Content */
.pwa-install-text {
  flex: 1;
  min-width: 0;
}

.pwa-install-text h6 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.pwa-install-text p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
}

/* Action Buttons */
.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-btn-install {
  background: #5D4CDA;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pwa-btn-install:hover {
  background: #4a3db8;
  transform: translateY(-1px);
}

.pwa-btn-install:active {
  transform: translateY(0);
}

.pwa-btn-dismiss {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.pwa-btn-dismiss:hover {
  color: #ffffff;
}

/* ================================================
   iOS INSTALL BANNER - MATCHES ANDROID STYLE
   ================================================ */
.ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 99999;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.ios-install-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.ios-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: nowrap;
  width: 100%;
}

.ios-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: white;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ios-install-text {
  flex: 1;
  min-width: 150px;
}

.ios-install-text h6 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.ios-install-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* iOS Share Icon SVG */
.ios-share-svg {
  display: inline-block;
  vertical-align: middle;
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.15);
  padding: 3px;
  border-radius: 4px;
  width: 22px;
  height: 22px;
}

/* iOS Action Buttons - Match Android */
.ios-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ios-got-it-btn {
  background: #5D4CDA;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ios-got-it-btn:hover {
  background: #4a3db8;
  transform: translateY(-1px);
}

.ios-got-it-btn:active {
  transform: translateY(0);
}

.ios-dismiss-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.ios-dismiss-btn:hover {
  color: #ffffff;
}

/* iOS specific - smaller screens */
@media (max-width: 480px) {
  .ios-install-banner {
    padding: 14px 12px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  
  .ios-install-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .ios-app-icon {
    width: 44px;
    height: 44px;
    padding: 4px;
  }

  .ios-install-text {
    width: 100%;
    min-width: unset;
  }
  
  .ios-install-text h6 {
    font-size: 15px;
    white-space: normal;
    word-wrap: break-word;
  }
  
  .ios-install-text p {
    font-size: 12px;
    white-space: normal;
    word-wrap: break-word;
  }

  .ios-install-actions {
    width: 100%;
    margin-top: 4px;
    justify-content: stretch;
    gap: 10px;
  }

  .ios-got-it-btn {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
  }
  
  .ios-dismiss-btn {
    padding: 12px 14px;
  }
}

/* ================================================
   LEGACY SUPPORT (old class names)
   ================================================ */
.install-prompt {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 99999;
  display: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.install-prompt-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-prompt-icon {
  font-size: 32px;
}

.install-prompt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.install-prompt-text strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.install-prompt-text span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.install-prompt-actions {
  display: flex;
  gap: 8px;
}

.install-btn {
  background: #5D4CDA;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.install-btn:hover {
  background: #4a3db8;
}

.dismiss-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.dismiss-btn:hover {
  color: #ffffff;
}

/* ================================================
   MOBILE RESPONSIVE
   ================================================ */
@media (max-width: 480px) {
  .pwa-install-content,
  .install-prompt-content {
    flex-wrap: wrap;
  }

  .pwa-install-actions,
  .install-prompt-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .pwa-btn-install,
  .install-btn {
    flex: 1;
    text-align: center;
  }

  .ios-install-content {
    flex-wrap: nowrap;
  }
}

/* ================================================
   ANIMATION KEYFRAMES
   ================================================ */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}
