/* AskHole — member dashboard hub (Phase 1).
   Uses the shared brand tokens from askhole-feed.css (var(--ah-purple) etc.), which
   loads site-wide, with hard fallbacks so this file is safe on its own. Light theme
   only — it lives inside the AskHole site chrome, which is light. */

.ah-db {
	--ah-p: var(--ah-purple, #783FF2);
	--ah-ink: #0D1117;
	--ah-ink2: #55607a;
	--ah-ink3: #7a8395;
	--ah-line: #ececf1;
	--ah-card: #fff;
	--ah-bg2: #f6f5fb;
	font-family: 'Inter', system-ui, sans-serif;
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 0 40px;
	color: var(--ah-ink);
}
.ah-db *, .ah-db *::before, .ah-db *::after { box-sizing: border-box; }

/* ---- Header ---- */
.ah-db-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.ah-db-h1 { font-size: clamp(28px, 4vw, 34px); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.01em; color: #0D1117; }
.ah-db-sub { color: var(--ah-ink2); font-size: 15px; margin: 8px 0 0; }
/* Purple action link inside the greeting's action line. */
.ah-db-sub-link { color: var(--ah-purple, #783FF2); font-weight: 700; text-decoration: none; }
.ah-db-sub-link:hover { text-decoration: underline; }

/* ---- Stat tiles ---- */
.ah-db-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.ah-db-tile { display: flex; align-items: center; gap: 14px; background: var(--ah-card); border: 1px solid var(--ah-line); border-radius: 16px; padding: 18px 18px; box-shadow: 0 1px 2px rgba(16,17,33,.03); }
.ah-db-tile-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; }
.ah-db-tile-ico .ah-ic { width: 24px; height: 24px; }
.ah-db-tile-body { display: flex; flex-direction: column; min-width: 0; }
.ah-db-tile-num { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.ah-db-tile-label { font-size: 14px; font-weight: 600; color: var(--ah-ink); margin-top: 1px; }
.ah-db-tile-note { font-size: 12px; color: var(--ah-ink3); margin-top: 3px; }
.ah-db-tile-req   .ah-db-tile-ico { background: #efeafe; color: #6a2fe0; }
.ah-db-tile-offer .ah-db-tile-ico { background: #fbefd8; color: #a8670a; }
.ah-db-tile-deal  .ah-db-tile-ico { background: #dff5ec; color: #0b8a5f; }
.ah-db-tile-done  .ah-db-tile-ico { background: #e6eefe; color: #2456c9; }

/* ---- Body grid ---- */
.ah-db-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.ah-db-main, .ah-db-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.ah-db-card { background: var(--ah-card); border: 1px solid var(--ah-line); border-radius: 16px; padding: 20px 20px 18px; box-shadow: 0 1px 2px rgba(16,17,33,.03); }
.ah-db-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
/* Section headings match the site's H2 token (.ah-home-title / .ah-featured-title): 26px / 500 /
   -.5px, so the dashboard reads as the same family as the homepage sections. */
.ah-db-card-h { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.3px; display: inline-flex; align-items: center; gap: 9px; }
/* Main-column card headings carry a small line-icon (people silhouette, clipboard, heart). */
.ah-db-card-ico { flex: 0 0 auto; display: inline-flex; color: var(--ah-p); }
.ah-db-card-ico .ah-ic { width: 18px; height: 18px; }
.ah-db-viewall { font-size: 13.5px; font-weight: 600; color: var(--ah-p); text-decoration: none !important; white-space: nowrap; }
.ah-db-viewall:hover { text-decoration: underline !important; }
/* "Clear recent activity" sits below the list, styled like "Show all →" (same top gap, left-aligned). */
.ah-act-clear-form { margin-top: 14px; display: inline-flex; }
/* "Show all →" under each dashboard list, linking to the full standalone page. */
.ah-db-showall { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--ah-p); text-decoration: none !important; }
.ah-db-showall:hover { text-decoration: underline !important; }
/* The Clear button reuses the exact "Show all" link look — this neutralises the <button> defaults,
   including the theme's (Astra) submit-button box-shadow + rounded corners, and drops the standalone
   top margin (it sits inline in the card header). */
button.ah-db-showall { appearance: none; -webkit-appearance: none; display: inline-flex; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
/* Kill the theme's (Astra) button hover/focus FILL — it paints the link purple with white text on
   hover. Keep it a plain purple text link (the base .ah-db-showall:hover adds the underline). */
button.ah-db-showall:hover, button.ah-db-showall:focus, button.ah-db-showall:active, button.ah-db-showall:focus-visible { background: none !important; color: var(--ah-p) !important; box-shadow: none !important; }
/* Standalone "My requests" / "I'm on it" pages — same cards as the dashboard, one comfortable column. */
.ah-db-single { max-width: 920px; }
.ah-db-single .ah-db-card { margin-top: 4px; padding-top: 16px; }
/* Vertical alignment with the Dashboard. Plain theme templates (My requests / I'm on it) carry Astra's
   60px `.content-area` top margin, which the Elementor-built Dashboard zeroes out — so those pages sat
   ~60px lower and the rail visibly jumped between pages. Pin the dashboard-family plain pages to 10px,
   which lines their top edge up exactly with the Dashboard (verified: rail 141 / h1 149 on all three).
   Scoped to `.ast-plain-container` so the Elementor Dashboard itself is untouched. */
body.ast-plain-container:has(.ah-db) .content-area { margin-top: 10px !important; }
/* Tighten the description → toolbar gap. On plain theme templates Astra's `.entry-content p` rule
   silently adds a 24px bottom margin to the sub-heading (the Elementor dashboard doesn't get it),
   opening an oversized gap above the filters. Pin it back to the intended spacing. */
.ah-db-sub { margin-bottom: 0 !important; }
.ah-db-single .ah-db-head { margin-bottom: 12px; }

/* ---- My-list filter / sort toolbar — mirrors the Browse Requests toolbar (search + dropdowns),
   inline and always visible, instant client-side filtering (askhole-mylist.js). ---- */
.ah-mylist-toolbar { margin: 0 0 18px; }
/* Match the site's form controls (Browse / sign-up): 48px tall, 12px rounded corners, 1.5px border.
   The theme flattens raw <input>/<select> (≈40px, 4px corners), so pin the toolbar fields with
   !important — same guard Browse uses. Keep the search's left padding for the magnifying glass. */
.ah-mylist-toolbar .ah-search-in { padding: 0 16px 0 42px !important; }
.ah-mylist-toolbar .ah-search-in,
.ah-mylist-toolbar .ah-tb-select {
	height: 48px !important;
	border: 1.5px solid #dcdce4 !important;
	border-radius: 12px !important;
}
.ah-mylist-toolbar .ah-search-in:focus,
.ah-mylist-toolbar .ah-tb-select:focus { border-color: var(--ah-purple, #783FF2) !important; }
.ah-mylist-toolbar .ah-search-in::placeholder { color: #6B7280; }
.ah-mylist-toolbar .ah-mylist-sort,
.ah-mylist-toolbar .ah-mylist-filter { flex: 0 1 170px; }
.ah-mylist-noresults { margin: 18px 2px 0; color: #6a6f7b; font-size: 14.5px; }

@media (max-width: 620px) {
	.ah-mylist-toolbar .ah-search { flex: 1 1 100%; }
	.ah-mylist-toolbar .ah-mylist-sort,
	.ah-mylist-toolbar .ah-mylist-filter { flex: 1 1 46%; }
}

/* ---- Request / on-it rows ---- */
.ah-db-rlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ah-db-row + .ah-db-row { border-top: 1px solid #f0f1f5; }
.ah-db-row-link { display: flex; align-items: center; gap: 14px; padding: 12px 4px; text-decoration: none !important; color: inherit; border-radius: 12px; }
.ah-db-row-link:hover { background: var(--ah-bg2); }
.ah-db-thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #eef0f5; display: inline-flex; align-items: center; justify-content: center; }
.ah-db-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-cat-default { opacity: .35; } /* category-default fallback artwork, rendered subtly */
.ah-db-noimg { width: 100%; height: 100%; background: linear-gradient(135deg, #efeafe, #e6eefe); display: block; }
.ah-db-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-db-row-title { font-size: 15px; font-weight: 600; color: var(--ah-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-db-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ah-ink3); }
.ah-db-row-loc::after { content: "·"; margin-left: 8px; color: #c3c7d2; }
.ah-db-row-budget { font-weight: 600; color: #0b8a5f; }
/* Status pill sits inline in the row meta (the base .ah-badge is absolutely positioned for cards). */
.ah-dash-pill { position: static; top: auto; left: auto; display: inline-block; vertical-align: middle; }

/* Conversations inbox (Messages page) — every thread the member is in, with a last-message preview. */
.ah-inbox { list-style: none; margin: 0; padding: 0; }
.ah-inbox-row { border-bottom: 1px solid var(--ah-line, #ececf1); }
.ah-inbox-row:last-child { border-bottom: 0; }
.ah-inbox-link { display: flex; align-items: center; gap: 14px; padding: 14px 6px; text-decoration: none; color: inherit; border-radius: 10px; }
.ah-inbox-link:hover { background: #faf9fd; }
.ah-inbox-avatar { flex: 0 0 auto; width: 44px; height: 44px; }
.ah-inbox-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.ah-inbox-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ah-inbox-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ah-inbox-name { font-weight: 700; font-size: 15px; color: var(--ah-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-inbox-time { flex: 0 0 auto; font-size: 12px; color: #9096a1; }
.ah-inbox-req { font-size: 13px; color: #6a6f7b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-inbox-snippet { font-size: 13.5px; color: #6a6f7b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-inbox-row.is-unread .ah-inbox-name { color: var(--ah-ink); }
.ah-inbox-row.is-unread .ah-inbox-snippet { color: var(--ah-ink); font-weight: 600; }
.ah-inbox-end { flex: 0 0 auto; }
.ah-inbox-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ah-purple, #783FF2); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.ah-db-row-pros { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; }
/* Saved-row bookmark glyph (right side) — brand purple, matching the card save control. */
.ah-db-saved-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--ah-p, #783FF2); }
.ah-db-saved-ico .ah-ic { width: 20px; height: 20px; }
.ah-db-row-count { font-size: 12.5px; font-weight: 600; color: var(--ah-ink2); }
.ah-db-offerpill { font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #6a2fe0; background: #efeafe; border-radius: 999px; padding: 2px 9px; }

/* Reuse the browse avatar stack sizing inside rows. */
.ah-db-row-pros .ah-card-avatars { display: inline-flex; }

/* Pro avatars with per-Pro signals: a purple ring = new Pro you haven't opened yet; a chat pip =
   there's a thread (grey for read history, purple for a new/unread message). Overlapping stack: the
   newest sits furthest left and on top (decreasing inline z-index), each following avatar tucking
   slightly under it. Every pip still shows because the overlap only eats each avatar's left edge. */
.ah-db-avstack { display: inline-flex; align-items: center; gap: 0; justify-content: flex-end; }
.ah-db-av { position: relative; display: inline-flex; width: 38px; height: 38px; flex: 0 0 auto; }
.ah-db-av + .ah-db-av { margin-left: -12px; } /* overlap; newest (leftmost) stays on top via inline z-index */
/* Force the circular crop — !important so the theme's global img rules can't square it off. Scoped to
   the DIRECT child so it never hits the little chat SVG inside the message badge. */
.ah-db-av > img, .ah-db-av > svg { width: 38px !important; height: 38px !important; border-radius: 50% !important; border: 2px solid #fff !important; box-shadow: 0 0 0 1px #ececf1 !important; box-sizing: border-box; object-fit: cover; display: block; background: #fff; } /* white ring + faint grey hairline — matches Browse Requests card avatars so the overlap reads as separate circles. !important because Ultimate Member's .um-avatar rules force border:0 / box-shadow:none. */
.ah-db-av.is-new > img, .ah-db-av.is-new > svg { box-shadow: 0 0 0 2px var(--ah-p, #783FF2) !important; }
/* A round speech-bubble on the avatar corner: grey for read chat history, purple for a new/unread
   message. No number — deliberately simple. */
.ah-db-av-msg { position: absolute; right: -7px; bottom: -7px; width: 27px; height: 27px; border-radius: 50%; background: #e2dfeb; color: #4b5563; border: 2px solid #fff; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ah-db-av-msg.is-unread { background: #6a2fe0; color: #fff; } /* AskHole CTA purple — a new message stands out */
.ah-db-av-msg .ah-ic { flex: 0 0 auto; width: 15px; height: 15px; } /* flex:none so the row's shrink can't squish the bubble's width */
/* Unread count on the top-left corner of the purple bubble — a little circle with 1, 2, … 9+. */
.ah-db-av-count { position: absolute; top: -6px; left: -6px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: #fff; color: #6a2fe0; border: 1.5px solid #6a2fe0; box-sizing: border-box; font-size: 10px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.ah-db-av-more { margin-left: 3px; font-size: 12px; font-weight: 700; color: #6a6f7b; }
/* The "+N" count circle: an avatar-sized disc stacked behind the newest avatar when 3+ Pros are on it. */
.ah-db-avmore { border-radius: 50%; background: #ece9f6; color: #6a2fe0; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 1px #ececf1; box-sizing: border-box; }
/* Avatars on top, the "New message(s)" pill directly below and centred under the avatar cluster.
   The column itself sits right-aligned in the card (via .ah-db-row-pros), so the group hugs the
   right while the pill stays centred beneath the avatars rather than jutting out to the left. */
.ah-db-av-col { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.ah-db-newmsg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; background: #6a2fe0; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.55; white-space: nowrap; } /* CTA purple — matches the unread avatar bubble */
.ah-db-newmsg .ah-ic { flex: 0 0 auto; width: 13px; height: 13px; }

/* ---- Activity list ---- */
.ah-act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ah-act-row + .ah-act-row { border-top: 1px solid #f0f1f5; }
.ah-act-link { display: flex; align-items: flex-start; gap: 12px; padding: 11px 4px; text-decoration: none !important; color: inherit; border-radius: 10px; }
.ah-act-link:hover { background: var(--ah-bg2); }
.ah-act-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f1f2f6; color: #667085; }
.ah-act-ico .ah-ic { width: 18px; height: 18px; }
.ah-act-new_offer .ah-act-ico { background: #efeafe; color: #6a2fe0; }
.ah-act-deal_won .ah-act-ico { background: #fbefd8; color: #a8670a; }
.ah-act-offer_submitted .ah-act-ico { background: #dff5ec; color: #0b8a5f; }
.ah-act-request_completed .ah-act-ico { background: #e6eefe; color: #2456c9; }
.ah-act-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ah-act-text { font-size: 14px; color: var(--ah-ink); line-height: 1.35; }
.ah-act-time { font-size: 12px; color: var(--ah-ink3); }
.ah-act-list-full .ah-act-link { padding: 14px 6px; }

/* ---- Quick actions ---- */
.ah-db-qas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
/* Flat shortcuts, not cards — no border/white fill (that read as cards nested inside the Quick actions
   card); the light-purple icon chip carries the structure, a soft hover fill gives the affordance. */
.ah-db-qa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 14px 8px; border: 0; border-radius: 14px; text-decoration: none !important; color: var(--ah-ink); background: transparent; position: relative; transition: background .12s; }
.ah-db-qa:hover { background: var(--ah-bg2); }
.ah-db-qa-ico { width: 40px; height: 40px; border-radius: 11px; background: #f4f2fd; color: var(--ah-p); display: inline-flex; align-items: center; justify-content: center; }
.ah-db-qa-ico .ah-ic { width: 21px; height: 21px; }
.ah-db-qa-label { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.ah-db-qa.is-soon { opacity: .72; cursor: default; }
.ah-db-qa.is-soon:hover { background: transparent; }
.ah-db-qa-soon { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8a8f98; background: #f1f2f6; border-radius: 999px; padding: 2px 6px; }

/* ---- Empty states ---- */
.ah-db-empty { text-align: center; padding: 26px 16px; color: var(--ah-ink2); }
.ah-db-empty p { margin: 0 0 14px; font-size: 14.5px; }
.ah-db-empty-sm { padding: 18px 12px; }
.ah-db-empty-sm p { margin: 0; }
.ah-db-empty .ah-btn { display: inline-flex; }

/* ---- Trust banner ---- */
.ah-db-banner { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 18px 24px; background: #f4f1ff; border: 1px solid #e6ddfd; border-radius: 16px; }
.ah-db-banner-ico { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--ah-p); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(120,63,242,.14); }
.ah-db-banner-ico .ah-ic { width: 24px; height: 24px; }
.ah-db-banner-copy { display: flex; flex-direction: column; gap: 2px; }
.ah-db-banner-copy strong { font-size: 15px; font-weight: 700; color: #4a2ca8; }
.ah-db-banner-copy span { font-size: 13.5px; color: var(--ah-ink2); }

/* ---- Favourites page ---- */
.ah-favourites { max-width: 1180px; margin: 0 auto; }
.ah-fav-head { margin-bottom: 18px; }
.ah-activity-page { max-width: 780px; margin: 0 auto; }
.ah-activity-page .ah-browse-h1 { margin-bottom: 14px; }
.ah-act-list-full { border: 1px solid var(--ah-line, #e0e2e8); border-radius: 16px; background: #fff; padding: 4px 12px; }

/* ---- Saved (favourited) bookmark state — the persisted fill ---- */
.ah-rcard-save.is-saved { color: var(--ah-purple, #783FF2); }
.ah-rcard-save.is-saved svg path { fill: currentColor; stroke: currentColor; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
	.ah-db-grid { grid-template-columns: 1fr; }
	.ah-db-tiles { grid-template-columns: repeat(2, 1fr); }
	/* Mobile only: the cards are borderless/transparent here, so their side padding just pushed
	   content inward (heading at 40px vs the greeting/tiles at 20px). Drop it so card content lines
	   up with the greeting. Desktop keeps the padding. */
	.ah-db-card { padding-left: 0; padding-right: 0; }
}
@media (max-width: 560px) {
	.ah-db-head { gap: 14px; }
	.ah-db-tile { padding: 14px; gap: 12px; }
	.ah-db-tile-ico { width: 42px; height: 42px; }
	.ah-db-tile-num { font-size: 23px; }
	.ah-db-qas { grid-template-columns: repeat(3, 1fr); }
	.ah-db-thumb { width: 48px; height: 48px; }
}
