/**
 * Loading Quote — Mindful Waiting States
 *
 * "Patience is not the ability to wait, but the ability to
 * keep a good attitude while waiting." — Joyce Meyer
 *
 * Design Philosophy:
 * - Transform waiting into reflection
 * - Subtle animations, no spinning chaos
 * - Typography that invites reading
 * - Calm, not anxious
 */

/* ========== Base Container ========== */

.loading-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-8);
  min-height: 200px;
  text-align: center;
}

.loading-quote__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  max-width: 480px;
  animation: quote-fade-in 0.6s var(--ease-out) both;
}

@keyframes quote-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Spinner ========== */

.loading-quote__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-dim);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: quote-spinner 0.8s linear infinite;
}

.loading-quote__spinner--subtle {
  width: 16px;
  height: 16px;
  border-width: 1.5px;
  opacity: 0.6;
}

@keyframes quote-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ========== Blockquote ========== */

.loading-quote__blockquote {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.loading-quote__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-normal);
  font-style: italic;
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.loading-quote__author {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--font-weight-medium);
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* ========== Message ========== */

.loading-quote__message {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ========== Variants ========== */

/* Compact: smaller, inline-friendly */
.loading-quote--compact {
  padding: var(--space-4);
  min-height: auto;
  gap: var(--space-3);
}

.loading-quote--compact .loading-quote__top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.loading-quote__blockquote--compact .loading-quote__text {
  font-size: var(--text-sm);
}

.loading-quote__blockquote--compact .loading-quote__author {
  font-size: var(--text-2xs);
}

/* Minimal: just spinner and message */
.loading-quote--minimal {
  flex-direction: row;
  padding: var(--space-3);
  min-height: auto;
  gap: var(--space-3);
}

.loading-quote--minimal .loading-quote__spinner {
  width: 16px;
  height: 16px;
  border-width: 1.5px;
}

/* ========== Full-Page Loading Overlay ========== */

.loading-overlay-host {
  position: relative;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
  z-index: var(--z-modal);
}

.loading-overlay--visible {
  opacity: 1;
}

/* ========== View Loading State ========== */

.view--loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

/* ========== Empty State with Quote ========== */

.empty-state-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8);
  text-align: center;
}

.empty-state-quote__icon {
  font-size: var(--text-3xl);
  opacity: 0.2;
  margin-bottom: var(--space-2);
}

.empty-state-quote__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

.empty-state-quote__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0;
}

.empty-state-quote__blockquote {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-dim);
  max-width: 400px;
}

.empty-state-quote__blockquote .loading-quote__text {
  font-size: var(--text-sm);
}

/* ========== Responsive ========== */

@media (max-width: 480px) {
  .loading-quote {
    padding: var(--space-5);
  }

  .loading-quote__text {
    font-size: var(--text-base);
  }

  .loading-quote__content {
    max-width: 100%;
  }
}

/* ========== Light Mode ========== */

[data-theme="light"] .loading-quote__text {
  color: var(--text-secondary);
}

/* ========== Reduced Motion ========== */

@media (prefers-reduced-motion: reduce) {
  .loading-quote__spinner {
    animation: none;
    border-top-color: var(--accent-primary);
    opacity: 0.5;
  }

  .loading-quote__content {
    animation: none;
  }

  .loading-overlay {
    transition: none;
  }
}
