/* ============================================================
   api-client.css — Global Skeleton Loader & Error State
   ============================================================ */

/* ── Skeleton Base ─────────────────────────────────────────── */
@keyframes api-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.api-skeleton {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.api-skeleton__img,
.api-skeleton__line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: api-shimmer 1.4s infinite linear;
  border-radius: 6px;
}

/* ── Card Skeleton ─────────────────────────────────────────── */
.api-skeleton--card {
  width: 220px;
  min-width: 220px;
}

.api-skeleton--card .api-skeleton__img {
  width: 100%;
  height: 150px;
  border-radius: 0;
}

.api-skeleton--card .api-skeleton__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── List Skeleton ─────────────────────────────────────────── */
.api-skeleton--list {
  display: flex;
  gap: 12px;
  padding: 12px;
  width: 100%;
}

.api-skeleton--list .api-skeleton__img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
}

.api-skeleton--list .api-skeleton__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* ── Skeleton Lines ────────────────────────────────────────── */
.api-skeleton__line {
  height: 12px;
}

.api-skeleton__line--title {
  width: 70%;
  height: 14px;
}

.api-skeleton__line--sub {
  width: 50%;
}

.api-skeleton__line--short {
  width: 35%;
}

.api-skeleton__line--price {
  width: 45%;
  height: 16px;
  margin-top: 4px;
}

/* ── Error State ───────────────────────────────────────────── */
.api-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 20px;
  width: 100%;
  text-align: center;
}

.api-error-state__icon {
  font-size: 28px;
  color: #f59e0b;
}

.api-error-state__msg {
  font-size: 14px;
  color: #6b7280;
  max-width: 320px;
  line-height: 1.5;
}
