/*
  Eternal Timekeeper: account area (Sign in, My memorials, Resend claim email,
  registration / activation / password pages).
  Load AFTER wizard.css (tokens, buttons, inputs, header, footer). Same 960px breakpoint.
  Screens: 3-account-pages/design/screenshots/*.png
*/

/* ---------- Page frame ---------- */
.acc-page { display: flex; flex-direction: column; min-height: 100vh; }
.acc-page > .etk-footer { margin-top: auto; background: var(--etk-surface); }
.acc-main { flex: 1; padding: 56px 40px 80px; }
.acc-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.acc-wrap--wide { max-width: 1240px; }
.acc-wrap--narrow { max-width: 560px; }

.acc-intro { display: flex; flex-direction: column; gap: 8px; }
.acc-intro .etk-eyebrow { color: var(--etk-gold-text); font-weight: 700; }
.acc-intro h1 { font-size: 40px; line-height: 1.2; overflow-wrap: anywhere; }
.acc-intro p { font-size: 17px; line-height: 1.6; color: var(--etk-muted-fg); }

.acc-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.acc-messages li { background: #EAF4EE; border: 1px solid #BFDCC9; color: #17603A; border-radius: var(--etk-radius); padding: 14px 18px; font-size: 15px; line-height: 1.5; }
.acc-messages li.acc-messages__error { background: #FBEDED; border-color: #EBC3C3; color: var(--etk-required); }
.acc-messages li.acc-messages__warning, .acc-messages li.acc-messages__info { background: var(--etk-champagne); border-color: #E8D5BE; color: var(--etk-charcoal); }
.acc-note { font-size: 15px; line-height: 1.6; color: var(--etk-muted-fg); }

/* ---------- Sign in ---------- */
.acc-login { flex: 1; display: flex; flex-wrap: wrap; }
.acc-login__form { flex: 1 1 560px; min-width: 0; padding: 72px 40px 88px; display: flex; justify-content: center; }
.acc-login__inner { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 30px; }
.acc-login__head { display: flex; flex-direction: column; gap: 10px; }
.acc-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; align-self: flex-start; min-height: 32px; }
.acc-login h1 { font-size: 42px; line-height: 1.15; margin-top: 8px; }
.acc-login__lead { font-size: 17px; line-height: 1.6; color: var(--etk-muted-fg); }
.acc-form { display: flex; flex-direction: column; gap: 18px; }
.acc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.acc-field label, .acc-field__label { font-size: 14px; font-weight: 600; color: var(--etk-gold-text); }
.acc-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.acc-field__row a { font-size: 14px; font-weight: 600; }
.acc-field__help { font-size: 13px; line-height: 1.5; color: var(--etk-muted-fg); }
.acc-field__help ul { margin: 4px 0 0; padding-left: 18px; }
.acc-field-error { font-size: 14px; font-weight: 600; color: var(--etk-required); }
.acc-field.has-error .etk-input { border: 2px solid var(--etk-required); }
.acc-pw { position: relative; }
.acc-pw .etk-input { padding-right: 80px; }
.acc-pw__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 40px; padding: 0 12px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--etk-gold-text); border-radius: 8px;
}
.acc-check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 32px; cursor: pointer; }
.acc-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--etk-gold-button); }
.acc-submit { min-height: 56px; margin-top: 4px; }
.acc-error { background: #FBEDED; border: 1px solid #EBC3C3; color: var(--etk-required); border-radius: var(--etk-radius-sm); padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.etk-wizard .acc-error a { color: var(--etk-required); font-weight: 700; }
.acc-newbox { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); padding: 20px 22px; display: flex; gap: 14px; align-items: flex-start; }
.acc-newbox__body { display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.55; min-width: 0; }
.acc-newbox__body > strong:first-child { font-size: 16px; }
.acc-newbox__body a { font-weight: 600; align-self: flex-start; }
.acc-icon-dot { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--etk-champagne); color: var(--etk-gold-button); display: flex; align-items: center; justify-content: center; }
.acc-icon-dot--lg { width: 64px; height: 64px; }

