.error-message {
  font-size: var(--ls-text-2xl);
  line-height: var(--ls-line-2xl);
  font-weight: 600;
  padding: 0.5rem 0;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ls-font-primary-color);
  background-color: var(--ls-default-background);
  border-radius: 2px;
  opacity: 1;
  animation: append-animate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform, opacity;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}

.blur {
  filter: blur(10px);
  -webkit-filter: blur(10px);
  user-select: none;
  -webkit-user-select: none;
}

@keyframes append-animate {
  from {
    transform: translateY(-50%) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}


:host {
  display: inline-block;
  font-family: var(--ls-font-family);
}

.ls-status-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ls-status-count-gap, 0.25rem);
  padding: var(--ls-status-count-padding, 0.5rem 0.75rem);
  border-radius: var(--ls-status-count-border-radius, 0.375rem);
  overflow: hidden;
}

.ls-status-count.impact {
  background-color: var(
    --ls-status-count-impact-bg,
    var(--ls-danger-background)
  );
  color: var(--ls-status-count-impact-color, var(--ls-danger-text));
}

.ls-status-count.non-impact {
  background-color: var(
    --ls-status-count-non-impact-bg,
    var(--ls-warning-background)
  );
  color: var(--ls-status-count-non-impact-color, var(--ls-warning-text));
}

.ls-status-count.informational {
  background-color: var(
    --ls-status-count-informational-bg,
    var(--ls-info-background)
  );
  color: var(--ls-status-count-informational-color, var(--ls-info-text));
}

.icon {
  font-size: var(--ls-status-count-label-font-size, var(--ls-text-xs));
  width: var(--ls-status-count-icon-size, 1.65cap);
  height: var(--ls-status-count-icon-size, 1.65cap);
  opacity: var(--ls-status-count-icon-opacity, 0.7);
}

.header {
  display: flex;
  align-items: center;
  gap: var(--ls-status-count-header-gap, 0.375rem);
  flex-wrap: wrap;
  justify-content: center;
}

.header svg {
  flex-shrink: 0;
}

.count {
  font-size: var(--ls-status-count-count-font-size, var(--ls-text-lg));
  font-weight: var(--ls-status-count-count-font-weight, 600);
  text-align: center;
}

.label {
  font-size: var(--ls-status-count-label-font-size, var(--ls-text-xs));
  font-weight: var(--ls-status-count-label-font-weight, 500);
  opacity: var(--ls-status-count-label-opacity, 0.8);
}

.ls-status-count.error {
  background-color: var(--ls-status-count-error-bg, var(--ls-gray-100));
  color: var(--ls-status-count-error-color, var(--ls-gray-500));
}

.ls-status-count.loading {
  opacity: 0.5;
}

/* Use a compact local error style for the small status-count tile. */
.ls-status-count .error-message {
  inset: 50% 0 auto;
  width: 100%;
  max-width: 100%;
  transform: translateY(-50%);
  text-align: center;
  padding: 0.25rem 0.375rem;
  box-sizing: border-box;
  font-size: var(--ls-status-count-error-font-size, var(--ls-text-xs));
  line-height: 1.2;
  font-weight: 500;
  border-radius: 0.25rem;
  background-color: var(
    --ls-default-background,
    rgba(255, 255, 255, 0.85)
  );
  white-space: normal;
  overflow-wrap: anywhere;
  animation: none;
}

.ls-status-count .blur {
  filter: none;
  opacity: 0.4;
}
