:root {
  --wpsh-border: #d0d7de;
  --wpsh-text: #1f2328;
  --wpsh-muted: #59636e;
  --wpsh-bg: #eef4ff;
  --wpsh-idle: #7d8590;
  --wpsh-work: #1e6fff;
  --wpsh-ok: #1a7f37;
  --wpsh-error: #cf222e;
  --wpsh-card-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.wpsh-status {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1 0 100%;
  align-self: stretch;
  clear: both;
  margin: 12px 0;
  border: 1px solid rgba(23, 43, 77, 0.10);
  border-left-width: 5px;
  border-radius: 16px;
  background:
    radial-gradient(140% 140% at 0% 0%, rgba(30, 111, 255, 0.10), transparent 52%),
    radial-gradient(90% 120% at 100% 0%, rgba(68, 208, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.96) 42%, var(--wpsh-bg));
  padding: 13px 14px 12px;
  box-shadow: var(--wpsh-card-shadow);
  overflow: hidden;
  backdrop-filter: blur(5px);
  animation: wpsh-status-enter 0.35s cubic-bezier(.2, .9, .2, 1);
}

.wpsh-status::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.55) 10%, rgba(255, 255, 255, 0.16) 32%, rgba(255, 255, 255, 0) 56%);
  opacity: 0.75;
}

.wpsh-status::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.75), rgba(255,255,255,0));
  pointer-events: none;
}

.wpsh-status__title {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--wpsh-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.wpsh-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--wpsh-idle);
  flex: 0 0 10px;
  box-shadow: 0 0 0 4px rgba(125, 133, 144, 0.12);
  position: relative;
}

.wpsh-status__dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.55);
  opacity: 0.85;
}

.wpsh-status__logo {
  width: auto;
  height: auto;
  max-height: 36px;
  max-width: 210px;
  object-fit: contain;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 8px;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
}

.wpsh-status__text {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--wpsh-muted);
}

.wpsh-status__bar {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 65%),
    linear-gradient(180deg, #e6ecf5, #dfe7f0);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.wpsh-status__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 80%);
  transform: translateX(-120%);
  opacity: 0;
}

