/* =====================================================================
   Find a Provider — customer requirements and matching providers.

   Question-based matching, so the page reads as a journey:
   Answer Questions -> Find Providers -> Review Profiles -> Choose.

   Deliberately NOT the Get Quotes look: no comparison hero, no amount
   column, no offer cards. Colours come from the shared --ts-* palette in
   truelysell-core.css.
   ===================================================================== */

/* The submission screen renders the same provider cards, so it needs the
   same tokens; the page background below stays on .fp-page only. */
.fp-page,
.pr-page {
    --fp-line: var(--ts-line, rgba(16, 24, 40, .09));
    --fp-line-strong: var(--ts-line-strong, rgba(16, 24, 40, .14));
    --fp-ink: var(--ts-ink, #101828);
    --fp-body: var(--ts-body, #475467);
    --fp-muted: var(--ts-faint, #98a2b3);
    --fp-brand: var(--ts-brand, #fd2692);
    --fp-blue: var(--ts-blue, #0a67f2);
    --fp-green: var(--ts-green, #12b76a);
    --fp-amber: var(--ts-amber, #f79009);

}

.fp-page {
    background: #f6f7f9;
    padding: clamp(24px, 3.4vw, 44px) 0 clamp(44px, 6vw, 76px);
}

/* The theme's .content paints an opaque slab over the page background. */
.fp-page .content { background: transparent; }

/* ---- Shared controls ---- */
.fp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border: 1px solid transparent; border-radius: 10px;
    font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
    text-decoration: none; cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.fp-btn.is-lg { padding: 12px 22px; font-size: 14.5px; border-radius: 12px; }
.fp-btn i { font-size: 15px; }

.fp-btn.is-primary { background: var(--fp-brand); color: #fff; }
.fp-btn.is-primary:hover { background: var(--ts-brand-dark, #e01a80); color: #fff; }

.fp-btn.is-ghost { background: #fff; border-color: var(--fp-line-strong); color: #344054; }
.fp-btn.is-ghost:hover { border-color: rgba(16, 24, 40, .3); color: var(--fp-ink); }

.fp-btn.is-soft { background: rgba(10, 103, 242, .08); color: var(--fp-blue); }
.fp-btn.is-soft:hover { background: rgba(10, 103, 242, .14); color: var(--fp-blue); }

.fp-btn.is-danger { background: var(--ts-red, #f04438); color: #fff; }
.fp-btn.is-danger:hover { background: #d92d20; color: #fff; }

.fp-btn:focus-visible,
.fp-select:focus-visible,
.fp-search input:focus-visible {
    outline: 2px solid var(--fp-brand); outline-offset: 2px;
}

.fp-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    border: 1px solid var(--fp-line-strong); border-radius: 10px;
    background: #fff; color: var(--fp-muted); cursor: pointer;
    transition: border-color .18s ease, color .18s ease;
}
.fp-icon-btn:hover { border-color: rgba(240, 68, 56, .4); color: var(--ts-red, #f04438); }
.fp-icon-btn i { font-size: 16px; }

/* =====================================================================
   Entry section
   ===================================================================== */
.fp-hero {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(24px, 3vw, 44px); align-items: center;
    padding: clamp(24px, 3vw, 36px);
    margin-bottom: 22px;
    border: 1px solid var(--fp-line); border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.fp-hero-text { min-width: 0; }

.fp-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px; margin-bottom: 14px;
    border: 1px solid rgba(253, 38, 146, .22); border-radius: 999px;
    background: rgba(253, 38, 146, .07); color: var(--fp-brand);
    font-size: 11.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
}
.fp-eyebrow i { font-size: 14px; }

.fp-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.8vw, 32px); font-weight: 700;
    letter-spacing: -.025em; color: var(--fp-ink);
}
.fp-lead {
    margin: 0 0 22px; max-width: 54ch;
    font-size: 14.5px; line-height: 1.6; color: var(--fp-body);
}
.fp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Journey: Answer -> Find -> Review -> Choose -> Book or Get Quotes ---- */
.fp-journey {
    list-style: none; margin: 0; padding: 20px;
    border: 1px solid var(--fp-line); border-radius: 14px;
    background: #fbfcfd;
}
.fp-journey li {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 16px;
}
.fp-journey li:last-child { padding-bottom: 0; }

/* Connector between the steps, drawn behind the numbers. */
.fp-journey li:not(:last-child)::before {
    content: ""; position: absolute; left: 15px; top: 30px; bottom: 2px;
    width: 2px; background: var(--fp-line-strong); border-radius: 2px;
}

.fp-journey-num {
    position: relative; z-index: 1; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 1px solid var(--fp-line-strong);
    font-size: 11.5px; font-weight: 700; color: var(--fp-muted);
    font-variant-numeric: tabular-nums;
}
.fp-journey li:first-child .fp-journey-num {
    background: var(--fp-brand); border-color: var(--fp-brand); color: #fff;
}
.fp-journey-label { font-size: 13.5px; font-weight: 600; color: var(--fp-ink); }

/* =====================================================================
   Stats
   ===================================================================== */
.fp-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px; margin-bottom: 22px;
}
.fp-stat {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--fp-line); border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.fp-stat-icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 11px;
    font-size: 19px;
}
.fp-stat-icon.is-total    { background: rgba(253, 38, 146, .1); color: var(--fp-brand); }
.fp-stat-icon.is-open     { background: rgba(10, 103, 242, .1); color: var(--fp-blue); }
.fp-stat-icon.is-response { background: rgba(247, 144, 9, .12); color: var(--fp-amber); }
.fp-stat-icon.is-chosen   { background: rgba(18, 183, 106, .12); color: var(--fp-green); }

.fp-stat-meta { display: flex; flex-direction: column; min-width: 0; }
.fp-stat-value {
    font-size: 21px; font-weight: 700; letter-spacing: -.02em;
    color: var(--fp-ink); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.fp-stat-label { font-size: 12.5px; color: var(--fp-body); }

/* =====================================================================
   Panels
   ===================================================================== */
.fp-panel {
    border: 1px solid var(--fp-line); border-radius: 18px;
    background: #fff; margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.fp-panel-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 20px 22px; border-bottom: 1px solid var(--fp-line);
}
.fp-panel-head h2 {
    margin: 0 0 3px; font-size: 17px; font-weight: 650;
    letter-spacing: -.015em; color: var(--fp-ink);
}
.fp-panel-head p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--fp-body); }
.fp-panel-count {
    flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
    background: rgba(16, 24, 40, .05); color: var(--fp-body);
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

/* ---- Toolbar ---- */
.fp-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 16px 22px; border-bottom: 1px solid var(--fp-line);
}
.fp-search { position: relative; flex: 1 1 240px; min-width: 0; }
.fp-search i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    font-size: 16px; color: var(--fp-muted); pointer-events: none;
}
.fp-search input.form-control {
    height: 42px; padding: 0 14px 0 38px;
    border: 1px solid var(--fp-line-strong); border-radius: 10px;
    background: #fff; font-size: 13.5px; color: var(--fp-ink); box-shadow: none;
}
.fp-search input::placeholder { color: var(--fp-muted); }

.fp-select {
    height: 42px; padding: 0 34px 0 13px;
    border: 1px solid var(--fp-line-strong); border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center;
    font-size: 13.5px; font-weight: 500; color: #344054;
    appearance: none; cursor: pointer;
}

/* =====================================================================
   Requirement cards
   ===================================================================== */
.fp-list { padding: 8px 22px 22px; }

.fp-card {
    padding: 18px 20px;
    border: 1px solid var(--fp-line); border-radius: 14px;
    background: #fff; margin-top: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.fp-card:hover {
    border-color: var(--fp-line-strong);
    box-shadow: 0 10px 26px rgba(16, 24, 40, .07);
}

.fp-card-top { display: flex; align-items: flex-start; gap: 13px; }
.fp-card-icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 11px;
    background: rgba(253, 38, 146, .09); color: var(--fp-brand); font-size: 19px;
}
.fp-card-headings { flex: 1 1 auto; min-width: 0; }

.fp-card-title {
    margin: 0 0 6px; font-size: 15.5px; font-weight: 650;
    letter-spacing: -.01em; line-height: 1.35;
}
.fp-card-title a { color: var(--fp-ink); text-decoration: none; }
.fp-card-title a:hover { color: var(--fp-brand); }

.fp-card-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    font-size: 12.5px; color: var(--fp-body);
}
.fp-card-meta i { font-size: 14px; margin-right: 4px; vertical-align: -2px; }
.fp-chip {
    padding: 3px 10px; border-radius: 999px;
    background: rgba(16, 24, 40, .05); font-weight: 600; color: #344054;
}

.fp-status {
    flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 650; white-space: nowrap;
}
.fp-status.is-open     { background: rgba(10, 103, 242, .1);  color: #0a4fbc; }
.fp-status.is-selected { background: rgba(18, 183, 106, .12); color: #027a48; }
.fp-status.is-closed   { background: rgba(16, 24, 40, .07);   color: var(--fp-body); }

/* Answer highlights, so a card is recognisable without opening it. */
.fp-answers { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0 53px; }
.fp-answer {
    padding: 4px 11px; border: 1px solid var(--fp-line); border-radius: 8px;
    background: #fbfcfd; font-size: 12.5px; color: var(--fp-body);
}

.fp-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fp-line);
}
.fp-matches {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 500; color: var(--fp-body);
}
.fp-matches i { font-size: 16px; color: var(--fp-muted); }
.fp-matches.is-active { font-weight: 600; color: var(--fp-ink); }
.fp-matches.is-active i { color: var(--fp-green); }

.fp-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* =====================================================================
   Requirement details
   ===================================================================== */
.fp-crumbs {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-bottom: 16px; font-size: 13px; color: var(--fp-muted);
}
.fp-crumbs a { color: var(--fp-body); text-decoration: none; }
.fp-crumbs a:hover { color: var(--fp-ink); }
.fp-crumbs i { font-size: 14px; }

.fp-overview-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 22px 22px 18px;
}
.fp-detail-title {
    margin: 0 0 4px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 700;
    letter-spacing: -.02em; color: var(--fp-ink);
}
.fp-detail-sub {
    margin: 0; font-size: 11.5px; font-weight: 650;
    letter-spacing: .1em; text-transform: uppercase; color: var(--fp-muted);
}

.fp-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px 24px; margin: 0;
    padding: 18px 22px 22px; border-top: 1px solid var(--fp-line);
}
.fp-fact { min-width: 0; }
.fp-fact dt {
    margin-bottom: 4px; font-size: 10.5px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--fp-muted);
}
.fp-fact dd {
    margin: 0; font-size: 14.5px; font-weight: 650; color: var(--fp-ink);
    font-variant-numeric: tabular-nums; word-break: break-word;
}

/* ---- Questions and answers ---- */
.fp-qa { padding: 18px 22px; border-bottom: 1px solid var(--fp-line); }
.fp-qa:last-of-type { border-bottom: 0; }

.fp-qa-question {
    display: block; margin-bottom: 9px;
    font-size: 14.5px; font-weight: 650; color: var(--fp-ink); line-height: 1.45;
}
.fp-qa-values { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-qa-value {
    padding: 6px 13px; border: 1px solid rgba(253, 38, 146, .2); border-radius: 9px;
    background: rgba(253, 38, 146, .06);
    font-size: 13.5px; font-weight: 550; color: #b0136a;
}
.fp-qa-input.form-control {
    height: 42px; border: 1px solid var(--fp-line-strong); border-radius: 10px;
    font-size: 13.5px; color: var(--fp-ink); box-shadow: none;
}
.fp-qa-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 22px; border-top: 1px solid var(--fp-line);
}

/* =====================================================================
   Matching providers
   ===================================================================== */
.fp-providers {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; padding: 20px 22px 22px;
}
.fp-provider {
    display: flex; flex-direction: column; gap: 12px;
    padding: 18px;
    border: 1px solid var(--fp-line); border-radius: 14px; background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.fp-provider:hover {
    border-color: var(--fp-line-strong);
    box-shadow: 0 10px 26px rgba(16, 24, 40, .07);
}

.fp-provider-top { display: flex; align-items: flex-start; gap: 12px; }
.fp-provider-avatar { flex: 0 0 auto; }
.fp-provider-avatar img {
    width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
    border: 1px solid var(--fp-line);
}
.fp-provider-initial {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(16, 24, 40, .06); color: var(--fp-body);
    font-size: 18px; font-weight: 700;
}
.fp-provider-id { min-width: 0; }
.fp-provider-id h3 {
    display: flex; align-items: center; gap: 5px;
    margin: 0 0 4px; font-size: 15px; font-weight: 650; color: var(--fp-ink);
    line-height: 1.3;
}
.fp-verified { font-size: 15px; color: var(--fp-blue); }

.fp-provider-cat {
    display: block; margin-bottom: 3px;
    font-size: 12.5px; color: var(--fp-body);
}
.fp-provider-rating {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12.5px; font-weight: 650; color: var(--fp-ink);
}
.fp-provider-rating i { font-size: 14px; color: var(--fp-amber); }
.fp-provider-rating small { font-weight: 500; color: var(--fp-muted); }

.fp-provider-loc {
    display: flex; align-items: flex-start; gap: 6px; margin: 0;
    font-size: 12.5px; line-height: 1.5; color: var(--fp-body);
}
.fp-provider-loc i { flex: 0 0 auto; font-size: 15px; color: var(--fp-muted); margin-top: 1px; }

.fp-provider-services { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-service-chip {
    padding: 4px 10px; border: 1px solid var(--fp-line); border-radius: 8px;
    background: #fbfcfd; font-size: 12px; color: var(--fp-body);
}
.fp-service-chip.is-more { font-weight: 650; color: var(--fp-ink); }

.fp-provider-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--fp-line);
}
.fp-provider-actions .fp-btn { flex: 1 1 auto; padding: 8px 12px; font-size: 12.5px; }

/* =====================================================================
   Empty states
   ===================================================================== */
.fp-empty { padding: 52px 24px; text-align: center; }
.fp-empty.is-inline { padding: 44px 24px; }
.fp-empty-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; margin-bottom: 16px; border-radius: 16px;
    background: rgba(16, 24, 40, .05); color: var(--fp-muted); font-size: 28px;
}
.fp-empty h3 {
    margin: 0 0 7px; font-size: 18px; font-weight: 650;
    letter-spacing: -.015em; color: var(--fp-ink);
}
.fp-empty p {
    margin: 0 auto; max-width: 46ch;
    font-size: 14px; line-height: 1.6; color: var(--fp-body);
}
.fp-empty-actions {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px;
}
.fp-empty #fpClearFilters { margin-top: 18px; }

/* =====================================================================
   Loading skeleton
   ===================================================================== */
.fp-skeleton { padding-top: 8px; }
.fp-skel-card {
    display: flex; gap: 13px; padding: 18px 20px; margin-top: 14px;
    border: 1px solid var(--fp-line); border-radius: 14px; background: #fff;
}
.fp-skel {
    display: block; border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(16, 24, 40, .05) 25%, rgba(16, 24, 40, .09) 37%, rgba(16, 24, 40, .05) 63%)
        0 0 / 400% 100%;
    animation: ts-shimmer 1.5s ease-in-out infinite;
}
.fp-skel-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; }
.fp-skel-lines { flex: 1 1 auto; min-width: 0; }
.fp-skel-line { height: 10px; }
.fp-skel-line + .fp-skel-line { margin-top: 10px; }
.fp-skel-line.is-title { height: 15px; width: 58%; }
.fp-skel-line.is-short { width: 34%; }

@media (prefers-reduced-motion: reduce) {
    .fp-skel { animation: none; }
    .fp-btn, .fp-card, .fp-provider { transition: none; }
}

/* =====================================================================
   Delete confirmation
   ===================================================================== */
.fp-modal .modal-content {
    border: 1px solid var(--ts-line, rgba(16, 24, 40, .09)); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
}
.fp-modal .modal-body { padding: 30px 28px; text-align: center; }
.fp-modal-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px;
    font-size: 26px;
}
.fp-modal-icon.is-danger { background: rgba(240, 68, 56, .1); color: var(--ts-red, #f04438); }
.fp-modal h3 {
    margin: 0 0 7px; font-size: 18px; font-weight: 650;
    color: var(--ts-ink, #101828);
}
.fp-modal p {
    margin: 0 auto; max-width: 40ch;
    font-size: 14px; line-height: 1.6; color: var(--ts-body, #475467);
}
.fp-modal-actions {
    display: flex; justify-content: center; gap: 10px; margin-top: 22px;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1199px) {
    .fp-hero { grid-template-columns: minmax(0, 1fr); }
    .fp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .fp-journey { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
    .fp-journey li { padding-bottom: 0; }
    .fp-journey li:not(:last-child)::before { display: none; }
}

@media (max-width: 767px) {
    .fp-hero { padding: 22px 18px; }
    .fp-panel-head, .fp-toolbar { padding: 16px 16px; }
    .fp-list { padding: 4px 16px 18px; }
    .fp-overview-head, .fp-facts, .fp-qa, .fp-qa-actions, .fp-providers { padding-left: 16px; padding-right: 16px; }

    .fp-search { flex: 1 1 100%; }
    .fp-select { flex: 1 1 calc(50% - 5px); }

    .fp-card-top { flex-wrap: wrap; }
    .fp-status { order: 3; }
    .fp-answers { margin-left: 0; }

    .fp-card-foot { flex-direction: column; align-items: stretch; }
    .fp-card-actions { justify-content: flex-end; }

    /* Tap targets stay comfortable on a phone. */
    .fp-btn { padding: 11px 16px; }
    .fp-provider-actions .fp-btn { flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 479px) {
    .fp-stats { grid-template-columns: minmax(0, 1fr); }
    .fp-hero-actions .fp-btn { flex: 1 1 100%; }
    .fp-providers { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Editing answers: the question's own option cards ---- */
.fp-options {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px;
}
.fp-option { position: relative; margin: 0; cursor: pointer; }
.fp-option input {
    position: absolute; opacity: 0; width: 0; height: 0;
}
.fp-option-face {
    display: block; padding: 12px 14px;
    border: 1px solid var(--fp-line-strong); border-radius: 11px;
    background: #fff; font-size: 13.5px; font-weight: 550; color: #344054;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.fp-option:hover .fp-option-face { border-color: rgba(16, 24, 40, .28); }

.fp-option input:checked + .fp-option-face {
    border-color: var(--fp-brand);
    background: rgba(253, 38, 146, .06);
    color: #b0136a;
}
.fp-option input:focus-visible + .fp-option-face {
    outline: 2px solid var(--fp-brand); outline-offset: 2px;
}

/* Requirement card facts: matched providers, responses, questions answered. */
.fp-card-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-width: 0; }
