/* Eturnal Rest -- account.html only. The signed-in seller's one integrated
   account area (listings, advertising plan, details, sign-in explainer, close).
   Reuses the tokens.css / base.css vocabulary; only account-specific pieces
   live here. manage.css is NOT loaded on this page (it dies with manage.html on
   the 2026-08-01 cleanup). */

/* ---- shell ---- */
.account-wrap {
  max-width: 680px;
  margin: 0 auto;
}

/* ---- panels: exactly one visible at a time (JS adds .is-visible) ---- */
.account-panel {
  display: none;
}
.account-panel.is-visible {
  display: block;
}

/* ---- header block ---- */
.account-header {
  margin-bottom: var(--space-6);
}
.account-header h1 {
  margin: 0 0 0.2em;
}
.account-header .lede {
  margin-bottom: var(--space-4);
}

/* ---- persistent success banner (from the .manage-confirm recipe) ---- */
.account-banner {
  background: var(--verified-bg);
  border: 1px solid var(--verified-line);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  color: var(--green-800);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.account-banner[hidden] {
  display: none;
}
.account-banner b {
  color: var(--verified);
}

/* ---- sections ---- */
.account-section {
  margin-top: var(--space-8);
}
.account-section h2 {
  margin: 0 0 var(--space-3);
}
.account-intro {
  color: var(--ink-2);
  margin: 0 0 var(--space-5);
}
.account-actions-row {
  margin: var(--space-4) 0 0;
}
.account-change-request {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  margin-top: var(--space-4);
  line-height: var(--lh-body);
}

/* ---- listing cards ---- */
.account-listings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
.account-listing {
  overflow: hidden;
}
.account-listing.listing--sold {
  opacity: 0.74;
}

/* photo strip: reuse the branded placeholder art at a reduced height */
.account-listing__photo {
  position: relative;
  height: 96px;
  display: grid;
  place-items: center;
  background:
    var(--placeholder-art) center / cover no-repeat,
    linear-gradient(135deg, var(--blue-500), var(--blue-700));
}
.account-listing__photo span {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
}

.account-listing .card__body {
  padding: var(--space-5);
}
.account-listing__chip {
  margin-bottom: var(--space-3);
}
.account-listing__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--green-900);
  margin: 0 0 var(--space-2);
}
.account-listing__meta {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  margin: 0 0 var(--space-3);
  line-height: var(--lh-snug);
}
.account-listing__buyer-link {
  display: inline-block;
  margin-top: 2px;
}
.account-listing__sold-note {
  font-size: var(--fs-meta);
  color: var(--ink-3);
}

/* Shown instead of the buyer-view link when the listing is not on a buyer page
   yet (in review, or no cemetery matched). Same muted weight as the sold note:
   this is a state, not a warning. */
.account-listing__pending-note {
  font-size: var(--fs-meta);
  color: var(--ink-3);
}

/* price block */
.account-listing__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-4) 0;
}
.account-listing__price {
  font-family: var(--font-serif);
  font-size: var(--fs-lede);
  font-weight: 700;
  color: var(--green-900);
}
.listing--sold .account-listing__price {
  text-decoration: line-through;
  color: var(--ink-3);
}

/* inline price-edit form (revealed in place) */
.account-price-form {
  margin: var(--space-4) 0 0;
}
.account-price-form .field {
  margin-bottom: var(--space-3);
}
.account-price-form .account-price-help {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  margin: 6px 0 0;
  line-height: var(--lh-snug);
}

/* description block, same shape as the price block above */
.account-listing__desc-row {
  margin: var(--space-4) 0;
}
.account-listing__desc {
  color: var(--ink-2);
  line-height: var(--lh-snug);
  margin: 0 0 6px;
  white-space: pre-wrap;
}
.account-desc-form .field {
  margin-bottom: var(--space-3);
}
.account-desc-form .account-desc-input {
  min-height: 8rem;
  resize: vertical;
  font-family: inherit;
  line-height: var(--lh-snug);
}
.account-desc-form .account-price-help {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  margin: 6px 0 0;
  line-height: var(--lh-snug);
}

.account-listing__actions {
  margin-top: var(--space-4);
}
.account-listing__msg {
  margin-top: var(--space-3);
}

/* attention chip: amber family, never red */
.badge--attention {
  background: var(--accent-100);
  color: var(--accent-800);
}

/* ---- empty state well (from the .manage-empty recipe) ---- */
.account-empty {
  background: var(--stone);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
  color: var(--ink-2);
  line-height: var(--lh-body);
}
.account-empty[hidden] {
  display: none;
}
.account-empty p {
  margin: 0 0 var(--space-4);
}
.account-empty p:last-child {
  margin-bottom: 0;
}

/* ---- advertising-plan section ---- */
.account-section[hidden] {
  display: none;
}
.account-plan-body {
  line-height: var(--lh-body);
}
.account-plan-help {
  font-size: var(--fs-meta);
  margin-top: var(--space-3);
}
.account-plan--attention {
  background: var(--accent-50);
  border: 1px solid var(--accent-200);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.account-plan--attention .account-plan-body {
  color: var(--accent-800);
}

/* ---- your-details summary list (GOV.UK style) ---- */
.account-summary {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--gold-soft);
}
.account-summary__row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gold-soft);
  margin: 0;
}
.account-summary__label {
  font-weight: 600;
  color: var(--ink-2);
  margin: 0;
}
.account-summary__value {
  color: var(--ink);
  margin: 0;
  word-break: break-word;
}
.account-summary__action {
  margin: 0;
  text-align: right;
}

/* inline name-edit form replaces the row contents */
.account-name-form {
  display: block;
  padding: var(--space-3) 0;
}
.account-name-form .field {
  margin-bottom: var(--space-3);
}
.account-name-form .account-name-buttons {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

/* ---- shared underlined text link ---- */
.account-link {
  color: var(--green-700);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
}
.account-link:hover {
  color: var(--green-600);
}
.account-back {
  display: inline-block;
  margin-bottom: var(--space-4);
}

/* ---- sign-in / help helpers ---- */
.account-signin-help {
  font-size: var(--fs-meta);
  margin-top: var(--space-3);
  line-height: var(--lh-body);
}

/* ---- panel form-card headings get room ---- */
.account-panel .form-card h2 {
  margin-top: 0;
}

/* ---- accessibility: visually hidden but read by screen readers ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- mobile: full-width card buttons ---- */
@media (max-width: 480px) {
  .account-listing .btn {
    width: 100%;
  }
  .account-listing__actions .btn {
    width: 100%;
  }
  .account-summary__row {
    grid-template-columns: 1fr auto;
  }
  .account-summary__value {
    grid-column: 1 / -1;
    order: 3;
  }
}

/* ---- listing photos (seller self-service, 2026-07-29) --------------------
   Sellers could not touch their own photos until now: intake captured them
   once and only an admin could change anything. */
.account-photos {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.account-photos__h {
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin: 0 0 0.25rem;
}
.account-photos__intro {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  margin: 0 0 0.75rem;
}
.account-photos__grid {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}
.account-photo {
  margin: 0;
}
.account-photo__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--stone);
}
.account-photo__img--none {
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
/* A photo awaiting review is dimmed so it reads as "not live yet" at a glance
   rather than only via its badge. */
.account-photo--pending .account-photo__img {
  opacity: 0.6;
}
.account-photo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
  font-size: var(--fs-meta);
}
.account-photo-addbtn {
  cursor: pointer;
}
