/*!
 * design-components.css - the storefront's shared component layer.
 *
 * WHY THIS FILE EXISTS
 * The design this storefront is ported from is a Tailwind + shadcn build. Its
 * pages repeat the same handful of shapes - a rounded panel, a labelled input, a
 * primary button, a status chip, a table, an empty state - each spelled out as a
 * long utility string. This project has no Tailwind pipeline (see the header of
 * design-system.css), so every one of those utilities has to exist in a static
 * sheet before the markup renders at all.
 *
 * Reproducing ~25 pages of utility strings that way meant adding hundreds of
 * single-purpose classes, most used once. So the repeated shapes are defined
 * here as components instead, with the same measurements, radii, shadows and
 * colours the design uses. Pages that need a one-off still reach for utilities;
 * anything that appears on more than one page lives here.
 *
 * Everything is `.ds-` prefixed, so nothing here can collide with Bootstrap,
 * Vuetify, the Tailwind dump or the source project's own sheets.
 *
 * Colours come from the custom properties layouts/default.vue writes from the
 * admin's settings, so a site that changes its theme colour restyles every one
 * of these at once. --ds-primary is an "R G B" triplet, which is why it is
 * always used through rgb().
 */

:root {
  --ds-radius: 0.75rem;
  --ds-radius-lg: 1rem;
  --ds-border: #e2e8f0;
  --ds-text: #020617;
  --ds-text-soft: #475569;
  --ds-text-muted: #64748b;
  --ds-surface: #ffffff;
  --ds-surface-muted: #f8fafc;
  --ds-danger: #dc2626;
  --ds-success: #059669;
  --ds-warning: #d97706;
}

/* ---------------------------------------------------------------------------
   Page shell

   Every route's root element. `min-height` keeps short pages from letting the
   footer ride up under the header, which is what made /codes and /verification
   look broken when they had nothing to show.
   --------------------------------------------------------------------------- */
.ds-page {
  min-height: 70vh;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  color: var(--ds-text);
}

@media (min-width: 768px) {
  .ds-page {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }
}

/* Page heading. The design pairs a bold title with a muted line under it and
   never uses a rule between them. */
.ds-page-head {
  margin-bottom: 1rem;
}

.ds-page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.75rem;
  color: var(--ds-text);
}

.ds-page-sub {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ds-text-muted);
}

@media (min-width: 768px) {
  .ds-page-title {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

/* ---------------------------------------------------------------------------
   Panels
   --------------------------------------------------------------------------- */
.ds-panel {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

.ds-panel,
.ds-panel-muted {
  --ds-ring: rgba(226, 232, 240, 0.7);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 0 0 1px var(--ds-ring);
}

.ds-panel-muted {
  background: rgba(248, 250, 252, 0.8);
  border-radius: var(--ds-radius-lg);
  padding: 1rem;
}

@media (min-width: 768px) {
  .ds-panel,
  .ds-panel-muted {
    padding: 1.25rem;
  }
}

.ds-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ds-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ds-text);
}

.ds-panel-title-icon {
  display: grid;
  place-items: center;
  height: 2rem;
  width: 2rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgb(var(--ds-primary) / 0.1);
  color: rgb(var(--ds-primary) / 1);
}

/* A plain divider between stacked blocks inside a panel. */
.ds-divider {
  height: 1px;
  border: 0;
  margin: 1rem 0;
  background: var(--ds-border);
}
