/* Styles for the Django pages (accounts, share, history, billing). Colors come from tokens.css. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  text-decoration: none;
}

.brand-name b {
  font-weight: 600;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--c-iron);
}

.brand-mark span {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c-cherry);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.topnav a {
  text-decoration: none;
}

.topnav a:hover {
  color: var(--text-muted);
}

.topnav form {
  margin: 0;
}

.muted {
  color: var(--text-muted);
}

.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}

/* "Pro" is quiet text, not a badge */
.badge {
  color: var(--text-muted);
}

.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.narrow {
  max-width: 420px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
}

.prose {
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.prose h2 {
  margin: 32px 0 8px;
  font-size: 18px;
  font-weight: 500;
}

.prose p,
.prose ul {
  margin: 0 0 12px;
}

.lede {
  margin: 0 0 28px;
  color: var(--text-muted);
}

.flush-top {
  margin-top: 0;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-md);
}

/* ---------- forms ---------- */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
}

.field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--c-accent-strong);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-cherry) 35%, transparent);
}

.help {
  color: var(--text-faint);
  font-size: 12.5px;
}

.errors {
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--c-negative) 45%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 13.5px;
  list-style: none;
}

.notice {
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--c-positive) 45%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 13.5px;
}

.field .errors {
  margin: 0;
  padding: 4px 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn {
  transition:
    background-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btn:hover {
  background: var(--raised);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: var(--c-on-accent);
}

.btn-primary:hover {
  background: var(--c-accent-strong);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-danger {
  color: var(--c-negative);
}

.alt {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- share page ---------- */

.share {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.share-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.share-meta {
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- history ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.shot {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.shot-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--stage);
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shot-body {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  font-size: 13px;
}

.shot-title {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shot-actions form {
  margin: 0;
}

/* Status as quiet text with a dot */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-positive);
}

.pill-expired::before {
  background: var(--text-faint);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  min-width: 180px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-label {
  color: var(--text-muted);
  font-size: 12px;
}

.stat-value {
  font-size: 24px;
  font-weight: 500;
}

.empty {
  padding: 48px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
}

/* ---------- billing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.plan h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.plan .price {
  margin: 4px 0 16px;
  font-size: 28px;
  font-weight: 500;
}

.plan ul {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--text-muted);
}

.plan-current {
  border-color: var(--c-accent-strong);
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 16px;
  }

  .topnav .muted {
    display: none;
  }

  .page {
    padding: 32px 16px 64px;
  }
}
