/* Styles for the "Find a tradesperson" directory only (classes start "qd-"). Loaded by
   Areas/Directory/Views/Shared/_DirectoryLayout.cshtml. Uses the colour variables from site.css. */

.qd { max-width: 960px; margin: 0 auto; }

/* ---------- Search ---------- */
.qd-hero { text-align: center; padding: 1.25rem 0 1.5rem; }
.qd-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 0.4rem; }
.qd-lead { color: var(--qc-ink-soft); margin: 0 auto 1.25rem; max-width: 560px; }
.qd-search {
  display: grid; grid-template-columns: 1.3fr 1.3fr 0.8fr auto; gap: 0.75rem; align-items: end; text-align: left;
  background: var(--qc-surface); border: 1px solid var(--qc-line); border-radius: var(--qc-radius);
  box-shadow: var(--qc-shadow); padding: 1rem;
}
/* After a search there is a fourth box (business name), so the button drops to its own row. */
.qd-search-more { grid-template-columns: 1.2fr 1.2fr 0.7fr 1.2fr; }
.qd-search-more .qd-search-button { grid-column: 1 / -1; justify-self: end; padding-inline: 1.6rem; }
.qd-search .form-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.25rem; }
.qd-search-button { height: 38px; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.qd-search-button svg { width: 16px; height: 16px; }
.qd-popular { margin: 1rem 0 0; color: var(--qc-muted); font-size: 0.9rem; }
.qd-popular span { display: inline-block; margin: 0.15rem 0.2rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--qc-green-tint); color: var(--qc-green-dark); }
@media (max-width: 767.98px) {
  .qd-search { grid-template-columns: 1fr 1fr; }
  .qd-search-button, .qd-search-more .qd-search-button { grid-column: 1 / -1; justify-content: center; justify-self: stretch; height: 44px; }
}
@media (max-width: 479.98px) {
  .qd-search { grid-template-columns: 1fr; }
}

/* ---------- Results ---------- */
.qd-results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin: 0.5rem 0 0.75rem; }
.qd-results-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.qd-sort { display: flex; gap: 0.6rem; font-size: 0.9rem; color: var(--qc-muted); }
.qd-sort a { text-decoration: none; color: var(--qc-ink-soft); }
.qd-sort a.active { font-weight: 700; color: var(--qc-green); }
.qd-results { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.qd-result-link { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; text-decoration: none; color: inherit; border-radius: inherit; }
.qd-result-link:hover { background: #fafbfa; }
.qd-result h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.15rem; color: var(--qc-ink); }
.qd-result-trades { margin: 0; color: var(--qc-ink-soft); font-size: 0.92rem; }
.qd-result-place { margin: 0.1rem 0 0; color: var(--qc-muted); font-size: 0.88rem; }
.qd-result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; text-align: right; flex-shrink: 0; }
.qd-result-rating { font-size: 0.88rem; font-weight: 600; }
.qd-result-none { font-size: 0.85rem; color: var(--qc-muted); }
.qd-badge { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--qc-green-tint); color: var(--qc-green-dark); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.qd-badge-muted { background: #eceeed; color: var(--qc-ink-soft); }
.qd-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1rem 0 1.5rem; color: var(--qc-muted); font-size: 0.9rem; }
.qd-foot { margin-top: 2rem; }
.qd-sources, .qd-small { font-size: 0.83rem; color: var(--qc-muted); }
.qd-sources { margin-top: 0.75rem; }
@media (max-width: 575.98px) {
  .qd-result-link { flex-direction: column; gap: 0.5rem; }
  .qd-result-side { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; }
}

