/*
 * txfamlaw Consultation Funnel — scoped styles.
 * All rules under .tf-cf so nothing leaks into the surrounding Kadence theme.
 * Colors reference the brand tokens the theme already sets on :root; we fall
 * back to the raw hex values so this stylesheet also works standalone.
 */

.tf-cf {
    --tf-cf-navy: var(--color-navy, #0E2A47);
    --tf-cf-gold: var(--color-gold, #F2A900);
    --tf-cf-gold-dark: var(--color-gold-dark, #B8660B);
    --tf-cf-slate: var(--color-slate, #2F3A45);
    --tf-cf-steel: var(--color-steel, #D6D8D9);
    --tf-cf-warm: var(--color-warm, #E9D3C3);

    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--tf-cf-slate);
    max-width: 720px;
    margin: 2rem auto;
}

.tf-cf-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--tf-cf-steel);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* The header row holds the photo + body (name / bio / meta / optional
   Book Now). Split from .tf-cf-card so anything else -- like the
   embedded contact form -- can sit at full card width below. */
.tf-cf-card__header {
    display: flex;
    gap: 1.5rem;
}

.tf-cf-card__photo {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
}

.tf-cf-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.tf-cf-card__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--tf-cf-slate);
}

.tf-cf-card__name {
    margin: 0 0 0.5rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.75rem;
    line-height: 1.15;
    color: var(--tf-cf-navy);
}

.tf-cf-card__bio {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    line-height: 1.55;
}

.tf-cf-card__bio p {
    margin: 0 0 0.5em;
}

.tf-cf-card__bio p:last-child {
    margin-bottom: 0;
}

.tf-cf-card__bio strong {
    font-weight: 600;
}

.tf-cf-card__meta {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--tf-cf-slate);
}

.tf-cf-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 120ms ease, color 120ms ease;
}

.tf-cf-btn--primary {
    background: var(--tf-cf-gold);
    color: var(--tf-cf-navy);
}

.tf-cf-btn--primary:hover,
.tf-cf-btn--primary:focus {
    background: var(--tf-cf-gold-dark);
    color: #ffffff;
    outline: none;
}

.tf-cf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contact form is a full-width sibling of .tf-cf-card__header, so the
   embedded [attorney_contact_form] spans the entire card. The parent
   card's `gap` handles vertical spacing; no margin needed here. */
.tf-cf-card__contact-form {
    margin: 0;
}

.tf-cf-qualify {
    margin: 1.5rem auto 0;
    max-width: 720px;
    text-align: center;
    font-size: 0.95rem;
    /* --tf-cf-qualify-color, when set inline via the shortcode's
       qualify_color attribute, overrides both the intro text and the
       link color -- useful when the funnel is placed on a dark
       background where the default slate/gold-dark disappear. */
    color: var(--tf-cf-qualify-color, var(--tf-cf-slate));
}

.tf-cf-qualify__link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--tf-cf-qualify-color, var(--tf-cf-gold-dark));
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
    cursor: pointer;
}

.tf-cf-qualify__link:hover,
.tf-cf-qualify__link:focus {
    text-decoration: underline;
    outline: none;
}

/* -----------------------------------------------------------------
   Funnel container + progress
   ----------------------------------------------------------------- */

.tf-cf-funnel {
    background: #ffffff;
    border: 1px solid var(--tf-cf-steel);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tf-cf-funnel__header {
    margin-bottom: 1.5rem;
}

.tf-cf-funnel__title {
    margin: 0 0 1rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    color: var(--tf-cf-navy);
    line-height: 1.2;
}

.tf-cf-funnel__progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: tf-cf-step;
}

.tf-cf-funnel__step {
    counter-increment: tf-cf-step;
    flex: 1 1 auto;
    min-width: 6rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tf-cf-slate);
    background: #f3f4f6;
    border-radius: 999px;
    text-align: center;
    opacity: 0.55;
}

.tf-cf-funnel__step::before {
    content: counter(tf-cf-step) ". ";
    font-weight: 600;
}

.tf-cf-funnel__step--active {
    background: var(--tf-cf-navy);
    color: #ffffff;
    opacity: 1;
}

.tf-cf-funnel__step--done {
    background: var(--tf-cf-warm);
    color: var(--tf-cf-navy);
    opacity: 1;
}

/* -----------------------------------------------------------------
   Phases
   ----------------------------------------------------------------- */

