/* Native Systems ERP Offline Overlay Styles */

.offline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.offline-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.offline-card {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 35px 25px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(0) scale(1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.offline-overlay.hidden .offline-card {
  transform: translateY(20px) scale(0.95);
}

.offline-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-icon-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.2);
  animation: pulse-border 2s infinite ease-out;
}

@keyframes pulse-border {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.offline-icon {
  color: #ef4444;
  font-size: 32px;
}

.offline-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

.offline-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 25px;
}

/* Spinner dots */
.offline-spinner {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 25px;
}

.offline-spinner span {
  width: 8px;
  height: 8px;
  background-color: #6366f1;
  border-radius: 50%;
  animation: wave 1.2s infinite ease-in-out;
}

.offline-spinner span:nth-child(2) {
  animation-delay: 0.2s;
}

.offline-spinner span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.offline-btn {
  background: #6366f1;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.offline-btn:active {
  transform: translateY(1px);
}

.offline-btn.loading {
  background: #312e81;
  color: #a5b4fc;
  cursor: not-allowed;
  pointer-events: none;
}

.offline-btn .btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: btn-spin 0.8s linear infinite;
}

.offline-btn.loading .btn-spinner {
  display: inline-block;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
