/* component-empty-states.css — Empty and error state styles */

/* ─── Shared empty state base ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  gap: 1.6rem;
}

.empty-state__icon {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state__svg {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(227, 252, 2, 0.3));
  animation: empty-state-float 4s ease-in-out infinite;
}

@keyframes empty-state-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.empty-state__splatter {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(227, 252, 2, 0.08) 0%,
    transparent 70%
  );
}

.empty-state__heading {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0;
}

.empty-state__body {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  max-width: 36ch;
  line-height: 1.6;
  margin: 0;
}

.empty-state__cta { margin-top: 0.5rem; }

.empty-state__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ─── Error state ────────────────────────────────────────────────────────── */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem;
  gap: 1.2rem;
  text-align: center;
}

.error-state__svg {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 8px rgba(227, 252, 2, 0.25));
}

.error-state__heading {
  font-family: 'Permanent Marker', var(--font-heading-family);
  font-size: 1.5rem;
  color: var(--color-text);
  margin: 0;
}

.error-state__body {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  max-width: 34ch;
  margin: 0;
  line-height: 1.6;
}

/* ─── Product form error bar ─────────────────────────────────────────────── */
.product-form__error {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  background: rgba(255, 107, 157, 0.12);
  border: 1px solid rgba(255, 107, 157, 0.35);
  color: #FF6B9D;
  font-size: 0.85rem;
  margin-top: 0.8rem;
  animation: error-shake 0.4s ease;
}

.product-form__error.is-visible { display: flex; }

@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ─── ATC button loading state ───────────────────────────────────────────── */
.button--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: wait;
}

.button--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}

.button--graffiti-outline.button--loading::after {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
}

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

@media (prefers-reduced-motion: reduce) {
  .empty-state__svg { animation: none; }
  .product-form__error { animation: none; }
  .button--loading::after { animation: none; }
  .button--loading { opacity: 0.6; color: inherit !important; }
}
