/* Spinner + label, used wherever data is fetched from Firebase */
.tasyr-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 3rem 1rem;
  color: var(--text-muted, #5a6a7a);
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tasyr-loader[hidden] { display: none !important; }
.tasyr-loader::before {
  content: '';
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--silver-light, #dfe3e8);
  border-top-color: var(--rust, #009e39);
  animation: tasyr-spin 0.8s linear infinite;
}
.tasyr-loader--inline { padding: 1.5rem 1rem; }
.tasyr-loader--inline::before { width: 24px; height: 24px; border-width: 2.5px; }
td .tasyr-loader { padding: 2.5rem 1rem; }

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

/* Small spinner inside a button while its action runs: add .is-loading */
button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: progress;
}
button.is-loading::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: tasyr-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Shimmering placeholder cards for the product catalogue */
.skeleton-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--white, #fff);
  border: 1px solid var(--silver-light, #dfe3e8);
  border-radius: 4px;
}
.skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.skeleton-img,
.skeleton-line {
  background: linear-gradient(90deg, #eef1f4 0%, #f7f9fa 40%, #eef1f4 80%);
  background-size: 200% 100%;
  animation: tasyr-shimmer 1.3s ease-in-out infinite;
  border-radius: 3px;
}
.skeleton-img { width: 120px; height: 120px; flex-shrink: 0; }
.skeleton-line { height: 0.75rem; }
.skeleton-line.short { width: 35%; }
.skeleton-line.mid   { width: 65%; }
.skeleton-line.title { height: 1.1rem; width: 80%; }
.skeleton-line.btn   { height: 2rem; width: 40%; margin-top: auto; }

@keyframes tasyr-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 560px) {
  .skeleton-img { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .tasyr-loader::before, button.is-loading::before { animation-duration: 2s; }
  .skeleton-img, .skeleton-line { animation: none; }
}