/* ---------- Stars: grey stars with gold ones laid over, cut to a width ---------- */
.qd-stars { position: relative; display: inline-block; line-height: 1; white-space: nowrap; letter-spacing: 1px; color: #d3dad7; font-size: 1.05rem; vertical-align: middle; }
.qd-stars::before, .qd-stars > span::before { content: "\2605\2605\2605\2605\2605"; }
.qd-stars > span { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; color: #e09a10; }
.qd-stars-0 > span { width: 0; }      .qd-stars-1 > span { width: 10%; }  .qd-stars-2 > span { width: 20%; }
.qd-stars-3 > span { width: 30%; }    .qd-stars-4 > span { width: 40%; }  .qd-stars-5 > span { width: 50%; }
.qd-stars-6 > span { width: 60%; }    .qd-stars-7 > span { width: 70%; }  .qd-stars-8 > span { width: 80%; }
.qd-stars-9 > span { width: 90%; }    .qd-stars-10 > span { width: 100%; }

/* ---------- A listing's page ---------- */
.qd-listing-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.25rem; }
.qd-listing-head { margin-bottom: 1rem; }
.qd-listing-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.qd-listing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
@media (max-width: 767.98px) { .qd-listing-grid { grid-template-columns: 1fr; } }
.qd-prose { white-space: pre-line; overflow-wrap: anywhere; }
.qd-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.qd-contact span { display: block; font-size: 0.78rem; color: var(--qc-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.qd-contact a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.qd-unclaimed { background: #fbfaf5; }
.qd-reviews-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.qd-spread { display: grid; gap: 0.2rem; max-width: 340px; margin: 0.9rem 0 0.4rem; font-size: 0.85rem; color: var(--qc-muted); }
.qd-spread > div { display: grid; grid-template-columns: 3.6rem 1fr 2rem; align-items: center; gap: 0.5rem; }
.qd-spread progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: #eceeed; }
.qd-spread progress::-webkit-progress-bar { background: #eceeed; }
.qd-spread progress::-webkit-progress-value { background: #e09a10; }
.qd-spread progress::-moz-progress-bar { background: #e09a10; }
.qd-review { padding: 0.9rem 0; border-top: 1px solid var(--qc-line); }
.qd-review-preview { border: 1px solid var(--qc-line); border-radius: var(--qc-radius-small); padding: 0.9rem 1rem; }
.qd-review-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-bottom: 0.35rem; font-size: 0.92rem; }
.qd-review .qd-prose { margin-bottom: 0.5rem; }
.qd-reply { margin: 0.5rem 0 0 0.75rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--qc-green); background: var(--qc-green-tint); border-radius: 0 var(--qc-radius-small) var(--qc-radius-small) 0; font-size: 0.93rem; }

/* ---------- Forms ---------- */
.qd-form { max-width: 620px; margin: 0.5rem auto 0; }
.qd-form-wide { max-width: 760px; }
/* The trap for automatic form-fillers: off-screen, so people never see or reach it. */
.qd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qd-rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; }
.qd-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qd-rate label { cursor: pointer; font-size: 2.1rem; line-height: 1; color: #d3dad7; }
.qd-rate label::before { content: "\2605"; }
.qd-rate input:checked ~ label, .qd-rate label:hover, .qd-rate label:hover ~ label { color: #e09a10; }
.qd-rate input:focus-visible + label { outline: 2px solid var(--qc-green); outline-offset: 2px; border-radius: 4px; }
.qd-trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.15rem 1rem; }
.qd-inline-search { display: flex; gap: 0.5rem; }
.qd-matches { list-style: none; padding: 0; margin: 1rem 0 0; }
.qd-matches li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--qc-line); }
.qd-matches li span { display: block; font-size: 0.87rem; }
.qd-matches .btn { flex-shrink: 0; }
.qd-claim-summary { display: grid; gap: 0.1rem; padding: 0.8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--qc-line); border-radius: var(--qc-radius-small); background: #fafbfa; }
.qd-manage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.75rem; margin-bottom: 1rem; }
.qd-manage-rating { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; }
.qd-action { margin-top: 0.4rem; font-size: 0.92rem; }
.qd-action summary { cursor: pointer; color: var(--qc-green); font-weight: 600; width: fit-content; }
.qd-action form { margin-top: 0.5rem; }