.wpsh-status__bar > span {
  display: block;
  height: 100%;
  width: 28%;
  background: linear-gradient(90deg, #8d98a8 0%, #b0b9c6 50%, #8d98a8 100%);
  background-size: 200% 100%;
  transform: translateX(0);
  border-radius: 999px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  transition:
    width 0.7s cubic-bezier(.22, 1, .36, 1),
    transform 0.7s cubic-bezier(.22, 1, .36, 1),
    background 0.35s ease,
    opacity 0.25s ease;
}

.wpsh-status__actions {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  display: none;
  align-items: center;
  gap: 10px;
}

.wpsh-refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(207, 34, 46, 0.20);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255, 241, 242, 0.92));
  color: #cf222e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 0 rgba(31, 35, 40, 0.05),
    0 6px 14px rgba(207, 34, 46, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.wpsh-refresh-btn:hover {
  background: linear-gradient(180deg, #fff, #ffe6ea);
  border-color: rgba(207, 34, 46, 0.4);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(31, 35, 40, 0.05),
    0 10px 18px rgba(207, 34, 46, 0.12);
}

.wpsh-refresh-btn:active {
  transform: translateY(0);
}

.wpsh-refresh-btn__icon {
  font-size: 19px;
  line-height: 1;
  display: inline-block;
}

.wpsh-refresh-btn.is-spinning .wpsh-refresh-btn__icon {
  animation: wpsh-spin 0.65s linear;
}

.wpsh-assist-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.wpsh-nojs-card {
  display: block;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(207, 34, 46, 0.25);
  border-left: 5px solid #cf222e;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fff6f7 42%, #fff3f4);
  color: #1f2328;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 8px 20px rgba(207, 34, 46, 0.08);
}

.wpsh-nojs-card__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 30px;
  max-width: 180px;
  margin: 0 0 8px;
  object-fit: contain;
}

.wpsh-nojs-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.wpsh-nojs-card__reason {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5a1a1f;
}

/* no-js card is rendered only inside <noscript> blocks */

.wpsh-status--idle {
  border-left-color: var(--wpsh-idle);
}

.wpsh-status--idle .wpsh-status__dot {
  background: var(--wpsh-idle);
  box-shadow: 0 0 0 4px rgba(125, 133, 144, 0.12);
}

.wpsh-status--idle .wpsh-status__bar > span {
  width: 22%;
  background: linear-gradient(90deg, #8d98a8 0%, #b0b9c6 50%, #8d98a8 100%);
  animation: wpsh-idle-glow 2.4s ease-in-out infinite;
  opacity: 0.9;
}

.wpsh-status--idle .wpsh-status__bar::after {
  opacity: 0.5;
  animation: wpsh-track-sheen 2.8s ease-in-out infinite;
}

.wpsh-status--working {
  border-left-color: var(--wpsh-work);
}

.wpsh-status--working .wpsh-status__dot {
  background: var(--wpsh-work);
  animation: wpsh-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.16);
}

.wpsh-status--working .wpsh-status__bar > span {
  width: 35%;
  background: linear-gradient(90deg, #1e6fff 0%, #44d0ff 48%, #1e6fff 100%);
  background-size: 220% 100%;
  animation: wpsh-pendulum 0.85s cubic-bezier(.42, 0, .26, 1) infinite alternate, wpsh-gradient-flow 1.05s linear infinite;
  will-change: transform, background-position;
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(255,255,255,0.22);
}

.wpsh-status--working .wpsh-status__bar {
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 0 0 1px rgba(30, 111, 255, 0.04);
  transform-origin: center;
}

.wpsh-status--working .wpsh-status__bar::after {
  opacity: 0.8;
  animation: wpsh-track-sheen 1.45s linear infinite;
}

.wpsh-status--ok {
  border-left-color: var(--wpsh-ok);
}

.wpsh-status--ok .wpsh-status__dot {
  background: var(--wpsh-ok);
  box-shadow: 0 0 0 4px rgba(26, 127, 55, 0.14);
}

.wpsh-status--ok .wpsh-status__bar > span {
  width: 100%;
  transform: translateX(0);
  background: linear-gradient(90deg, #1a7f37 0%, #30c26d 55%, #1a7f37 100%);
  background-size: 180% 100%;
  animation: wpsh-gradient-flow 1s ease-out 1;
}

.wpsh-status--ok .wpsh-status__bar::after {
  opacity: 0.65;
  animation: wpsh-track-sheen 0.95s ease-out 1;
}

.wpsh-status--error {
  border-left-color: var(--wpsh-error);
}

.wpsh-status--error .wpsh-status__dot {
  background: var(--wpsh-error);
  box-shadow: 0 0 0 4px rgba(207, 34, 46, 0.14);
}

.wpsh-status--error .wpsh-status__bar > span {
  width: 100%;
  transform: translateX(0);
  background: linear-gradient(90deg, #cf222e 0%, #ff6b76 55%, #cf222e 100%);
  background-size: 180% 100%;
  animation: wpsh-gradient-flow 0.9s ease-out 1;
}

.wpsh-status--error .wpsh-status__bar::after {
  opacity: 0.65;
  animation: wpsh-track-sheen 0.9s ease-out 1;
}

@keyframes wpsh-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.28); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes wpsh-pendulum {
  0% { transform: translateX(0); }
  100% { transform: translateX(186%); }
}

@keyframes wpsh-track-sheen {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes wpsh-gradient-flow {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes wpsh-idle-glow {
  0% { background-position: 0 0; opacity: 0.9; }
  50% { background-position: 100% 0; opacity: 1; }
  100% { background-position: 0 0; opacity: 0.9; }
}

@keyframes wpsh-bar-bob {
  0% { transform: translateY(0); }
  25% { transform: translateY(-1px); }
  50% { transform: translateY(1px); }
  75% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

@keyframes wpsh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wpsh-status-enter {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .wpsh-status {
    padding: 11px 11px 10px;
  }

  .wpsh-status__title {
    font-size: 12px;
  }

  .wpsh-status__text {
    font-size: 11px;
  }

  .wpsh-status__bar {
    height: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpsh-status {
    animation: none;
  }

  .wpsh-status--working .wpsh-status__dot,
  .wpsh-status--working .wpsh-status__bar > span,
  .wpsh-status--working .wpsh-status__bar,
  .wpsh-status__bar::after {
    animation: none;
  }

  .wpsh-status__bar > span,
  .wpsh-refresh-btn {
    transition: none;
  }
}
