.network-status-alert {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: none;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  color: #111827;
  background: linear-gradient(180deg, rgba(48, 58, 70, 0.96), rgba(31, 38, 49, 0.96));
  backdrop-filter: blur(6px);
  font-family: "Poppins", sans-serif;
}

.network-status-alert.show {
  display: flex;
}

.network-status-alert.is-online {
  background:
    linear-gradient(180deg, rgba(6, 78, 59, 0.78), rgba(6, 95, 70, 0.86));
}

.network-status-alert[hidden] {
  display: none !important;
}

.network-status-alert-inner {
  display: grid;
  width: min(100%, 430px);
  min-width: 0;
  justify-items: center;
  gap: 10px;
  border: 1px solid rgba(230, 0, 0, 0.12);
  border-radius: 22px;
  padding: 34px 22px 24px;
  background: #ffffff;
  box-shadow:
    0 24px 70px rgba(3, 7, 18, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
}

.network-status-alert.is-online .network-status-alert-inner {
  border-color: rgba(16, 185, 129, 0.22);
}

.network-status-alert i {
  display: inline-flex;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  align-items: center;
  justify-content: center;
  border: 6px solid #fff1f1;
  border-radius: 50%;
  color: transparent;
  background: #e60000;
  box-shadow:
    0 0 0 10px rgba(230, 0, 0, 0.04),
    0 14px 32px rgba(230, 0, 0, 0.18);
  font-size: 0;
}

.network-status-alert.is-online i {
  border-color: #dcfce7;
  background: #10b981;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.2);
}

.network-status-alert strong,
.network-status-alert span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.network-status-alert strong {
  margin-top: 8px;
  color: #111827;
  font-size: clamp(23px, 6vw, 28px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0;
}

.network-status-alert span {
  max-width: 340px;
  margin-top: 10px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.32;
  font-weight: 700;
}

.network-status-retry {
  display: inline-flex;
  min-height: 46px;
  min-width: 150px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  color: #ffffff;
  background: #e60000;
  box-shadow: 0 14px 28px rgba(230, 0, 0, 0.16);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  margin-top: 8px;
}

.network-status-alert.is-online .network-status-retry {
  background: #10b981;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.2);
}

.network-status-retry:active {
  transform: translateY(1px);
}

html.dark-mode .network-status-alert-inner,
body.dark-mode .network-status-alert-inner {
  border-color: rgba(230, 0, 0, 0.12);
  background: #ffffff;
  box-shadow:
    0 30px 90px rgba(3, 7, 18, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.dark-mode .network-status-alert strong,
body.dark-mode .network-status-alert strong {
  color: #111827;
}

html.dark-mode .network-status-alert span,
body.dark-mode .network-status-alert span {
  color: #6b7280;
}

@media (max-width: 520px) {
  .network-status-alert-inner {
    width: min(100%, 360px);
    border-radius: 20px;
    padding: 30px 18px 22px;
  }

  .network-status-alert i {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .network-status-alert span {
    font-size: 14px;
  }

  .network-status-retry {
    min-width: 142px;
    min-height: 44px;
    font-size: 14px;
  }
}
