/* ============================================================
   Saei Tech - Universal PWA Installation UI Components v2.5.0
   ============================================================ */

.saei-pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 1. Dashboard Topbar PWA Button */
.dashboard-pwa-btn {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.08) 0%, rgba(212, 175, 55, 0.15) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  color: var(--primary, #064e3b);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dashboard-pwa-btn:hover {
  background: linear-gradient(135deg, var(--primary, #064e3b) 0%, #0F4523 100%);
  color: #FFFFFF !important;
  border-color: var(--primary, #064e3b);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.25);
}

.dashboard-pwa-btn .pwa-btn-icon {
  font-size: 15px;
  color: var(--secondary, #d4af37);
  transition: color 0.28s;
}

.dashboard-pwa-btn:hover .pwa-btn-icon {
  color: #d4af37;
}

@media (max-width: 600px) {
  .dashboard-pwa-btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  .dashboard-pwa-btn .pwa-btn-label {
    display: none;
  }
}

/* 2. Public Footer Luxury PWA Widget */
.saei-footer-pwa-box {
  margin-top: 18px;
}

.footer-pwa-btn {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, rgba(22, 93, 49, 0.06) 0%, rgba(212, 175, 55, 0.12) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--saei-text-main, #0f172a);
  text-align: right;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.footer-pwa-btn:hover {
  background: linear-gradient(135deg, var(--saei-primary, #064e3b) 0%, #0F4523 100%);
  border-color: var(--saei-secondary, #d4af37);
  color: #FFFFFF !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.22);
}

.footer-pwa-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saei-primary, #064e3b) 0%, var(--saei-secondary, #d4af37) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
  transition: transform 0.28s;
}

.footer-pwa-btn:hover .footer-pwa-icon {
  background: #FFFFFF;
  color: var(--saei-primary, #064e3b);
  transform: scale(1.08);
}

.footer-pwa-text {
  flex-grow: 1;
}

.footer-pwa-btn:hover .pwa-btn-sub {
  color: rgba(255, 255, 255, 0.85);
}

/* 3. PWA Installation Guidance Modal */
.saei-pwa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  direction: rtl;
  animation: pwaFadeIn 0.25s ease;
}

.saei-pwa-modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 30px 26px;
  position: relative;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid rgba(22, 93, 49, 0.15);
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.saei-pwa-modal-close {
  position: absolute;
  top: 14px;
  left: 16px;
  background: rgba(15, 23, 42, 0.06);
  border: none;
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}

.saei-pwa-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.saei-pwa-modal-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.1) 0%, rgba(212, 175, 55, 0.18) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}

.pwa-step-num {
  width: 24px;
  height: 24px;
  background: var(--saei-primary, #064e3b);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.pwa-step-txt {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

.saei-pwa-modal-btn {
  background: linear-gradient(135deg, var(--saei-primary, #064e3b) 0%, #0F4523 100%);
  color: #FFFFFF;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.25);
  transition: all 0.2s;
}

.saei-pwa-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.35);
}

/* 4. PWA Toast */
.saei-pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 99999999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  pointer-events: none;
}

.saei-pwa-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

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

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