#restore-offline-status {
  position: fixed;
  z-index: 2147483000;
  inset-inline: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 170, 77, 0.45);
  border-radius: 18px;
  color: #f8f1df;
  background: rgba(20, 21, 24, 0.97);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: Heebo, Arial, sans-serif;
  direction: inherit;
}

#restore-offline-status[hidden] {
  display: none !important;
}

#restore-offline-status .restore-offline-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #e4aa45;
  box-shadow: 0 0 13px rgba(228, 170, 69, 0.75);
}

#restore-offline-status[data-state='offline'] .restore-offline-dot,
#restore-offline-status[data-state='pending'] .restore-offline-dot {
  background: #f1b84b;
}

#restore-offline-status[data-state='syncing'] .restore-offline-dot {
  background: #79bfff;
  animation: restore-offline-pulse 1s ease-in-out infinite;
}

#restore-offline-status[data-state='success'] {
  border-color: rgba(65, 211, 143, 0.5);
}

#restore-offline-status[data-state='success'] .restore-offline-dot {
  background: #41d38f;
  box-shadow: 0 0 13px rgba(65, 211, 143, 0.75);
}

#restore-offline-status[data-state='error'] {
  border-color: rgba(255, 122, 122, 0.55);
}

#restore-offline-status[data-state='error'] .restore-offline-dot {
  background: #ff7a7a;
  box-shadow: 0 0 13px rgba(255, 122, 122, 0.65);
}

#restore-offline-status .restore-offline-message {
  min-width: 0;
  font-size: clamp(14px, 3.8vw, 16px);
  line-height: 1.35;
  text-align: start;
}

#restore-offline-status .restore-offline-sync {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(229, 187, 92, 0.5);
  border-radius: 12px;
  color: #17130b;
  background: linear-gradient(135deg, #f5d783, #d6a842);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#restore-offline-status .restore-offline-sync[hidden] {
  display: none;
}

@keyframes restore-offline-pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

@media (max-width: 480px) {
  #restore-offline-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #restore-offline-status .restore-offline-sync:not([hidden]) {
    grid-column: 1 / -1;
    width: 100%;
  }
}
