/* =====================================================
   NTH Specialist Directory v10.7 — frontend styles
   All rules scoped under #nth-dir and !important to
   prevent conflicts with any WordPress theme CSS.
   Changes vs 10.6:
     - Removed dropdown search-bar styles
     - Added .nth-notsure (Q&A redirect button)
     - Added .nth-request (Looking for something else?)
     - Added .nth-other-wrap lang-Other text input
     - Updated card: one-liner + works-with line
   ===================================================== */

/* Reserve scrollbar gutter so the filter bar centering
   does not shift when cards load and the page gets tall
   enough to need a scrollbar. */
html { scrollbar-gutter: stable; }

/* ─── Root isolation ─── */
#nth-dir,
#nth-dir *,
#nth-dir *::before,
#nth-dir *::after { box-sizing: border-box !important; }

#nth-dir {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    font-size: 15px !important;
    color: #020101 !important;
    line-height: 1.6 !important;
    background: #FFFCF8 !important;
}

/* ─── Neutralise WP theme interference ─── */
#nth-dir ul, #nth-dir ol { list-style: none !important; padding: 0 !important; margin: 0 !important; }
#nth-dir li              { list-style: none !important; }
#nth-dir h1, #nth-dir h2, #nth-dir h3, #nth-dir h4 { margin: 0 !important; padding: 0 !important; font-family: inherit !important; }
#nth-dir p               { margin: 0 !important; padding: 0 !important; color: inherit !important; }
#nth-dir a               { text-decoration: none !important; color: inherit !important; background: transparent !important; }
#nth-dir button          { font-family: inherit !important; margin: 0 !important; }
#nth-dir input, #nth-dir select, #nth-dir textarea { font-family: inherit !important; color: #020101 !important; background: #fff !important; }
#nth-dir img             { max-width: 100% !important; height: auto !important; }
#nth-dir svg             { display: inline-block !important; vertical-align: middle !important; max-width: 100% !important; }
#nth-dir .nth-card svg   { width: auto !important; height: auto !important; max-width: 20px !important; max-height: 20px !important; flex-shrink: 0 !important; }
#nth-dir .nth-hidden     { display: none !important; }

/* ─── Filter bar ─── */
#nth-fb   { position: relative !important; margin-bottom: 4px !important; }
.nth-frow { display: flex; justify-content: center !important; align-items: center !important; gap: 8px !important; flex-wrap: wrap !important; margin-bottom: 10px !important; }
.nth-frow.nth-frow-hidden { display: none !important; }
#nth-fbp-sec { border-top: 1px solid #eee8df !important; padding-top: 10px !important; margin-bottom: 12px !important; }

