/**
 * pwa_installer.css - Styles for AssaySmarfs PWA installation UI and Update Notifications
 * Thematic consistency: Primary (#667eea), Secondary (#5a67d8).
 */

/* Hidden state for PWA install button when not applicable */
.pwa-install-hidden {
  display: none !important;
}

/* Nav icon specific pulse/highlight when installable */
#install-pwa-nav {
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}

#install-pwa-nav:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: scale(1.05);
}

#install-pwa-nav svg {
  color: #667eea;
}

/* Floating Update Available Banner / Toast */
.pwa-update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border-left: 4px solid #667eea;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 14px 20px;
  max-width: 420px;
  width: calc(100vw - 48px);
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-update-content {
  flex: 1;
}

.pwa-update-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 2px;
}

.pwa-update-text {
  font-size: 0.85rem;
  color: #718096;
  margin: 0;
  line-height: 1.4;
}

.pwa-update-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-btn-reload {
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.pwa-btn-reload:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.pwa-btn-dismiss {
  background: transparent;
  color: #a0aec0;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

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

/* Modal Overlay for iOS Add to Home Screen Instructions */
.pwa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pwaFadeIn 0.25s ease;
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-modal-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.pwa-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pwa-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pwa-modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.pwa-modal-close:hover {
  opacity: 1;
}

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

.pwa-steps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pwa-step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ebf4ff;
  color: #667eea;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-step-text {
  font-size: 0.925rem;
  color: #4a5568;
  line-height: 1.5;
  margin: 0;
}

.pwa-step-text strong {
  color: #2d3748;
}

.pwa-modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  justify-content: flex-end;
}

.pwa-btn-gotit {
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pwa-btn-gotit:hover {
  background: #5a67d8;
}

/* ==========================================================================
   Public Website Install Components (assaysmarfs.com)
   ========================================================================== */

/* Navbar Install Button */
.navbar-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #667eea;
  border: 1px solid #667eea;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.navbar-install-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.navbar-install-btn:hover {
  background: #667eea;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.25);
}

/* Hero Section Secondary Install Pill */
.btn-hero-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: #ffffff;
  color: #667eea;
  border: 1.5px solid #667eea;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn-hero-install svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn-hero-install:hover {
  background: #ebf4ff;
  border-color: #5a67d8;
  color: #5a67d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Dedicated Lab Benchtop Section (Landing Page) */
.benchtop-section {
  padding: 60px 0;
}

.benchtop-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e2e8f0;
  border-left: 6px solid #667eea;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

@media (max-width: 868px) {
  .benchtop-card {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 24px;
  }
}

.benchtop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ebf4ff;
  color: #4c51bf;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.benchtop-badge svg {
  width: 14px;
  height: 14px;
}

.benchtop-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.benchtop-desc {
  font-size: 1rem;
  color: #718096;
  line-height: 1.6;
  margin: 0 0 20px 0;
  max-width: 680px;
}

.benchtop-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.benchtop-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

.benchtop-feature-item svg {
  width: 18px;
  height: 18px;
  color: #38a169;
  flex-shrink: 0;
}

.benchtop-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-benchtop-install {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  white-space: nowrap;
}

.btn-benchtop-install svg {
  width: 20px;
  height: 20px;
}

.btn-benchtop-install:hover {
  background: #5a67d8;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5);
}

.benchtop-subtext {
  font-size: 0.75rem;
  color: #a0aec0;
  text-align: center;
  margin: 0;
}

/* Sibling selector & modifier safeguard: hide subtext whenever install trigger is hidden */
.btn-benchtop-install.pwa-install-hidden ~ .benchtop-subtext,
.benchtop-subtext.pwa-install-hidden {
  display: none !important;
}

/* Mobile & Tablet Smart Install Banner */
.pwa-smart-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 12px 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  animation: pwaSlideUp 0.3s ease;
}

.pwa-smart-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pwa-smart-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pwa-smart-info {
  min-width: 0;
}

.pwa-smart-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.pwa-smart-subtext {
  font-size: 0.775rem;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0 0;
}

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

.pwa-smart-btn-install {
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.pwa-smart-btn-install:hover {
  background: #5a67d8;
}

.pwa-smart-btn-close {
  background: transparent;
  border: none;
  color: #a0aec0;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.pwa-smart-btn-close:hover {
  color: #4a5568;
}

