/* Prompt shown when live has moved on to a newer build than this tab loaded.
   Anchored bottom-right rather than modal: a deploy usually lands while someone
   is halfway through a form, and a blocking overlay would cost them that work. */
.app-refresh {
  position: fixed;
  right: 16px;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  /* Under the PWA install sheet, over the sidebar, the record modal and the
     WhatsApp FAB. */
  z-index: 2147482900;
  max-width: calc(100% - 32px);
}

.app-refresh[hidden] {
  display: none !important;
}

.app-refresh-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 380px;
  max-width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  color: #1b2433;
  box-shadow: 0 16px 40px rgba(18, 24, 38, 0.28);
  border: 1px solid #d8dee8;
}

.app-refresh-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eaf3fa;
  color: #2e86c1;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
}

.app-refresh-text {
  flex: 1 1 auto;
  min-width: 0;
}

.app-refresh-text h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #1b2433;
}

.app-refresh-text p {
  margin: 0 0 12px;
  color: #5b6b7c;
  font-size: 13px;
  line-height: 1.45;
}

.app-refresh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-refresh-btn {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #2e86c1;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.app-refresh-link {
  height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #5b6b7c;
  font-size: 14px;
}

@media (max-width: 767px) {
  .app-refresh {
    right: 12px;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: none;
  }

  .app-refresh-card {
    width: 100%;
  }
}
