/* ==========================================================================
   GLOBAL INTERNET CONNECTION STATUS & OFFLINE VIEW STYLES
   ========================================================================== */

/* --- Floating Status Pill / Banner --- */
.net-status-banner {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 50px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 90vw;
}

.net-status-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Offline State (Banner) */
.net-status-banner.offline {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
  color: #ffffff;
  border: 1px solid rgba(254, 202, 202, 0.3);
}

/* Online State (Banner) */
.net-status-banner.online {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  color: #ffffff;
  border: 1px solid rgba(167, 243, 208, 0.3);
}

/* Status Indicator Dot */
.net-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.net-status-banner.offline .net-status-dot {
  background-color: #fca5a5;
  box-shadow: 0 0 0 0 rgba(252, 165, 165, 0.7);
  animation: net-pulse-red 1.8s infinite;
}

.net-status-banner.online .net-status-dot {
  background-color: #a7f3d0;
  box-shadow: 0 0 0 0 rgba(167, 243, 208, 0.7);
  animation: net-pulse-green 1.8s infinite;
}

@keyframes net-pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(254, 202, 202, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(254, 202, 202, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(254, 202, 202, 0); }
}

@keyframes net-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(167, 243, 208, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(167, 243, 208, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(167, 243, 208, 0); }
}

.net-status-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.net-status-title {
  font-weight: 600;
  font-size: 13.5px;
}

.net-status-subtitle {
  font-size: 11px;
  opacity: 0.88;
}

.net-banner-btn {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.net-banner-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.04);
}

.net-banner-btn:active {
  transform: scale(0.96);
}


/* ==========================================================================
   FULL SCREEN MODERN OFFLINE VIEW / OVERLAY
   ========================================================================== */

.net-offline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

.net-offline-overlay.active {
  opacity: 1;
  visibility: visible;
}

.net-offline-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

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

/* Card Top Accent Bar */
.net-offline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ef4444, #f97316, #e11d48);
}

/* Animated Radar Icon */
.net-icon-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  border-radius: 50%;
  color: #dc2626;
}

.net-icon-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #ef4444;
  opacity: 0.6;
  animation: net-radar 2.2s infinite ease-out;
}

.net-icon-pulse:nth-child(2) {
  animation-delay: 0.7s;
}

@keyframes net-radar {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.net-offline-icon {
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 2;
  stroke: #dc2626;
}

/* Titles */
.net-offline-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.net-offline-title-ta {
  font-size: 15px;
  font-weight: 600;
  color: #dc2626;
  margin: 0 0 12px;
}

.net-offline-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 22px;
}

/* Troubleshooting Tips Box */
.net-tips-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.net-tips-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.net-tips-list {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.6;
}

.net-tips-list li {
  margin-bottom: 4px;
}

/* Action Buttons */
.net-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.net-retry-btn {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.net-retry-btn:hover {
  background: linear-gradient(135deg, #be123c, #9f1239);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.net-retry-btn:active {
  transform: translateY(0);
}

.net-retry-btn.loading {
  opacity: 0.85;
  pointer-events: none;
}

.net-retry-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: net-spin 0.8s linear infinite;
}

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

.net-retry-btn.loading .net-btn-icon {
  display: none;
}

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

.net-dismiss-btn {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.net-dismiss-btn:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
}

/* Auto-reconnect Countdown status */
.net-auto-check {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.net-auto-check-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: net-blink 1.2s infinite;
}

@keyframes net-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Responsive adjust */
@media (max-width: 576px) {
  .net-status-banner {
    width: 92%;
    top: 12px;
    padding: 8px 14px;
  }
  .net-offline-card {
    padding: 26px 20px;
    border-radius: 20px;
  }
  .net-icon-wrapper {
    width: 76px;
    height: 76px;
    margin-bottom: 16px;
  }
  .net-offline-icon {
    width: 36px;
    height: 36px;
  }
  .net-offline-title {
    font-size: 19px;
  }
}
