.ehai-app-update-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.ehai-app-update-button {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(23, 61, 48, 0.15);
  border-radius: 999px;
  color: #315d4d;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(23, 61, 48, 0.07);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ehai-app-update-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ehai-app-update-button:hover {
  border-color: rgba(23, 132, 94, 0.34);
  color: #0e694b;
  background: #f4fbf7;
  box-shadow: 0 11px 26px rgba(23, 61, 48, 0.11);
  transform: translateY(-1px);
}

.ehai-app-update-button:active {
  transform: translateY(0) scale(0.98);
}

.ehai-app-update-button:focus-visible {
  outline: 3px solid rgba(105, 215, 172, 0.28);
  outline-offset: 2px;
}

.ehai-app-update-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.ehai-app-update-button[data-state="checking"] svg {
  animation: ehai-update-spin 700ms linear infinite;
}

.ehai-app-update-status {
  position: fixed;
  top: 84px;
  right: 22px;
  z-index: 12000;
  width: min(360px, calc(100vw - 28px));
  padding: 13px 15px;
  border: 1px solid rgba(23, 61, 48, 0.12);
  border-radius: 13px;
  color: #315d4d;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 50px rgba(23, 61, 48, 0.16);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  backdrop-filter: blur(18px);
}

.ehai-app-update-status:empty {
  display: none;
}

.ehai-app-update-status[data-tone="error"] {
  border-color: rgba(176, 74, 58, 0.2);
  color: #984537;
  background: rgba(255, 249, 247, 0.98);
}

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

@media (max-width: 620px) {
  .ehai-app-update-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .ehai-app-update-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ehai-app-update-status {
    top: 72px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ehai-app-update-button,
  .ehai-app-update-button svg {
    transition: none;
    animation-duration: 1ms !important;
  }
}
