/*
 * Shared UI components used across public pages.
 * Tokens (colours, fonts) live in theme.css.
 */

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px;
    font: 600 15px/1.2 var(--sans); text-decoration: none; text-align: center;
    border-radius: 8px; border: 1px solid transparent; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--action); color: #fff; }
.btn--primary:hover { background: var(--action-hover); color: #fff; }
.btn--quiet { background: #fff; color: var(--ink); border-color: var(--rule); }
.btn--quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn--block { display: flex; width: 100%; }

/* ---------- Tags ---------- */
.tag {
    display: inline-block; vertical-align: middle;
    font: 600 12px/1 var(--sans); letter-spacing: .01em;
    padding: 5px 8px; border-radius: 5px;
    background: #EEF2EF; color: var(--binding);
}
.tag--verified { background: #E2EFE8; color: #165340; }

/* ---------- Star rating ---------- */
.rating { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.rating__stars { display: inline-flex; font-size: 16px; line-height: 1; }
.rating__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.rating__count { color: var(--slate); }
a.rating__count { color: var(--slate); text-decoration: underline; text-underline-offset: 3px; }
a.rating__count:hover { color: var(--action); }

/* ---------- Avatar ---------- */
.avatar { display: block; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar--initials {
    display: grid; place-items: center;
    width: var(--avatar-size, 72px); height: var(--avatar-size, 72px);
    background: var(--avatar-bg, var(--binding)); color: #F3E6C2;
    font: 600 calc(var(--avatar-size, 72px) * .36) / 1 var(--heading);
}

/* ---------- Page head + breadcrumbs ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--rule); padding: 36px 0 32px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; margin: 0 0 8px; color: var(--ink); }
.page-head__lede { font-size: 19px; color: var(--slate); margin: 0; max-width: 62ch; }
.crumbs { font-size: 14px; color: var(--slate); margin-bottom: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #A3ACA8; }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--action); }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font: 600 14px var(--sans); color: var(--ink); }
.field__input {
    height: 46px; padding: 0 12px; width: 100%;
    font: 400 16px var(--sans); color: var(--ink);
    background: #fff; border: 1px solid #C9D0CC; border-radius: 8px;
}
.field__input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(30, 107, 82, .18); }
select.field__input {
    appearance: none; -webkit-appearance: none; padding-right: 36px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6661' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--action); margin: 0; }

/* ---------- Segmented control (radio group styled as tabs) ---------- */
.segmented { display: inline-flex; padding: 4px; background: #E8ECE9; border-radius: 10px; gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    padding: 8px 16px; border-radius: 7px; font: 600 14px var(--sans); color: var(--slate); cursor: pointer;
}
.segmented input:checked + label { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:focus-visible + label { outline: 3px solid var(--brass); outline-offset: 1px; }

/* ---------- Pagination (site/pagination.blade.php) ---------- */
.pager { margin-top: 32px; }
.pager__summary { color: var(--slate); font-size: 14px; margin: 0 0 10px; }
.pager__list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pager__link, .pager__gap {
    display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
    border: 1px solid var(--rule); border-radius: 8px; background: #fff;
    color: var(--ink); text-decoration: none; font-size: 15px;
}
.pager__gap { border-color: transparent; background: transparent; }
a.pager__link:hover { border-color: var(--action); color: var(--action); }
.pager__link.is-current { background: var(--binding); border-color: var(--binding); color: #fff; font-weight: 600; }
.pager__link.is-disabled { color: #A3ACA8; }

/* ---------- Small helpers ---------- */
.muted { color: var(--slate); }
.link-button {
    background: none; border: 0; padding: 0; font: inherit; color: var(--action);
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.inline-form { display: inline; }
.notice { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; }
.notice--success { background: #E2EFE8; color: #165340; }
.field__hint { font-weight: 400; color: var(--slate); }
.field__error { margin: 2px 0 0; font-size: 14px; color: #A3261B; }
.field__input--area { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Chips: short linked labels */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip-list a {
    display: inline-block; padding: 7px 12px; border-radius: 999px;
    background: #EEF2EF; color: var(--binding); font-size: 15px; font-weight: 500; text-decoration: none;
}
.chip-list a:hover { background: #E2EFE8; text-decoration: underline; }

/* Dialog */
.dialog { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; border: 0; border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(17, 32, 28, .5); }
.dialog__body { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.dialog__body h3 { margin: 0; font-size: 22px; }
.dialog__body p { margin: 0; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Compact list of linked lawyers (sidebars) ---------- */
.similar { padding: 20px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; }
.similar__title { font: 700 16px var(--sans); margin: 0 0 10px; }
.similar ul { list-style: none; margin: 0; padding: 0; }
.similar li + li { border-top: 1px solid var(--rule); }
.similar a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.similar__text { display: flex; flex-direction: column; }
.similar__name { font-weight: 600; }
.similar a:hover .similar__name { color: var(--action); text-decoration: underline; }
.similar__meta { font-size: 14px; color: var(--slate); }

/* ---------- Extra helpers ---------- */
.notice--error { background: #FBEDEB; color: #7D1D14; }
.notice ul { margin: 6px 0 0; padding-left: 1.2em; }
.notice p { margin: 0; }
.field__help { margin: 2px 0 0; font-size: 14px; color: var(--slate); }
.btn--light-on-dark { background: #F3E6C2; color: var(--binding); }
.btn--light-on-dark:hover { background: #fff; color: var(--binding); }
/* Spam trap: hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   Forms kit (contact, lawyer email, case removal, sign-in, reviews…)
   ===================================================================== */
.field__input { border-radius: 10px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.field__input:hover:not(:focus) { border-color: #9FAAA5; }
.field__input::placeholder { color: #93A09A; }
.field__input--area, textarea.field__input { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.field__input[aria-invalid="true"], .field--error .field__input { border-color: #B4442F; box-shadow: 0 0 0 3px rgba(180, 68, 47, .12); }
.field__error { margin: 0; font-size: 13.5px; color: #A3261B; display: flex; align-items: center; gap: 6px; }
.field__help { margin: 0; font-size: 13px; color: var(--slate); }
.field__hint { font-weight: 400; color: var(--slate); }
.field__req { color: #A3261B; margin-left: 2px; }

/* Input with a leading icon */
.field__control { position: relative; display: block; }
.field__control > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: #7C8A84; pointer-events: none; transition: color .15s; }
.field__control > .field__input { padding-left: 42px; }
.field__control:focus-within > i { color: var(--action); }
.field__control--area > i { top: 15px; transform: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }

/* Card that holds a form */
.form-card {
    background: #fff; border: 1px solid var(--rule); border-radius: 18px; padding: clamp(20px, 3vw, 32px);
    box-shadow: 0 1px 2px rgba(24, 58, 51, .04), 0 18px 40px -30px rgba(24, 58, 51, .4);
}
.form-card__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.form-card__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #E6F1EB; color: var(--action); font-size: 24px; flex-shrink: 0; }
.form-card__title { font: 600 22px/1.2 var(--heading); margin: 0 0 4px; color: var(--ink); }
.form-card__sub { margin: 0; color: var(--slate); font-size: 15px; }
.form-card__foot { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.form-card__note { margin: 0; font-size: 13px; color: var(--slate); max-width: 46ch; }

/* Choice cards (radio / checkbox styled as tiles) */
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; }
.choice-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #C9D0CC; border-radius: 12px; cursor: pointer; background: #fff; font-size: 15px; transition: border-color .15s, background-color .15s; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card i { font-size: 20px; color: #7C8A84; }
.choice-card:hover { border-color: #9FAAA5; }
.choice-card:has(input:checked) { border-color: var(--action); background: #F1F7F4; box-shadow: inset 0 0 0 1px var(--action); }
.choice-card:has(input:checked) i { color: var(--action); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--brass); outline-offset: 2px; }

/* Primary submit with icon */
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn i { font-size: 19px; }
.btn--primary.is-loading { pointer-events: none; opacity: .85; }
.btn--primary.is-loading::after { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Two-column page: form + help column */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 36px; padding-bottom: 80px; }
.form-layout > * { min-width: 0; }
.help-card { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 22px; }
.help-card + .help-card { margin-top: 16px; }
.help-card h2 { font: 600 18px var(--heading); margin: 0 0 12px; }
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.help-list a { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.help-list a:hover { background: #F1F5F2; color: var(--ink); }
.help-list i { width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 10px; display: inline-block; background: var(--brass-soft); color: #8A5F17; font-size: 20px; flex-shrink: 0; }
.help-list strong { display: block; font-size: 15px; }
.help-list small { color: var(--slate); font-size: 13px; }

.notice { display: flex; gap: 10px; align-items: flex-start; }
.notice > i { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

@media (max-width: 960px) { .form-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Scroll reveal (site.js adds .is-in). Content stays visible without JS.
   ===================================================================== */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.22, .8, .3, 1), transform .7s cubic-bezier(.22, .8, .3, 1); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger] > * { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.22, .8, .3, 1), transform .6s cubic-bezier(.22, .8, .3, 1); }
.js-reveal [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: .05s; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: .1s; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: .15s; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: .2s; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: .25s; }
.js-reveal [data-reveal-stagger].is-in > *:nth-child(n+7) { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
    .js-reveal [data-reveal], .js-reveal [data-reveal-stagger] > * { opacity: 1; transform: none; transition: none; }
}
.contact-lawyer__top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.contact-lawyer__top strong { display: block; font: 600 19px/1.2 var(--heading); }
.contact-lawyer__top > div span { font-size: 14px; color: var(--slate); }

/* "What happens next" sequence */
.next-steps { list-style: none; counter-reset: next; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.next-steps li { counter-increment: next; display: grid; grid-template-columns: 32px 1fr; gap: 6px; font-size: 15px; line-height: 1.5; }
.next-steps li::before { content: counter(next); font: 600 22px/1.1 var(--heading); color: var(--brass); }
.next-steps__privacy { font-size: 14px; line-height: 1.55; padding: 14px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; margin: 0; }

.help-list a[aria-current="page"] { background: #E6F1EB; }
.about-aside { position: sticky; top: 20px; }

/* ---------- Shared bands (moved from home.css) ---------- */
.section__link { font-weight: 600; color: var(--action); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; }
.section__link:hover { color: var(--action-hover); text-decoration-thickness: 2px; }
/* ---------- Proof strip ---------- */
.proof { background: #fff; border-bottom: 1px solid var(--rule); }
.proof__list { list-style: none; margin: 0 auto; padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px 32px; }
.proof__list li { font-size: 14px; line-height: 1.4; color: var(--slate); display: flex; flex-direction: column; gap: 6px; padding-left: 16px; border-left: 2px solid var(--brass); }
.proof__list strong { font: 600 30px/1 var(--heading); color: var(--binding); }


/* ---------- For lawyers ---------- */
.lawyers-cta { background: var(--binding); color: #fff; padding: clamp(56px, 7vw, 88px) 0; }
.lawyers-cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.lawyers-cta h2 { font: 600 clamp(26px, 2.8vw, 36px)/1.2 var(--heading); margin: 0 0 18px; color: #fff; max-width: 22ch; }
.lawyers-cta__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lawyers-cta__list li { display: flex; gap: 12px; color: #D5E1DB; font-size: 16px; }
.lawyers-cta__list li::before { content: "\2713"; color: #E2C27E; font-weight: 700; }
.lawyers-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.btn--brass { background: #F3E6C2; color: var(--binding); min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn--brass:hover { background: #fff; color: var(--binding); }
.lawyers-cta__signin { color: #D5E1DB; font-size: 15px; text-underline-offset: 3px; }
.lawyers-cta__signin:hover { color: #fff; }


@media (max-width: 640px) { .proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