.tf-cf-phase {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tf-cf-phase[hidden] { display: none; }

/* Topic block inherits the same vertical rhythm as the phase itself, so
   topic-specific questions don't collapse together (the direct-child
   gap on .tf-cf-phase doesn't reach across this wrapper). */
.tf-cf-topic-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tf-cf-topic-block[hidden] { display: none; }

.tf-cf-phase__heading {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.25rem;
    color: var(--tf-cf-navy);
    line-height: 1.25;
}

.tf-cf-phase__body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

.tf-cf-phase__nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tf-cf-btn--ghost {
    background: transparent;
    color: var(--tf-cf-navy);
    border-color: var(--tf-cf-steel);
}
.tf-cf-btn--ghost:hover,
.tf-cf-btn--ghost:focus {
    background: #f3f4f6;
    outline: none;
}

/* -----------------------------------------------------------------
   Fields (funnel-specific; the paid-card contact form uses its own
   scoped styles from txfamlaw-attorney-card).
   ----------------------------------------------------------------- */

.tf-cf-field {
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
}

.tf-cf-field__label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--tf-cf-navy);
}

.tf-cf-field__optional {
    display: inline;
    margin-left: 0.35rem;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--tf-cf-slate);
    opacity: 0.7;
}

.tf-cf-field__help {
    display: block;
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    color: var(--tf-cf-slate);
    opacity: 0.8;
    font-weight: 400;
}

.tf-cf-field input[type="text"],
.tf-cf-field input[type="email"],
.tf-cf-field input[type="tel"],
.tf-cf-field input[type="number"],
.tf-cf-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    font: inherit;
    color: var(--tf-cf-slate);
    background: #ffffff;
    border: 1px solid var(--tf-cf-steel);
    border-radius: 6px;
    box-sizing: border-box;
}

.tf-cf-field textarea {
    resize: vertical;
    min-height: 5rem;
    line-height: 1.5;
}

.tf-cf-field input:focus,
.tf-cf-field textarea:focus {
    outline: 2px solid var(--tf-cf-gold-dark);
    outline-offset: 1px;
    border-color: var(--tf-cf-gold-dark);
}

.tf-cf-field--radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tf-cf-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: #f9fafb;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.4;
    font-size: 0.95rem;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.tf-cf-radio:hover {
    background: #f3f4f6;
}

.tf-cf-radio input[type="radio"] {
    margin-top: 0.15rem;
    accent-color: var(--tf-cf-navy);
}

.tf-cf-radio:has(input[type="radio"]:checked) {
    background: rgba(242, 169, 0, 0.12);
    border-color: var(--tf-cf-gold-dark);
}

/* -----------------------------------------------------------------
   Terminal screens
   ----------------------------------------------------------------- */

.tf-cf-terminal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tf-cf-terminal[hidden] { display: none; }

.tf-cf-terminal__heading {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem;
    color: var(--tf-cf-navy);
}

.tf-cf-terminal__subheading {
    margin: 0.75rem 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tf-cf-navy);
}

.tf-cf-terminal__body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

.tf-cf-terminal__referrals ul {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
    line-height: 1.65;
}

.tf-cf-terminal__referrals a {
    color: var(--tf-cf-gold-dark);
    text-decoration: none;
    font-weight: 600;
}

.tf-cf-terminal__referrals a:hover,
.tf-cf-terminal__referrals a:focus {
    text-decoration: underline;
}

.tf-cf-terminal__referral-desc {
    color: var(--tf-cf-slate);
    font-weight: 400;
    opacity: 0.9;
}

.tf-cf-terminal__short-paid {
    padding-top: 0.5rem;
    border-top: 1px solid var(--tf-cf-steel);
    margin-top: 0.5rem;
}

.tf-cf-short-paid-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tf-cf-terminal--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 1rem;
    border-radius: 8px;
}

/* -----------------------------------------------------------------
   Utility + disclaimer + accessibility
   ----------------------------------------------------------------- */

.tf-cf-funnel__disclaimer {
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--tf-cf-steel);
    font-size: 0.8rem;
    color: var(--tf-cf-slate);
    opacity: 0.75;
    line-height: 1.5;
}

.tf-cf-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .tf-cf-card {
        padding: 1.25rem;
    }
    .tf-cf-card__header {
        flex-direction: column;
    }
    .tf-cf-card__photo {
        width: 100px;
        height: 100px;
    }
    .tf-cf-card__name {
        font-size: 1.5rem;
    }
    .tf-cf-funnel {
        padding: 1.25rem;
    }
    .tf-cf-funnel__step {
        min-width: 4.5rem;
        font-size: 0.72rem;
        padding: 0.35rem 0.55rem;
    }
}
