/* PWA Install Prompt Styles */
/* Matches MunchMap coral-red theme from app_theme.dart */

/* Android Banner Prompt */
.pwa-banner {
  position: fixed;
  bottom: -250px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
  color: #FFFFFF;
  box-shadow: 0 -8px 32px rgba(255, 107, 107, 0.3);
  z-index: 9999;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  backdrop-filter: blur(10px);
}

.pwa-banner.show {
  bottom: 0;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    bottom: -250px;
    opacity: 0;
  }
  to {
    bottom: 0;
    opacity: 1;
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.pwa-banner-icon {
  flex-shrink: 0;
  background: #FFFFFF;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-banner-icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.pwa-banner-text h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.15px;
  font-family: 'Roboto', sans-serif;
}

.pwa-banner-text p {
  margin: 0;
  font-size: 14px;
  color: #FFFFFF;
  opacity: 0.95;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.25px;
  font-family: 'Roboto', sans-serif;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pwa-install-btn {
  background: #FFFFFF;
  color: #FF6B6B;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  background: #FFF;
}

.pwa-install-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pwa-close-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* iOS Modal Prompt */
.pwa-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 45, 45, 0);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pwa-modal.show {
  background: rgba(45, 45, 45, 0.6);
  backdrop-filter: blur(4px);
}

.pwa-modal-content {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF7 100%);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 32px rgba(255, 107, 107, 0.2);
  border-top: 3px solid #FF6B6B;
}

.pwa-modal.show .pwa-modal-content {
  transform: translateY(0);
}

.pwa-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 20px;
  border-bottom: 2px solid #FFEEE8;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
  border-radius: 24px 24px 0 0;
}

.pwa-modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.15px;
  font-family: 'Roboto', sans-serif;
}

.pwa-modal-header .pwa-close-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  font-size: 28px;
  backdrop-filter: blur(5px);
}

.pwa-modal-header .pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.pwa-modal-body {
  padding: 28px 24px;
}

.pwa-modal-body p {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 400;
  color: #2D2D2D;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

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

.ios-instructions li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(135deg, #FFF5F2 0%, #FFFBF7 100%);
  border: 1px solid #FFE5DD;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 15px;
  color: #2D2D2D;
  line-height: 1.6;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.25px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.08);
  transition: all 0.2s ease;
}

.ios-instructions li:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.step-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.share-icon {
  display: inline-block;
  vertical-align: middle;
  margin: 0 6px;
  filter: drop-shadow(0 1px 2px rgba(0, 122, 255, 0.3));
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFE5DD 0%, #FFEEE8 100%);
  border: 1px solid #FFD4C7;
  border-radius: 8px;
  padding: 6px 10px;
  margin-left: 4px;
  box-shadow: 0 1px 4px rgba(255, 107, 107, 0.1);
}

.pwa-modal-footer {
  padding: 20px 24px 28px;
  border-top: 2px solid #FFEEE8;
  display: flex;
  justify-content: center;
  background: #FFFBF7;
}

.pwa-dismiss-btn {
  background: linear-gradient(135deg, #FFE5DD 0%, #FFEEE8 100%);
  color: #FF6B6B;
  border: 1px solid #FFD4C7;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
}

.pwa-dismiss-btn:hover {
  background: linear-gradient(135deg, #FFD4C7 0%, #FFE5DD 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .pwa-banner-content {
    padding: 16px 20px;
    gap: 12px;
  }

  .pwa-banner-icon {
    padding: 6px;
  }

  .pwa-banner-icon img {
    width: 48px;
    height: 48px;
  }

  .pwa-banner-text h3 {
    font-size: 16px;
  }

  .pwa-banner-text p {
    font-size: 13px;
  }

  .pwa-install-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .ios-instructions li {
    font-size: 14px;
    padding: 14px;
  }

  .pwa-modal-body {
    padding: 24px 20px;
  }
}

/* Landscape mode for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .pwa-modal-content {
    border-radius: 0;
    max-height: 100vh;
  }

  .pwa-modal {
    align-items: center;
  }

  .ios-instructions li {
    padding: 12px;
    margin-bottom: 10px;
  }

  .pwa-modal-body {
    padding: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pwa-modal-content {
    background: linear-gradient(180deg, #2D2D2D 0%, #1F1F1F 100%);
    border-top-color: #FF8E8E;
  }

  .pwa-modal-header {
    border-bottom-color: #404040;
  }

  .pwa-modal-body p {
    color: #E0E0E0;
  }

  .ios-instructions li {
    background: linear-gradient(135deg, #3A2A2A 0%, #2D2D2D 100%);
    border-color: #4A3535;
    color: #E0E0E0;
  }

  .pwa-modal-footer {
    border-top-color: #404040;
    background: #1F1F1F;
  }

  .pwa-dismiss-btn {
    background: linear-gradient(135deg, #4A3535 0%, #3A2A2A 100%);
    color: #FF8E8E;
    border-color: #5A4040;
  }

  .pwa-dismiss-btn:hover {
    background: linear-gradient(135deg, #5A4040 0%, #4A3535 100%);
  }
}

/* Special animation for install button */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
  }
  50% {
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
  }
}

.pwa-install-btn {
  animation: pulse 2s infinite;
}