/* ─── Filter pills ─── */
.nth-pill {
    display: inline-flex !important; align-items: center !important; gap: 6px !important;
    padding: 10px 18px !important; background: #5C8607 !important;
    border: none !important; border-radius: 40px !important;
    font-size: 14px !important; font-weight: 600 !important; color: #fff !important;
    cursor: pointer !important; white-space: nowrap !important; font-family: inherit !important;
    outline: none !important; flex-shrink: 0 !important; letter-spacing: .01em !important;
    line-height: 1 !important; text-transform: none !important;
    box-shadow: none !important; text-shadow: none !important;
    transition: background .15s, transform .1s !important;
}
.nth-pill:hover { background: #4a6d05 !important; transform: translateY(-1px) !important; }
.nth-pill svg.nth-darr { width: 11px !important; height: 11px !important; flex-shrink: 0 !important; fill: none !important; stroke: #fff !important; stroke-width: 3 !important; stroke-linecap: round !important; transition: transform .18s !important; }
.nth-pill.is-open svg.nth-darr { transform: rotate(180deg) !important; }
.nth-sec-pill       { background: #7aac14 !important; }
.nth-sec-pill:hover { background: #5C8607 !important; }

/* ─── Refine toggle ─── */
#nth-refine-toggle {
    display: inline-flex !important; align-items: center !important; gap: 7px !important;
    padding: 10px 18px !important; background: #fff !important;
    border: 2px solid #5C8607 !important; border-radius: 40px !important;
    font-size: 14px !important; font-weight: 700 !important; color: #5C8607 !important;
    cursor: pointer !important; font-family: inherit !important; outline: none !important;
    white-space: nowrap !important; flex-shrink: 0 !important; line-height: 1 !important;
    box-shadow: none !important; text-shadow: none !important; transition: all .15s !important;
}
#nth-refine-toggle:hover   { background: #f4fae8 !important; }
#nth-refine-toggle.is-open { background: #5C8607 !important; color: #fff !important; border-color: #5C8607 !important; }
.nth-ricon { width: 15px !important; height: 15px !important; flex-shrink: 0 !important; fill: none !important; stroke: #5C8607 !important; stroke-width: 2 !important; stroke-linecap: round !important; transition: stroke .15s !important; }
.nth-rarr  { width: 11px !important; height: 11px !important; fill: none !important; stroke: #5C8607 !important; stroke-width: 3 !important; stroke-linecap: round !important; transition: transform .18s, stroke .15s !important; flex-shrink: 0 !important; }
#nth-refine-toggle.is-open .nth-ricon { stroke: #fff !important; }
#nth-refine-toggle.is-open .nth-rarr  { stroke: #fff !important; }
.nth-rbadge {
    display: inline-flex; align-items: center !important; justify-content: center !important;
    background: #5C8607 !important; color: #fff !important;
    font-size: 10px !important; font-weight: 700 !important;
    min-width: 18px !important; height: 18px !important; border-radius: 50% !important;
    margin-left: 2px !important; padding: 0 5px !important;
}
#nth-refine-toggle.is-open .nth-rbadge { background: rgba(255,255,255,.25) !important; }

/* ─── Reset button ─── */
#nth-reset-btn {
    display: none; align-items: center; gap: 5px;
    padding: 9px 15px !important; background: none !important;
    border: 1.5px solid #d1d5db !important; border-radius: 40px !important;
    font-size: 13px !important; font-weight: 500 !important; color: #020101 !important;
    cursor: pointer !important; font-family: inherit !important;
    white-space: nowrap !important; flex-shrink: 0 !important; outline: none !important;
    line-height: 1 !important; transition: border-color .15s, color .15s !important;
}
#nth-reset-btn:hover { border-color: #ef4444 !important; color: #ef4444 !important; }

/* ─── Results count bar ─── */
#nth-results-bar { display: none; align-items: center; gap: 6px; font-size: 13px !important; color: #020101 !important; margin-bottom: 18px !important; padding: 4px 0 !important; }
#nth-count-num   { font-size: 15px !important; font-weight: 700 !important; color: #5C8607 !important; }
#nth-count-lbl   { color: #020101 !important; font-weight: 400 !important; }

/* ─── Dropdown overlay ─── */
#nth-dropdown {
    position: absolute !important; top: calc(100% + 8px) !important;
    left: 0; z-index: 99999 !important;
    display: none; animation: nth-dropin .14s ease;
}
@keyframes nth-dropin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.nth-dbox {
    background: #fff !important; border: 1px solid #e4dbd0 !important;
    border-radius: 16px !important; box-shadow: 0 12px 48px rgba(0,0,0,.15) !important;
    overflow: hidden !important; display: flex !important; flex-direction: column !important;
    max-height: 520px !important;
}

/* ─── STYLE 1 — Dropdown title + all section labels ───
   Dropdown title, group headings ("Therapy & counselling"), Not sure,
   Looking for something else, Other — all identical. Sentence case only.
   No uppercase, no heavy weight contrast, no letter-spacing tricks. */
.nth-dtitle,
.nth-ghead,
.nth-ghead--notsure,
.nth-request-head,
.nth-notsure-body strong {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #5C8607 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    background: transparent !important;
}

.nth-dtitle {
    padding: 16px 18px 10px !important; border-bottom: none !important; flex-shrink: 0 !important;
}
.nth-ghead {
    padding: 12px 18px 6px !important; border-top: 1px solid #f0ebe3 !important; margin-top: 2px !important;
}
.nth-ghead:first-child { border-top: none !important; margin-top: 0 !important; padding-top: 6px !important; }
.nth-ghead--notsure {
    margin-top: 10px !important;
    padding: 12px 18px 6px !important;
    border-top: 1px solid #f0ebe3 !important;
}
.nth-ghead--notsure:first-child {
    margin-top: 6px !important;
    padding-top: 8px !important;
}

/* ─── STYLE 2 — Helper text + all checkbox option labels ───
   Dropdown description, option labels, Not-sure description,
   Looking-for-something-else intro + sub. Identical size, weight, colour. */
.nth-ddesc,
.nth-clbl,
.nth-notsure-body p,
.nth-request-intro,
.nth-request-sub,
p.nth-request-intro,
p.nth-request-sub,
.nth-dropdown .nth-request-intro,
.nth-dropdown .nth-request-sub {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #020101 !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.nth-ddesc {
    padding: 0 18px 14px !important; background: transparent !important;
    border-bottom: 1px solid #f0ebe3 !important; flex-shrink: 0 !important;
}

/* List scroll area */
#nth-drop-list   { overflow-y: auto !important; flex: 1 1 auto !important; min-height: 60px !important; }
#nth-drop-footer { flex: 0 0 auto !important; position: static !important; }

/* Check rows */
.nth-crow {
    display: flex; align-items: flex-start !important; gap: 11px !important;
    padding: 9px 18px !important; cursor: pointer !important;
    transition: background .1s !important; margin: 0 !important;
    background: transparent !important; border: none !important;
}
.nth-crow:hover { background: #f7f3ee !important; }
.nth-chkinput   { position: absolute !important; opacity: 0 !important; width: 0 !important; height: 0 !important; pointer-events: none !important; }
.nth-chkbox {
    width: 17px !important; height: 17px !important; min-width: 17px !important;
    border: 1.5px solid #ccc !important; border-radius: 4px !important; background: #fff !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    margin-top: 2px !important; transition: all .13s !important; flex-shrink: 0 !important;
}
.nth-chkinput:checked ~ .nth-chkbox { background: #5C8607 !important; border-color: #5C8607 !important; }
.nth-chkinput:checked ~ .nth-chkbox::after {
    content: "" !important; width: 8px !important; height: 5px !important;
    border-left: 2px solid #fff !important; border-bottom: 2px solid #fff !important;
    transform: rotate(-45deg) !important; margin-bottom: 2px !important; display: block !important;
}
.nth-clbl { flex: 1 !important; cursor: pointer !important; margin: 0 !important; }

/* Not sure — primary fallback (Q&A). Stronger than the request block.
   Sits flush under the "NOT SURE?" heading (no gap). The visual separation
   from the option groups above is provided by the border on the heading. */
.nth-notsure {
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    gap: 12px !important; padding: 4px 18px 10px !important;
    background: transparent !important; border-top: none !important;
    border-bottom: none !important; margin: 0 !important;
}
.nth-notsure-body strong { display: block !important; margin-bottom: 4px !important; }
.nth-notsure-body p      { margin: 0 !important; }
.nth-notsure-btn {
    display: inline-flex !important; align-items: center !important;
    padding: 9px 18px !important; border: none !important; border-radius: 6px !important;
    background: #5C8607 !important; color: #ffffff !important;
    font-size: 13px !important; font-weight: 600 !important; cursor: pointer !important;
    white-space: nowrap !important; flex-shrink: 0 !important;
    transition: background .15s !important;
}
.nth-notsure-btn:hover { background: #4a6d05 !important; }

/* "Other" text input (Language) — smooth reveal/hide.
   Collapsed by default (max-height 0 + opacity 0), expanded when the
   parent gets .is-open. Using max-height (not display:none) lets CSS
   animate the transition so the dropdown doesn't jump. */
.nth-other-wrap  {
    padding: 0 18px !important; background: transparent !important; border-top: none !important;
    max-height: 0 !important; opacity: 0 !important; overflow: hidden !important;
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease !important;
}
.nth-other-wrap.is-open {
    max-height: 220px !important; opacity: 1 !important; padding: 10px 18px 14px !important;
}
.nth-other-input {
    flex: 1 1 auto !important; min-width: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid #dcd3c4 !important; border-radius: 6px !important;
    font-size: 13px !important; outline: none !important;
    font-family: inherit !important; background: #fff !important; color: #020101 !important;
    box-sizing: border-box !important; line-height: 1.3 !important;
}
.nth-other-input:focus { border-color: #5C8607 !important; }
.nth-other-btn {
    padding: 9px 16px !important; border: 1px solid #dcd3c4 !important; border-radius: 6px !important;
    background: #fff !important; color: #020101 !important;
    font-size: 12px !important; font-weight: 500 !important; cursor: pointer !important;
    white-space: nowrap !important; flex-shrink: 0 !important;
    line-height: 1.3 !important;
    transition: background .15s, border-color .15s, color .15s !important;
}
.nth-other-btn:hover:not(:disabled) { background: #f3f9e8 !important; border-color: #5C8607 !important; color: #020101 !important; }
.nth-other-btn:disabled { opacity: .6 !important; cursor: wait !important; }
.nth-other-msg {
    margin-top: 10px !important; font-size: 12px !important;
    line-height: 1.45 !important; min-height: 16px !important;
}

/* "Looking for something else?" — SECONDARY fallback, inside the scroll area.
   Same thin divider as other sections to keep the dropdown cohesive. */
.nth-request {
    padding: 12px 18px 10px !important; background: transparent !important;
    border-top: 1px solid #f0ebe3 !important; margin-top: 2px !important;
}
.nth-request-head {
    margin: 0 0 6px !important; text-align: left !important;
}
.nth-request-intro,
.nth-dropdown .nth-request-intro,
p.nth-request-intro { margin: 0 0 4px !important; padding: 0 !important; text-align: left !important; display: block !important; }
.nth-request-sub,
.nth-dropdown .nth-request-sub,
p.nth-request-sub   { margin: 0 0 10px !important; padding: 0 !important; text-align: left !important; display: block !important; }
.nth-request-row   { display: flex !important; gap: 8px !important; align-items: stretch !important; width: 100% !important; padding-top: 5px !important; }
.nth-request-input {
    flex: 1 1 auto !important; min-width: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid #dcd3c4 !important; border-radius: 6px !important;
    font-size: 13px !important; outline: none !important;
    font-family: inherit !important; background: #fff !important; color: #1a1a1a !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
}
.nth-request-input:focus { border-color: #5C8607 !important; }
.nth-request-btn {
    padding: 9px 16px !important; border: 1px solid #dcd3c4 !important; border-radius: 6px !important;
    background: #fff !important; color: #555 !important;
    font-size: 12px !important; font-weight: 500 !important; cursor: pointer !important;
    white-space: nowrap !important; flex-shrink: 0 !important;
    line-height: 1.3 !important;
    transition: background .15s, border-color .15s, color .15s !important;
}
.nth-request-btn:hover:not(:disabled) { background: #f3f9e8 !important; border-color: #5C8607 !important; color: #1a2e1a !important; }
.nth-request-btn:disabled { opacity: .6 !important; cursor: wait !important; }
.nth-request-msg {
    margin-top: 10px !important; font-size: 12px !important;
    line-height: 1.45 !important; min-height: 16px !important;
}
.nth-request-ok  { color: #2e7d32 !important; }
.nth-request-err { color: #b42318 !important; }

/* ─── Results grid ─── */
#nth-grid { display: grid; grid-template-columns: repeat(3, 1fr) !important; gap: 22px !important; }
@media (max-width: 900px) { #nth-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 540px) { #nth-grid { grid-template-columns: 1fr !important; } }

/* ─── Specialist card ─── */
.nth-card {
    background: #fff !important; border: 1px solid #e8e0d6 !important;
    border-radius: 14px !important; overflow: hidden !important;
    display: flex !important; flex-direction: column !important;
    transition: box-shadow .2s, transform .2s !important;
    animation: nth-card-in .22s ease both !important;
}
.nth-card:hover { transform: translateY(-3px) !important; box-shadow: 0 12px 36px rgba(0,0,0,.1) !important; }

.nth-ct { display: block !important; width: 100% !important; aspect-ratio: 4/3 !important; overflow: hidden !important; background: #edf2ed !important; flex-shrink: 0 !important; }
.nth-ct img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center center !important; display: block !important; transition: transform .3s !important; max-width: none !important; image-rendering: -webkit-optimize-contrast !important; }
.nth-card:hover .nth-ct img { transform: scale(1.05) !important; }

.nth-ci {
    width: 100% !important; height: 100% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 38px !important; font-weight: 700 !important; color: #5C8607 !important;
    background: linear-gradient(150deg, #eef5ee, #d6ebd6) !important;
}

/* Card body — tighter, consistent vertical rhythm */
#nth-dir .nth-card .nth-cb   { padding: 16px 20px 14px !important; display: flex !important; flex-direction: column !important; gap: 8px !important; flex: 1 !important; }

/* Header row: name/title on the left, country on the right */
#nth-dir .nth-card .nth-ch   { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; justify-content: space-between !important; align-items: flex-start !important; gap: 10px !important; width: 100% !important; margin-bottom: 2px !important; }
#nth-dir .nth-card .nth-chl  { min-width: 0 !important; flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; gap: 2px !important; }
#nth-dir .nth-card .nth-cn   { font-size: 17px !important; font-weight: 700 !important; color: #b25b10 !important; text-decoration: none !important; line-height: 1.3 !important; display: block !important; margin: 0 !important; padding: 0 !important; }
#nth-dir .nth-card .nth-cn:hover { color: #8a4308 !important; }
#nth-dir .nth-card .nth-ctp  { font-size: 12px !important; font-weight: 600 !important; color: #020101 !important; text-transform: uppercase !important; letter-spacing: .6px !important; line-height: 1.3 !important; margin: 0 !important; padding-top: 2px !important; display: block !important; }
#nth-dir .nth-card .nth-cc   { font-size: 13px !important; color: #020101 !important; white-space: nowrap !important; flex: 0 0 auto !important; flex-shrink: 0 !important; padding-top: 2px !important; display: inline-block !important; text-align: right !important; }

/* One-line help summary */
.nth-cone { font-size: 14px !important; color: #020101 !important; line-height: 1.5 !important; margin: 0 !important; padding: 0 !important; }

/* Issue chips — tighter gap between chips */
.nth-ci-row { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; margin: 0 !important; padding: 0 !important; }
.nth-ptag {
    display: inline-block !important; font-size: 13px !important; font-weight: 500 !important;
    padding: 3px 10px !important; border-radius: 30px !important;
    line-height: 1.4 !important; white-space: nowrap !important; border: none !important;
    text-transform: none !important; letter-spacing: 0 !important;
}
/* Helps-with pills — light-green fill, dark text (matches the site tag palette) */
.nth-ptag--issue   { background: #edf2e4ba !important; color: #020101 !important; }

/* Works with line — plain comma-separated text, no pills */
.nth-cwork { font-size: 13px !important; color: #020101 !important; line-height: 1.45 !important; margin: 0 !important; padding: 0 !important; }

/* Card footer: sessions (left) + View profile (right) — tighter top spacing */
#nth-dir .nth-card .nth-cf { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; margin-top: auto !important; padding-top: 4px !important; border-top: 1px solid #f0ebe4 !important; width: 100% !important; }
#nth-dir .nth-card .nth-cs { display: flex !important; flex-wrap: wrap !important; gap: 7px !important; margin: 0 !important; padding: 0 !important; align-items: center !important; flex: 1 1 auto !important; min-width: 0 !important; }
#nth-dir .nth-card .nth-si { display: inline-flex !important; align-items: center !important; gap: 5px !important; font-size: 13px !important; color: #020101 !important; line-height: 1.3 !important; }
#nth-dir .nth-card .nth-si svg { width: 15px !important; height: 15px !important; max-width: 15px !important; max-height: 15px !important; flex-shrink: 0 !important; stroke: #888 !important; fill: none !important; stroke-width: 1.6 !important; stroke-linecap: round !important; stroke-linejoin: round !important; display: inline-block !important; }
#nth-dir .nth-card .nth-cv { display: inline-flex !important; align-items: center !important; gap: 5px !important; font-size: 14px !important; font-weight: 600 !important; color: #5C8607 !important; text-decoration: none !important; white-space: nowrap !important; flex: 0 0 auto !important; flex-shrink: 0 !important; }
#nth-dir .nth-card .nth-cv svg { width: 14px !important; height: 14px !important; max-width: 14px !important; max-height: 14px !important; flex-shrink: 0 !important; fill: none !important; stroke: currentColor !important; stroke-width: 2 !important; stroke-linecap: round !important; transition: transform .15s !important; display: inline-block !important; }
#nth-dir .nth-card .nth-cv:hover { color: #020101 !important; }
#nth-dir .nth-card:hover .nth-cv svg { transform: translateX(3px) !important; }

/* ─── Loading / Empty ─── */
#nth-loading { display: none; justify-content: center; padding: 70px 20px !important; }
.nth-spinner { width: 28px !important; height: 28px !important; border: 2.5px solid #e8e0d6 !important; border-top-color: #5C8607 !important; border-radius: 50% !important; animation: nth-spin .65s linear infinite !important; }
#nth-empty   { display: none; text-align: center !important; padding: 70px 20px !important; }
#nth-empty p { font-size: 15px !important; color: #aaa !important; margin: 0 0 16px !important; }
#nth-empty button {
    padding: 10px 24px !important; background: #5C8607 !important; color: #fff !important;
    border: none !important; border-radius: 30px !important;
    font-size: 14px !important; cursor: pointer !important; font-family: inherit !important;
}

@keyframes nth-spin     { to { transform: rotate(360deg); } }
@keyframes nth-card-in  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Mobile ─── */
@media (max-width: 640px) {
    .nth-frow { flex-wrap: nowrap !important; justify-content: flex-start !important; overflow-x: auto !important; overflow-y: visible !important; -webkit-overflow-scrolling: touch !important; padding-bottom: 6px !important; scrollbar-width: none !important; -ms-overflow-style: none !important; }
    .nth-frow.nth-frow-hidden { display: none !important; }
    .nth-frow::-webkit-scrollbar { display: none !important; }
    .nth-pill          { font-size: 13px !important; padding: 8px 14px !important; }
    #nth-refine-toggle { font-size: 13px !important; padding: 8px 14px !important; }
    #nth-reset-btn     { font-size: 12px !important; padding: 8px 12px !important; }
    .nth-dbox          { max-height: 460px !important; border-radius: 14px !important; }
    .nth-dtitle        { padding: 11px 14px 4px !important; }
    .nth-ddesc         { padding: 6px 14px 10px !important; }
    .nth-crow          { padding: 9px 14px !important; }
    .nth-ghead         { padding: 9px 14px 4px !important; }
    .nth-notsure       { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; padding: 11px 14px !important; }
    .nth-notsure-btn   { width: 100% !important; justify-content: center !important; }
    .nth-request       { padding: 14px !important; }
    .nth-request-row   { flex-direction: column !important; }
    .nth-request-btn   { width: 100% !important; }
    #nth-grid { gap: 16px !important; }
    .nth-cb   { padding: 14px 16px 16px !important; gap: 8px !important; }
    .nth-cn   { font-size: 15px !important; }
    .nth-cone { font-size: 12px !important; }
    .nth-ptag { font-size: 11px !important; padding: 3px 9px !important; }
}