.acc-login__art {
  flex: 1 1 560px; min-width: 0; background: var(--etk-champagne); overflow: hidden; min-height: 760px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 36px; padding: 72px 48px 0;
}
.acc-login__quote { text-align: center; max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.acc-login__quote .acc-kicker { font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--etk-gold-text); }
.acc-login__quote .acc-big { font-family: var(--etk-font-heading); font-size: 40px; line-height: 1.15; }
.acc-login__quote .acc-big em { font-style: italic; }
.acc-login__quote p { font-size: 16px; line-height: 1.6; color: #4A4744; }
.acc-login__art img { width: 100%; max-width: 560px; height: auto; display: block; }

/* Single-column form pages (register, password reset, activation result) */
.acc-panel { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 20px; padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }
.acc-panel > .acc-icon-dot { width: 56px; height: 56px; }
.acc-panel h2 { font-size: 26px; line-height: 1.25; }
.acc-panel p { font-size: 16px; line-height: 1.6; }
.acc-panel .acc-muted { color: var(--etk-muted-fg); }

/* ---------- My memorials: shared pieces ---------- */
.acc-avatar {
  flex: none; width: 104px; height: 104px; border-radius: 50%; border: 4px solid #fff; object-fit: cover;
  box-shadow: 0 2px 10px rgba(45, 45, 45, .12); background: var(--etk-champagne);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--etk-font-heading); font-size: 35px; color: var(--etk-gold-text);
}
.acc-avatar--lg { width: 140px; height: 140px; font-size: 48px; }
.acc-avatar--sm { width: 48px; height: 48px; border: 0; box-shadow: none; font-size: 17px; }
.acc-cover { background: linear-gradient(135deg, var(--etk-champagne), #EADBC8) center / cover no-repeat; }

.acc-progress { display: flex; flex-direction: column; gap: 8px; }
.acc-progress__label { font-size: 14px; font-weight: 600; }
.acc-progress__track { height: 8px; border-radius: 4px; background: #EFE9E1; overflow: hidden; }
.acc-progress__fill { height: 100%; border-radius: 4px; background: var(--etk-gold-button); }
.acc-progress--sm .acc-progress__label { font-size: 13px; font-weight: 400; color: var(--etk-muted-fg); }
.acc-progress--sm .acc-progress__track { height: 6px; }

.acc-next { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; text-decoration: none; align-self: flex-start; min-height: 32px; }
.acc-next svg { flex: none; }
.acc-pending {
  display: flex; align-items: center; gap: 10px; background: #FBF3E8; border: 1px solid #EBD3B4; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; line-height: 1.4; text-decoration: none; min-height: 44px;
}
.etk-wizard a.acc-pending { color: var(--etk-charcoal); }
.etk-wizard a.acc-pending:hover { border-color: var(--etk-gold-button); }
.acc-pending__dot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--etk-gold-button); color: #fff; display: flex; align-items: center; justify-content: center; }
.acc-pending__text { flex: 1; }
.acc-pending__go { font-weight: 700; color: var(--etk-gold-text); }
.etk-wizard .acc-badge { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: #fff; background: var(--etk-gold-button); border-radius: 999px; padding: 3px 9px; vertical-align: 2px; text-decoration: none; white-space: nowrap; }

.acc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-actions--center { justify-content: center; }
.acc-actions .etk-btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
.acc-actions .acc-share { padding: 0 10px; }

/* Resting-place reminder (wraps the wizard's partials/_dashboard_resting_prompt.html).
   Desktop: question on the left, answers on the right (design: my-memorials-one-desktop.png). */
.acc-prompt .etk-card { border-left: 5px solid var(--etk-gold-button); }
@media (min-width: 960px) {
  .acc-prompt .etk-reminder { align-items: center; padding: 22px 28px; }
  .acc-prompt .etk-reminder__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 6px; align-items: center; }
  .acc-prompt .etk-reminder__body > * { grid-column: 1; }
  .acc-prompt .etk-reminder__body > .etk-reminder__actions { grid-column: 2; grid-row: 1 / span 3; margin: 0; flex-wrap: nowrap; }
}

/* ---------- One memorial (most families) ---------- */
.acc-card-lg { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 20px; overflow: hidden; }
.acc-card-lg .acc-cover { height: 180px; }
.acc-card-lg__body {
  padding: 0 40px 36px; display: grid; gap: 14px 40px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "who side" "actions side";
}
.acc-card-lg__main { grid-area: who; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.acc-card-lg__actions { grid-area: actions; }
.acc-card-lg__main .acc-avatar { margin-top: -70px; }
.acc-card-lg__side { grid-area: side; padding-top: 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acc-name { font-size: 34px; line-height: 1.2; overflow-wrap: anywhere; }
.etk-wizard .acc-name em { font-style: italic; }
.acc-dates { margin-top: 6px; font-size: 16px; color: var(--etk-muted-fg); }
.acc-card-lg .acc-actions { margin-top: 8px; }
.acc-card-lg .acc-actions .etk-btn { min-height: 52px; }

/* ---------- 2-6 memorials: cards ---------- */
.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.acc-card { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.acc-card .acc-cover { height: 110px; }
.acc-card__body { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.acc-card__body .acc-avatar { margin-top: -52px; }
.acc-card .acc-name { font-size: 24px; line-height: 1.25; }
.acc-card .acc-dates { margin-top: 4px; font-size: 14px; }
.acc-card .acc-actions { margin-top: auto; padding-top: 6px; }
.acc-unnamed { font-style: italic; color: var(--etk-muted-fg); }

/* ---------- 7+ memorials: search + list ---------- */
.acc-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.acc-search { flex: 1 1 360px; position: relative; min-width: 0; }
.acc-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--etk-muted-fg); pointer-events: none; }
.acc-search .etk-input { border-radius: var(--etk-radius-pill); padding-left: 48px; min-height: 50px; }
.acc-sort { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--etk-muted-fg); }
.acc-sort .etk-select { width: auto; min-height: 50px; }
.acc-tools__go { min-height: 50px; padding: 0 20px; }
.acc-view { display: inline-flex; border: 1px solid var(--etk-border); border-radius: var(--etk-radius-sm); overflow: hidden; }
.acc-view a { width: 46px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--etk-surface); }
.etk-wizard .acc-view a { color: var(--etk-muted-fg); }
.etk-wizard .acc-view a[aria-current="true"] { background: var(--etk-champagne); color: var(--etk-gold-text); }

.acc-table-wrap { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 16px; overflow: hidden; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.acc-table th { background: var(--etk-cream-light); text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--etk-muted-fg); font-weight: 700; padding: 14px 16px; }
.acc-table td { border-top: 1px solid var(--etk-muted); padding: 14px 16px; vertical-align: middle; }
.acc-row__who { display: flex; align-items: center; gap: 14px; }
.acc-row__text { min-width: 0; }
.acc-row__name { font-weight: 600; overflow-wrap: anywhere; }
.acc-row__sub { font-size: 14px; color: var(--etk-muted-fg); }
.acc-row__progress { width: 220px; }
.acc-row__updated { width: 150px; font-size: 14px; color: var(--etk-muted-fg); }
.acc-row__actions { width: 170px; text-align: right; }
.acc-row__buttons { display: inline-flex; gap: 6px; }
.acc-row__actions .etk-btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.acc-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; font-size: 15px; color: var(--etk-muted-fg); }
.acc-pager .etk-btn { min-height: 44px; padding: 0 22px; font-size: 15px; }
.acc-none { padding: 32px; text-align: center; color: var(--etk-muted-fg); }

/* ---------- Help band, claim code & empty state ---------- */
.acc-help { background: var(--etk-champagne); border-radius: 16px; padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.acc-help__text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 300px; min-width: 0; }
.acc-help__text p { font-size: 15px; line-height: 1.55; color: #4A4744; }
.acc-help > .etk-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }

.acc-claim { margin-top: 6px; font-size: 15px; }
.acc-claim > summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-weight: 600; color: var(--etk-gold-text); text-decoration: underline; list-style: none; }
.acc-claim > summary::-webkit-details-marker { display: none; }
.acc-claim__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; max-width: 460px; }
.acc-claim__form .etk-input { flex: 1 1 200px; width: auto; min-width: 0; min-height: 48px; }
.acc-claim__form .etk-btn { min-height: 48px; padding: 0 22px; font-size: 15px; }

