/* Nexfood PWA Native Push Notifications & iOS Guide Styles */

/* Header / Nav Push Broadcast Button */
.pwa-header-push-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Pulsating Status Indicator Dot */
.pwa-push-status-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  pointer-events: none;
  transition: all 0.3s ease;
}

[dir="rtl"] .pwa-push-status-dot {
  right: auto;
  left: 1px;
}

/* Status colors */
.pwa-push-status-dot.active {
  background: #10b981; /* Emerald green */
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pwa-pulse 2s infinite;
}

.pwa-push-status-dot.prompt {
  background: #f59e0b; /* Amber */
}

.pwa-push-status-dot.needs-install {
  background: #6366f1; /* Indigo */
}

.pwa-push-status-dot.denied {
  background: #ef4444; /* Red */
}

.pwa-push-status-dot.unsupported {
  background: #94a3b8; /* Slate */
}

@keyframes pwa-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Modal Overlay & Backdrop */
.pwa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Modal Card */
.pwa-modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transform: scale(0.92) translateY(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pwa-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

[dir="rtl"] .pwa-modal-close {
  right: auto;
  left: 16px;
}

.pwa-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal Header */
.pwa-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.pwa-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #008037 0%, #10b981 100%);
  color: #ffffff;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 128, 55, 0.35);
}

.pwa-icon-badge.live-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.pwa-live-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

.pwa-modal-header h3 {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

.pwa-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Steps List (iOS Guide) */
.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

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

.pwa-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #008037;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-step-content strong {
  font-size: 13px;
  color: #1e293b;
}

.pwa-step-content span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Features Grid (Live Announcement) */
.pwa-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 480px) {
  .pwa-features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pwa-feature-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pwa-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-feature-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

.text-emerald { color: #10b981; }
.text-blue { color: #3b82f6; }
.text-purple { color: #8b5cf6; }
.text-amber { color: #f59e0b; }

/* Buttons & Actions */
.pwa-action-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pwa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.pwa-btn-wide {
  width: 100%;
}

.pwa-btn-primary {
  background: linear-gradient(135deg, #008037 0%, #10b981 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 128, 55, 0.3);
}

.pwa-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 128, 55, 0.4);
}

.pwa-btn-secondary {
  background: #0f172a;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.pwa-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
}

/* Floating Toast Alerts */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 100060;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
  text-align: center;
}

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

/* Mobile Dock & Menu Specifics */
.modern-floating-dock .pwa-header-push-btn .pwa-push-status-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border-width: 1.5px;
  border-color: #121212;
}

[dir="rtl"] .modern-floating-dock .pwa-header-push-btn .pwa-push-status-dot {
  right: auto;
  left: 3px;
}

.hc-offcanvas-nav .bottom-nav li.notifications a {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.hc-offcanvas-nav .bottom-nav li.notifications i {
  color: #10b981 !important;
}

/* PWA Notification Status Inspection & Test Center */
.pwa-test-center-card {
  max-width: 520px;
}

.pwa-ios-helper-box {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: right;
}
[dir="ltr"] .pwa-ios-helper-box {
  text-align: left;
}

.pwa-status-inspection-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.pwa-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
}

.pwa-status-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pwa-status-label-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-status-label-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.pwa-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pwa-status-badge.allowed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.pwa-status-badge.blocked {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.pwa-status-badge.pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.pwa-status-badge.warning {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fde047;
}

/* Test Result Alert Output Box */
.pwa-test-result-box {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 14px;
  text-align: center;
  box-sizing: border-box;
  animation: pwaFadeIn 0.3s ease;
}

@keyframes pwaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-test-result-box.info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.pwa-test-result-box.success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  font-weight: 700;
}

.pwa-test-result-box.warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #b45309;
}

.pwa-test-result-box.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.pwa-btn-outline {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155 !important;
}

.pwa-btn-outline:hover {
  background: #f8fafc;
  color: #0f172a !important;
}


