/* Sri Agencies - PWA Styles */

/* Header Install Button */
.pwa-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFD400 0%, #F59E0B 100%);
  color: #1C2333;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(255, 212, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.pwa-header-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 14px rgba(255, 212, 0, 0.45);
}
.pwa-header-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Floating Install Pill (Always accessible) */
.pwa-floating-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1C2333;
  color: #ffffff;
  padding: 8px 16px 8px 10px;
  border-radius: 9999px;
  border: 1.5px solid #FFD400;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 212, 0, 0.25);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 13px;
}
.pwa-floating-pill:hover {
  transform: translateY(-3px);
  background: #232c40;
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 212, 0, 0.4);
}
.pwa-floating-pill img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.pwa-floating-pill .pill-text {
  color: #f8fafc;
}
.pwa-floating-pill .pill-badge {
  background: #FFD400;
  color: #1C2333;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Floating Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(28, 35, 51, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 212, 0, 0.4);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 212, 0, 0.15);
  max-width: 380px;
  animation: pwaSlideUp 0.35s ease-out;
}
@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 212, 0, 0.3);
}
.pwa-banner-info {
  flex: 1;
  min-width: 0;
}
.pwa-banner-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}
.pwa-banner-desc {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
}
.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwa-btn-install {
  background: linear-gradient(135deg, #FFD400 0%, #F59E0B 100%);
  color: #1C2333;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.pwa-btn-install:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}
.pwa-btn-dismiss {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.pwa-btn-dismiss:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Modal Overlay & Card */
.pwa-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pwa-modal-card {
  position: relative;
  background: #1C2333;
  border: 1.5px solid rgba(255, 212, 0, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 212, 0, 0.15);
  animation: pwaZoomIn 0.25s ease-out;
  color: #ffffff;
}
@keyframes pwaZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.pwa-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pwa-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}
.pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.pwa-modal-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid #FFD400;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.pwa-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.pwa-modal-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0 0;
}
.pwa-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}
.pwa-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pwa-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFD400;
  color: #1C2333;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pwa-step-text {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
}
.pwa-step-text strong {
  color: #ffffff;
}
.pwa-modal-footer {
  text-align: right;
}
.pwa-modal-btn {
  background: #FFD400;
  color: #1C2333;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}
.pwa-modal-btn:hover {
  background: #f5cb00;
  transform: translateY(-1px);
}

/* Toast */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1C2333;
  color: #FFD400;
  border: 1px solid #FFD400;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pwa-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Hide all PWA Install UI when App is already installed or in Standalone mode
   ========================================================================== */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui), (display-mode: window-controls-overlay) {
  .pwa-install-trigger,
  .pwa-install-banner,
  .pwa-floating-pill,
  .pwa-install-trigger-wrapper,
  #pwaInstallBanner,
  #pwaFloatingPill,
  #pwaInstallHeaderBtn,
  #pwaInstallMobileBtn,
  #pwaInstructionModal {
    display: none !important;
  }
}

html.pwa-installed .pwa-install-trigger,
html.pwa-installed .pwa-install-banner,
html.pwa-installed .pwa-floating-pill,
html.pwa-installed .pwa-install-trigger-wrapper,
html.pwa-installed #pwaInstallBanner,
html.pwa-installed #pwaFloatingPill,
html.pwa-installed #pwaInstallHeaderBtn,
html.pwa-installed #pwaInstallMobileBtn,
html.pwa-installed #pwaInstructionModal {
  display: none !important;
}