.acc-empty { background: var(--etk-surface); border: 2px dashed var(--etk-dashed); border-radius: 20px; padding: 48px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.acc-empty .acc-icon-dot { width: 64px; height: 64px; }
.acc-empty h2 { font-size: 28px; }
.acc-empty > p { max-width: 560px; font-size: 16px; line-height: 1.65; color: var(--etk-muted-fg); }
.acc-empty > p strong { color: var(--etk-charcoal); }
.acc-empty__more { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 15px; color: var(--etk-muted-fg); }
.acc-empty__more .acc-claim { display: flex; flex-direction: column; align-items: center; }
.acc-empty__more .acc-claim__form { justify-content: center; }

/* ---------- Phone (< 960px) ---------- */
@media (max-width: 959.98px) {
  .acc-main { padding: 24px 20px 36px; }
  .acc-wrap { gap: 20px; }
  .acc-intro h1 { font-size: 30px; }
  .acc-intro p { font-size: 16px; }

  .acc-login__form { padding: 24px 20px 40px; }
  .acc-login__inner { gap: 26px; }
  .acc-login h1 { font-size: 32px; }
  .acc-login__art { display: none; }                 /* the form comes first on a phone */
  .acc-panel { padding: 24px 20px; border-radius: 16px; }

  .acc-card-lg .acc-cover { height: 120px; }
  .acc-card-lg__body { padding: 0 20px 22px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "side" "actions"; }
  .acc-card-lg__side { padding-top: 0; }
  .acc-card-lg__main .acc-avatar { margin-top: -54px; width: 108px; height: 108px; }
  .acc-name { font-size: 26px; }
  .acc-dates { font-size: 15px; }
  .acc-actions .etk-btn--primary { flex: 1 1 100%; }
  .acc-actions .etk-btn--secondary, .acc-actions .acc-share { flex: 1 1 0; }
  .acc-actions .acc-share { border: 2px solid var(--etk-gold-button); padding: 0 10px; }
  .acc-actions--center .etk-btn { flex: 1 1 100%; }

  .acc-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .acc-tools .acc-search { flex-basis: 100%; }
  .acc-sort { flex: 1 1 auto; }
  .acc-sort .etk-select { flex: 1; min-width: 0; }
  .acc-tools__go { display: none; }                 /* the sort select submits itself; Enter searches */

  .acc-table thead { display: none; }
  .acc-table, .acc-table tbody, .acc-table tr, .acc-table td { display: block; width: auto; }
  .acc-table tr { border-top: 1px solid var(--etk-muted); padding: 14px 16px; display: grid; gap: 10px; }
  .acc-table tr:first-child { border-top: 0; }
  .acc-table td { border: 0; padding: 0; text-align: left; }
  .acc-row__progress, .acc-row__updated, .acc-row__actions { width: auto; }
  .acc-row__buttons { display: flex; gap: 8px; }
  .acc-row__actions .etk-btn { flex: 1; }

  .acc-prompt .etk-reminder__icon { display: none; }
  .acc-prompt .etk-reminder__actions .etk-btn--primary { flex: 1 1 auto; }
  .acc-help { padding: 20px; }
  .acc-help > .etk-btn { align-self: flex-start; }

  /* Signed-out header: only Help on phones (sign-in-phone.png). Override of wizard.css, where
     `.etk-wizard .etk-site-nav a { display: inline-flex }` beats `.etk-hide-phone`. */
  .etk-wizard .etk-site-nav a.etk-hide-phone { display: none; }
  .etk-wizard .etk-site-nav.etk-site-nav--public a { color: var(--etk-gold-text); font-weight: 600; }

  /* Footer: logo on its own line, then the links in one row (sign-in-phone.png).
     Override of wizard.css, which spreads them with space-between. */
  .acc-page .etk-footer__inner { justify-content: flex-start; gap: 16px 20px; }
  .acc-page .etk-footer__inner > img { flex: 0 0 100%; height: 40px; object-fit: contain; object-position: left center; }
  .acc-page .etk-footer__bar { text-align: left; }
  .acc-empty { padding: 32px 20px; }
  .acc-claim__form .etk-btn { flex: 1 1 100%; }
}
