/* SealPOS offline POS — Online / Offline text indicator + queue badge */

#sealposNetStatus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  padding: 0.35rem 0.75rem;
  width: auto;
  min-width: 0;
  height: auto;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

#sealposNetStatus .sealpos-net-icon {
  display: none !important;
}

#sealposNetStatus .sealpos-net-text {
  display: inline;
}

#sealposNetStatus .sealpos-net-queue-badge {
  display: none;
  align-items: center;
  justify-content: center;
  position: static;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px #fff;
}

#sealposNetStatus.is-online {
  background: #d1fae5;
  color: #065f46;
}

#sealposNetStatus.is-online.has-queue .sealpos-net-queue-badge {
  display: inline-flex;
  background: #f59e0b;
  color: #fff;
}

#sealposNetStatus.is-offline {
  background: #fee2e2;
  color: #991b1b;
  animation: sealpos-net-pulse 1.2s ease-in-out infinite;
}

#sealposNetStatus.is-offline.has-queue .sealpos-net-queue-badge {
  display: inline-flex;
  background: #dc2626;
  color: #fff;
}

#sealposNetStatus.has-queue-click {
  cursor: pointer;
}

@keyframes sealpos-net-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.sealpos-login-net {
  margin: 0;
  max-width: none;
  width: auto;
  height: auto;
}

.sealpos-offline-queue-row {
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.sealpos-offline-queue-row.status-failed {
  border-color: #fca5a5;
  background: #fef2f2;
}

.sealpos-offline-queue-row.status-synced {
  border-color: #86efac;
  background: #f0fdf4;
}

.sealpos-offline-queue-row.status-pending,
.sealpos-offline-queue-row.status-syncing {
  border-color: #fcd34d;
  background: #fffbeb;
}

/* Non-Swal toasts — must not dismiss SweetAlert2 modals (low stock, etc.) */
.sealpos-toast-host {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 1.5rem));
}

.sealpos-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.sealpos-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sealpos-toast-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 1rem;
}

.sealpos-toast-text {
  flex: 1;
  min-width: 0;
}

.sealpos-toast--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}

.sealpos-toast--success .sealpos-toast-icon {
  color: #047857;
}

.sealpos-toast--error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
}

.sealpos-toast--error .sealpos-toast-icon {
  color: #dc2626;
}

.sealpos-toast--warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #78350f;
}

.sealpos-toast--warning .sealpos-toast-icon {
  color: #d97706;
}

.sealpos-toast--info {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #0b1730;
}

.sealpos-toast--info .sealpos-toast-icon {
  color: #047857;
}
