/**
 * ZD Design System — Small Page Template Styles
 *
 * Used by: ssl.zerodistance.fi, mail.zd.fi, pigeon.zd.fi
 * Self-contained; extends dist/zd.css
 * No JavaScript required.
 */

/* ── Full-height centered layout ── */
.sp-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
}

/* ── Minimal header (logo only) ── */
.sp-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-surface);
}

.sp-header__inner {
  max-width: var(--content-narrow);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
}

.sp-logo img,
.sp-logo svg {
  height: 28px;
  width: auto;
}

.sp-logo:hover {
  color: var(--color-primary);
}

/* ── Main content (centered, fills height) ── */
.sp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
}

.sp-content {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

/* ── Status display ── */
.sp-status {
  margin-bottom: var(--space-8);
}

.sp-status__icon {
  width: 72px;
  height: 72px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-status__icon--ok {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.sp-status__icon--warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.sp-status__icon--error {
  background-color: var(--color-error-bg);
  color: var(--color-error);
}

.sp-status__icon--info {
  background-color: var(--color-info-bg);
  color: var(--color-info);
}

.sp-status__icon svg {
  width: 36px;
  height: 36px;
}

.sp-status__badge {
  margin-bottom: var(--space-4);
}

.sp-status__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-tight);
}

.sp-status__message {
  font-size: var(--text-lg);
  color: var(--color-muted);
  line-height: var(--leading-relaxed);
  max-width: 44ch;
  margin-inline: auto;
}

/* ── Detail table ── */
.sp-detail {
  margin-top: var(--space-8);
  text-align: left;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.sp-detail table {
  width: 100%;
  border-collapse: collapse;
}

.sp-detail tr {
  border-bottom: 1px solid var(--color-line);
}

.sp-detail tr:last-child {
  border-bottom: none;
}

.sp-detail td {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  vertical-align: top;
}

.sp-detail td:first-child {
  font-weight: var(--weight-semibold);
  color: var(--color-muted);
  white-space: nowrap;
  width: 45%;
}

.sp-detail td:last-child {
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  word-break: break-all;
}

/* ── Action link below status ── */
.sp-actions {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ── */
.sp-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-line);
  text-align: center;
}

.sp-footer p {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.sp-footer a {
  color: var(--color-muted);
  text-decoration: underline;
}

.sp-footer a:hover {
  color: var(--color-primary);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .sp-main {
    padding: var(--space-8) var(--space-4);
    justify-content: flex-start;
  }

  .sp-content {
    text-align: center;
  }

  .sp-detail td:first-child {
    width: 40%;
  }
}
