/* ============================================================
   SERENZA · utilities.css
   Spacing, text helpers, responsive hide/show, animations,
   separators, links, progress bars, timelines, stat cards,
   description lists.
   Requires colors_and_type.css.
   ============================================================ */

/* ---------- SPACING ---------- */
.sz-mb-0 { margin-bottom: 0; }
.sz-mb-1 { margin-bottom: 8px; }
.sz-mb-2 { margin-bottom: 16px; }
.sz-mb-3 { margin-bottom: 24px; }
.sz-mb-4 { margin-bottom: 32px; }
.sz-mt-2 { margin-top: 16px; }
.sz-mt-3 { margin-top: 24px; }

.sz-gap-1 { gap: 8px; }
.sz-gap-2 { gap: 16px; }
.sz-gap-3 { gap: 24px; }
.sz-gap-sm { gap: 4px; }

/* ---------- FLEX / LAYOUT ---------- */
.sz-flex-1 { flex: 1; min-width: 0; }
.sz-flex-0 { flex-shrink: 0; }
.sz-items-center { align-items: center; }
.sz-items-start { align-items: flex-start; }
.sz-flex-wrap { flex-wrap: wrap; }

/* ---------- PADDING ---------- */
.sz-p-2 { padding: 16px; }
.sz-p-3 { padding: 24px; }

/* ---------- TEXT ---------- */
.sz-text-line-through { text-decoration: line-through; }
.sz-text-lg { font-size: 20px; }
.sz-text-xl { font-size: 28px; }
.sz-text-2xs { font-size: 11px; }
.sz-whitespace-normal { white-space: normal; }

/* ---------- BORDER ---------- */
.sz-border-b { border-bottom: 1px solid var(--paper-deep); }

/* ---------- LANGUAGE SELECTOR ---------- */
.sz-select--sm { font-size: 13px; padding: 6px 28px 6px 10px; }

/* ---------- HELPERS ---------- */
.sz-text-sm { font-size: 14px; }
.sz-text-xs { font-size: 12.5px; }
.sz-text-muted { color: var(--ink-soft); }
.sz-text-faint { color: var(--ink-faint); }
.sz-text-gold { color: var(--gold); }
.sz-text-forest { color: var(--forest); }
.sz-text-urgent { color: var(--status-urgent); }
.sz-text-right { text-align: right; }
.sz-text-center { text-align: center; }
.sz-font-medium { font-weight: 500; }
.sz-font-serif { font-family: var(--serif); }
.sz-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sz-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- RESPONSIVE HIDE/SHOW ---------- */
@media (max-width: 859px) {
  .sz-hide-mobile { display: none !important; }
}
@media (min-width: 860px) {
  .sz-show-mobile { display: none !important; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes sz-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.sz-animate-in { animation: sz-fade-in .3s ease-out; }

/* ---------- SEPARATOR / DIVIDER ---------- */
.sz-sep {
  height: 1px;
  background: var(--paper-deep);
  border: 0;
  margin: 24px 0;
}

/* ---------- LINK STYLES ---------- */
.sz-link {
  color: var(--gold-deep);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14px;
  transition: color .2s;
}
.sz-link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- BACK LINK ---------- */
.sz-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--gold-deep);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color .2s;
}
.sz-back:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- STATUS BADGES ---------- */
.sz-badge--planning { background: rgba(180,154,110,.18); color: var(--gold-deep); }
.sz-badge--planning .dot { background: var(--gold); }
.sz-badge--in_progress { background: rgba(94,107,90,.14); color: #46523f; }
.sz-badge--in_progress .dot { background: var(--sage); }
.sz-badge--completed { background: rgba(94,107,90,.14); color: #46523f; }
.sz-badge--completed .dot { background: var(--sage); }
.sz-badge--cancelled { background: rgba(156,75,63,.14); color: var(--status-urgent); }
.sz-badge--cancelled .dot { background: var(--status-urgent); }
.sz-badge--paid { background: rgba(94,107,90,.14); color: #46523f; }
.sz-badge--paid .dot { background: var(--sage); }
.sz-badge--quoted { background: rgba(180,154,110,.18); color: var(--gold-deep); }
.sz-badge--quoted .dot { background: var(--gold); }
.sz-badge--estimated { background: var(--paper-deep); color: var(--ink-soft); }
.sz-badge--estimated .dot { background: var(--sage-soft); }
.sz-badge--over_budget { background: rgba(156,75,63,.14); color: var(--status-urgent); }
.sz-badge--over_budget .dot { background: var(--status-urgent); }
.sz-badge--contacted { background: rgba(94,107,90,.10); color: var(--sage); }
.sz-badge--contacted .dot { background: var(--sage-soft); }

/* ---------- PROGRESS BAR (compact for cards) ---------- */
.sz-progress-sm {
  width: 100%;
  height: 5px;
  background: var(--paper-deep);
  border-radius: 100px;
  overflow: hidden;
}
.sz-progress-sm > i {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 100px;
  transition: width .4s;
}

/* ---------- STAT INLINE (for stat cards in grid) ---------- */
.sz-stat-card {
  background: var(--paper-soft);
  border: 1px solid var(--paper-deep);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.sz-stat-card__label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sz-stat-card__value {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--forest);
  line-height: 1;
  margin-top: 6px;
}
.sz-stat-card__desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--sage);
  margin-top: 6px;
}

/* ---------- DESCRIPTION LIST ---------- */
.sz-dl {
  display: grid;
  gap: 16px;
}
.sz-dl dt {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.sz-dl dd {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--ink);
  margin: 0;
}

/* ---------- TIMELINE (compact for sidebar) ---------- */
.sz-timeline-sm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sz-timeline-sm__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sz-timeline-sm__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sand);
  flex: 0 0 auto;
  margin-top: 6px;
}
.sz-timeline-sm__text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
}
.sz-timeline-sm__time {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}
