/* The account panel: sign-in, sign-up, profile, consent, admin.
 *
 * Its own file because both the 3D shop and the flat catalogue open the
 * same panel, and the catalogue has no reason to load the whole store
 * stylesheet to get it. Depends only on the CSS variables both pages set.
 */
:root {
  --panel: #221c16;
  --line: #3b3025;
  --text: #f3ece0;
  --text-dim: #a89880;
  --accent: #c8102e;
  --accent-hot: #e2263f;
}
/* ── Account panel ────────────────────────────────────────────────────
 *
 * Shared by the 3D shop and the flat catalogue, so it styles itself rather
 * than relying on either page's layout.
 */
.account-view { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.account-view[hidden] { display: none; }
.account-scrim { position: absolute; inset: 0; background: rgba(9, 7, 6, .82); }

.account-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 26px 26px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.account-panel.is-busy { opacity: .6; pointer-events: none; }
.account-panel h2 { margin: 0 0 4px; font-size: 22px; }
.account-panel h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.account-sub { margin: 0 0 18px; font-size: 13px; color: var(--text-dim); }
.account-note { margin: 0 0 10px; font-size: 13px; }

.account-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
}
.account-close svg { width: 16px; height: 16px; }
.account-close:hover { border-color: var(--accent); }

.account-form { display: grid; gap: 14px; }
.account-form label { display: grid; gap: 5px; font-size: 13px; }
.account-form label > span { color: var(--text-dim); }
.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"],
.account-form input[type="date"],
.account-form input:not([type]) {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1a1511;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.account-form input:focus { outline: none; border-color: var(--accent); }
.account-form small { color: var(--text-dim); font-size: 11px; }
.account-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-form label.is-missing > span::after { content: " ·"; color: var(--accent-hot); }

/* Consent boxes. The optional one is visually equal to the required one on
   purpose — styling it as an afterthought is a way of hiding it. */
.account-check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.4; }
.account-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); }
.account-check span { color: var(--text); }
.account-check small { display: block; margin-top: 3px; color: var(--text-dim); }
.account-check-optional { padding: 11px 12px; border: 1px dashed var(--line); border-radius: 10px; }

.account-terms { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.account-terms summary { cursor: pointer; font-size: 13px; color: var(--text-dim); }
.account-terms-body { max-height: 240px; overflow-y: auto; margin-top: 10px; font-size: 12px; line-height: 1.55; color: #cdc3b4; }
.account-terms-body h2 { font-size: 15px; margin: 10px 0 4px; }
.account-terms-body h3 { font-size: 12px; margin: 12px 0 4px; color: var(--text); text-transform: none; letter-spacing: 0; }

.account-btn {
  padding: 11px 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.account-btn:hover { background: var(--accent-hot); }
.account-btn-quiet { background: transparent; border: 1px solid var(--line); color: var(--text); }
.account-btn-quiet:hover { background: #2a221b; border-color: var(--accent); }
.account-btn-danger { background: transparent; border: 1px solid #6d2230; color: #e2879a; }
.account-btn-danger:hover { background: #2a1116; }

.account-block { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.account-block-danger { display: flex; gap: 10px; flex-wrap: wrap; }
.account-swap { margin: 16px 0 0; font-size: 13px; color: var(--text-dim); }
.account-link { border: 0; background: none; padding: 0; color: var(--accent-hot); font: inherit; cursor: pointer; text-decoration: underline; }
.account-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; background: #3a1620; color: #f0b3c0; font-size: 13px; }

.account-history, .account-users { width: 100%; max-height: 220px; overflow-y: auto; font-size: 12px; color: var(--text-dim); }
.account-history ul { margin: 0; padding-left: 16px; }
.account-history li { margin: 3px 0; }
.account-history time { opacity: .6; margin-left: 6px; }
.account-users table { width: 100%; border-collapse: collapse; }
.account-users th, .account-users td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); }

@media (max-width: 560px) { .account-row { grid-template-columns: 1fr; } }


/* The catalogue masthead's account button, matching its "Walk the store" link. */
.store-link-btn {
  border: 1px solid currentColor;
  background: none;
  font: inherit;
  cursor: pointer;
}
