/* Xevendi mockup — account area (saved homes, compare, messages). Uses tokens from styles.css only. */

/* ---------- tabs ---------- */
.acct-tabs { margin: 0 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.acct-tabs ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: max-content; }
.acct-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--text-2);
  font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color var(--d1) var(--ease), border-color var(--d1) var(--ease);
}
.acct-tab:hover { color: var(--text-1); border-bottom-color: var(--line-strong); }
.acct-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-sm); }
.acct-tab[aria-current="page"] { color: var(--text-1); border-bottom-color: var(--cta); }
.acct-count {
  min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--bg-muted);
  color: var(--text-2); font-size: .8125rem; text-align: center;
}
.acct-tab[aria-current="page"] .acct-count { background: var(--sea-50); color: var(--sea-700); }

/* ---------- saved homes ---------- */
.acct-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.acct-toolbar p { margin: 0; }
.acct-item { display: flex; flex-direction: column; min-width: 0; }
.acct-extra { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 2px 4px; }
.acct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.acct-chip { background: var(--amber-50); color: var(--amber-800); border-color: transparent; cursor: default; }
.acct-label { font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.acct-note { width: 100%; height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.acct-hint { margin: -4px 0 0; min-height: 1.2em; color: var(--green-700); }
.acct-meta { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); }
.acct-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: center; margin-top: 24px; pointer-events: none; }
.acct-bar[hidden] { display: none; }
.acct-bar .btn { pointer-events: auto; box-shadow: var(--e3); }
.acct-sm { --h: 34px; font-size: .875rem; }

/* ---------- saved searches ---------- */
.acct-list { display: grid; gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.acct-panel { display: grid; gap: 16px; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); }
.acct-rename { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-rename .input { flex: 1 1 220px; min-width: 0; font-weight: 600; }
.acct-search-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.acct-search-row .field { min-width: 180px; }
.acct-search-row p { margin: 0; }
.acct-channel { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- compare ---------- */
.acct-cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.acct-cmp-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.acct-cmp { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
.acct-cmp th, .acct-cmp td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); background: var(--bg); }
.acct-cmp tbody tr:last-child th, .acct-cmp tbody tr:last-child td { border-bottom: 0; }
.acct-cmp tbody th { position: sticky; left: 0; z-index: 1; width: 150px; font-weight: 600; color: var(--text-2); background: var(--bg-soft); }
.acct-corner { position: sticky; left: 0; z-index: 1; width: 150px; background: var(--bg-soft) !important; }
.acct-colhead { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.acct-colhead img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-muted); }
.acct-colhead a { font-weight: 600; color: var(--text-1); text-decoration: none; }
.acct-colhead a:hover { text-decoration: underline; }
.acct-nophoto { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-sm); background: var(--bg-muted); color: var(--text-3); font-size: .8125rem; }
.acct-low { margin-top: 6px; background: var(--sea-50); color: var(--sea-700); }
.acct-fine { margin-top: 12px; max-width: 70ch; }

/* ---------- messages ---------- */
.msg {
  display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); height: min(760px, calc(100dvh - 190px)); min-height: 560px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); overflow: hidden;
}
.msg-list { overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-soft); }
.msg-items { margin: 0; padding: 0; list-style: none; }
.msg-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer;
  transition: background var(--d1) var(--ease);
}
.msg-item:hover { background: var(--bg-muted); }
.msg-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.msg-item[aria-current="true"] { background: var(--bg); box-shadow: inset 3px 0 0 var(--cta); }
.msg-avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--sea-50); color: var(--sea-700); font-weight: 700; font-size: .875rem;
}
.msg-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.msg-row { display: flex; justify-content: space-between; gap: 8px; }
.msg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { flex: none; font-size: .75rem; color: var(--text-3); }
.msg-home { font-size: .8125rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-snip { font-size: .875rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-dot { position: absolute; right: 14px; bottom: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--cta); }
.msg-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.msg-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msg-title { margin: 0; font-size: 1.0625rem; font-family: var(--font-ui); }
.msg-title:focus { outline: none; }
.msg-back { display: none; --h: 36px; padding-inline: 8px; }
.msg-home-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
.msg-home-card:hover { background: var(--bg-muted); }
.msg-home-card img { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-xs); background: var(--bg-muted); }
.msg-home-card .msg-home { white-space: normal; }
.msg-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.msg-log:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.msg-b { max-width: min(78%, 520px); padding: 10px 14px; border-radius: var(--r-md); }
.msg-b--them { align-self: flex-start; background: var(--bg-muted); border-bottom-left-radius: var(--r-xs); }
.msg-b--me { align-self: flex-end; background: var(--sea-50); color: var(--text-1); border-bottom-right-radius: var(--r-xs); }
.msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-stamp { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 4px 0 0; font-size: .75rem; color: var(--text-3); }
.msg-tick { display: inline-flex; align-items: center; gap: 2px; color: var(--green-700); }
.msg-proposal { display: grid; gap: 4px; justify-items: start; margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); }
.msg-proposal p { margin: 0; }
.msg-typing { align-self: flex-start; margin: 0; padding: 4px; font-size: .875rem; color: var(--text-3); font-style: italic; }
.msg-composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.msg-composer .input { flex: 1; min-width: 0; height: auto; min-height: 44px; padding: 10px 12px; resize: none; line-height: 1.4; }
.msg-safety { padding: 10px 16px; border-top: 1px solid var(--line); background: var(--amber-50); font-size: .8125rem; color: var(--text-2); }
.msg-safety h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .875rem; color: var(--amber-800); font-family: var(--font-ui); }
.msg-safety ul { margin: 0 0 6px; padding-left: 18px; }

@media (max-width: 719px) {
  .msg { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 170px); min-height: 520px; }
  .msg[data-view="list"] .msg-pane { display: none; }
  .msg[data-view="thread"] .msg-list { display: none; }
  .msg-back { display: inline-flex; }
  .msg-list { border-right: 0; }
  .msg-b { max-width: 88%; }
  .msg-safety { max-height: 30%; overflow-y: auto; }
  .acct-tab { padding: 12px 10px; }
  .acct-panel { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .acct-tab, .msg-item { transition: none; }
}
