/*
 * share.honeydoesthis.com — recipient web preview.
 *
 * Palette inferred from CLAUDE.md / data_model (avatar_tone enum:
 * honey, sage, blush, cream) and the V4 design intent. Cream
 * background, honey accent, plum text. Tighten exact hex codes
 * against the V4 design tokens when those land in-repo.
 */

:root {
  --cream: #faf6ec;
  --cream-deep: #f1ead8;
  --honey: #d4a04c;
  --honey-deep: #b78635;
  --sage: #8aa78c;
  --blush: #d99fae;
  --plum: #3a2435;
  --plum-soft: #5c4055;
  --muted: #8c7a86;
  --line: rgba(58, 36, 53, 0.12);
  --shadow: 0 1px 2px rgba(58, 36, 53, 0.08), 0 4px 16px rgba(58, 36, 53, 0.06);
  --radius: 16px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--plum);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

[hidden] {
  display: none !important;
}

/* ── Brand ───────────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.brand.small {
  margin-bottom: 24px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--honey);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.brand-wordmark {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--plum);
}

/* ── Landing ─────────────────────────────────────────────────── */

.landing-hero {
  text-align: center;
  padding: 32px 0;
}

.landing-hero h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--plum);
}

.landing-hero p {
  color: var(--plum-soft);
  margin: 0 0 32px;
}

.store-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.store-badge {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--plum);
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  min-width: 240px;
  text-align: center;
}

.store-badge:hover {
  background: var(--plum-soft);
}

/* ── Preview ─────────────────────────────────────────────────── */

.sender-line {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--plum-soft);
}

.sender-line strong {
  color: var(--plum);
  font-weight: 600;
}

.photo {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: var(--shadow);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ai-feedback {
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 24px;
}

.ai-headline {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--honey-deep);
  margin: 0 0 12px;
}

.ai-summary {
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.ai-detail {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}

.ai-detail .row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.ai-detail .row dt {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.ai-detail .row dd {
  margin: 0;
  color: var(--plum);
}

/* ── Reactions ───────────────────────────────────────────────── */

.reactions {
  margin: 0 0 32px;
}

.reaction-counts {
  display: flex;
  gap: 16px;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--plum-soft);
}

.reaction-counts .count {
  display: inline-flex;
  gap: 4px;
}

.reaction-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.reaction {
  flex: 1;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--plum);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.06s;
}

.reaction:hover {
  background: var(--cream-deep);
  border-color: var(--honey);
}

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

.reaction[aria-pressed="true"] {
  background: var(--honey);
  border-color: var(--honey-deep);
  color: var(--cream);
}

.reaction[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form textarea,
.comment-form input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: var(--cream);
  color: var(--plum);
  resize: vertical;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus {
  outline: 2px solid var(--honey);
  outline-offset: -1px;
  border-color: transparent;
}

.primary {
  background: var(--plum);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  align-self: flex-start;
}

.primary:hover {
  background: var(--plum-soft);
}

.primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.link {
  background: none;
  border: none;
  color: var(--honey-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link:hover {
  text-decoration: underline;
}

.notice {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--blush);
  color: var(--plum);
  border-radius: 12px;
  font-size: 14px;
}

/* ── After-feedback / locked / errors ─────────────────────────── */

.confirm-line {
  font-size: 18px;
  margin: 0 0 16px;
}

.undo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 24px;
}

.undo-remaining {
  background: var(--honey);
  color: var(--cream);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.error-headline {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.subdued {
  color: var(--plum-soft);
}

.centered {
  text-align: center;
}

.install-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.store-link {
  color: var(--honey-deep);
  font-weight: 600;
  text-decoration: none;
}

.store-link:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reaction:active {
    transform: none;
  }
}
