/* ==========================================================================
   NIEdge PWA Install Floating Button & Modal Styles
   ========================================================================== */

/* Floating Action Button (FAB) in Bottom-Right */
.pwa-fab-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.pwa-fab-wrapper.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.8);
}

.pwa-fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #11151f 0%, #1e2638 100%);
  color: #ffc107;
  border: 1.5px solid rgba(255, 193, 7, 0.4);
  padding: 12px 20px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 193, 7, 0.2);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-fab-btn:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #ffc107;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 193, 7, 0.4);
  background: linear-gradient(135deg, #182030 0%, #26324a 100%);
  color: #ffffff;
}

.pwa-fab-icon-box {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #11151f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.4);
  animation: pwaPulse 2.5s infinite;
}

@keyframes pwaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

/* Tooltip Badge for 10-sec Attention Callout */
.pwa-fab-badge {
  position: absolute;
  top: -38px;
  right: 0;
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #11151f;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 193, 7, 0.35);
  animation: pwaBounce 1s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.pwa-fab-badge::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ff8f00;
}

@keyframes pwaBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Modal Overlay / Backdrop */
.pwa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.pwa-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialogue Box */
.pwa-modal-card {
  background: #151a26;
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 28px 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 193, 7, 0.15);
  position: relative;
  transform: scale(0.88) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
}

.pwa-modal-overlay.active .pwa-modal-card {
  transform: scale(1) translateY(0);
}

/* Close Button */
.pwa-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0aec0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.pwa-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Modal Header */
.pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.pwa-modal-logo-container {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.pwa-modal-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.pwa-modal-header-text h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.pwa-modal-header-text p {
  font-size: 0.78rem;
  color: #ffc107;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2px 0 0;
}

/* One-liner Description */
.pwa-modal-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Feature List Cards */
.pwa-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pwa-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.pwa-feature-item:hover {
  background: rgba(255, 193, 7, 0.06);
  border-color: rgba(255, 193, 7, 0.2);
}

.pwa-feature-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.pwa-feature-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 2px 0;
}

.pwa-feature-content p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

/* Action Buttons */
.pwa-modal-actions {
  display: flex;
  gap: 12px;
}

.pwa-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #11151f;
  border: none;
  padding: 13px 18px;
  border-radius: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(255, 193, 7, 0.35);
  transition: all 0.25s ease;
}

.pwa-btn-primary:hover {
  box-shadow: 0 12px 28px rgba(255, 193, 7, 0.5);
  transform: translateY(-2px);
}

.pwa-btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 13px 18px;
  border-radius: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pwa-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .pwa-fab-wrapper {
    bottom: 16px;
    right: 16px;
  }
  .pwa-fab-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  .pwa-fab-btn span.btn-text {
    display: none; /* Icon-only compact pill on tiny screens if needed */
  }
  .pwa-fab-btn {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
  }
  .pwa-modal-card {
    padding: 22px 18px;
  }
  .pwa-modal-actions {
    flex-direction: column;
  }
}
