/* Insaf Boost PWA Install Banner Popup Styling */
#pwa-install-popup-wrap {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
  visibility: hidden;
  z-index: 9999999;
  width: calc(100% - 32px);
  max-width: 440px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

#pwa-install-popup-wrap.pwa-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.pwa-popup-card {
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  box-sizing: border-box;
}

.pwa-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pwa-popup-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.pwa-popup-icon-box {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: #1E293B;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pwa-popup-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
  display: block;
}

.pwa-popup-text {
  flex: 1;
}

.pwa-popup-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.pwa-popup-desc {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.35;
  font-weight: 400;
}

.pwa-popup-close-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #1E293B;
  border: 1px solid #334155;
  color: #94A3B8;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  outline: none;
}

.pwa-popup-close-btn:hover {
  background: #334155;
  color: #FFFFFF;
}

.pwa-popup-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.pwa-btn-download {
  flex: 1;
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
  outline: none;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.pwa-btn-download:hover {
  background: #3B82F6;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.pwa-btn-later {
  flex: 1;
  background: #1E293B;
  border: 1px solid #334155;
  color: #94A3B8;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.pwa-btn-later:hover {
  background: #334155;
  color: #FFFFFF;
}

/* iOS Instruction Modal */
#pwa-ios-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 99999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#pwa-ios-modal.pwa-show {
  opacity: 1;
  visibility: visible;
}

.pwa-ios-card {
  background: #0F172A;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  border-top: 1px solid #334155;
  box-sizing: border-box;
}

.pwa-ios-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pwa-ios-steps {
  text-align: left;
  margin: 16px 0;
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.6;
  padding-left: 20px;
}

.pwa-ios-steps li {
  margin-bottom: 10px;
}

.pwa-ios-close {
  width: 100%;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s ease;
}

.pwa-ios-close:hover {
  background: #3B82F6;
}

@media (max-width: 480px) {
  #pwa-install-popup-wrap {
    bottom: 16px;
    width: calc(100% - 24px);
  }
  .pwa-popup-card {
    padding: 16px;
  }
  .pwa-popup-title {
    font-size: 17px;
  }
  .pwa-popup-desc {
    font-size: 12.5px;
  }
}
