/**
 * Patient follow-up form pages: Medical Records Release (GF form 39) and
 * Coronary CT Intake (GF form 40).
 *
 * Reads the shared brand values from eh-brand-tokens.css (enqueued as a
 * dependency) with literal fallbacks so the page degrades gracefully if
 * the token sheet ever fails to load. Surfaces use the same cool slate
 * (#f8fafc / #e2e8f0) as the in-chrome screenings pages — see the token
 * file header for why surface colors stay local to each stylesheet.
 *
 * The Gravity Forms internals keep GF's own theme styling; rules below
 * only touch the wrapper, the signature canvas (which otherwise
 * overflows small screens), and the AJAX confirmation message.
 */

.rr-page {
    background: #f8fafc;
    color: var(--eh-text, #334155);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.rr-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.rr-container--narrow {
    max-width: 860px;
}

.rr-page h1,
.rr-page h2,
.rr-page h3 {
    color: var(--eh-ink, #0f172a);
    line-height: 1.25;
}

.rr-page h2 {
    font-size: 1.75rem;
    margin: 0 0 1.25rem;
}

.rr-page section {
    padding: 3rem 0;
}

/* --- Hero --- */

.rr-hero {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    padding: 4rem 0 3rem;
}

.rr-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--eh-green, #047727);
    margin: 0 0 0.75rem;
}

.rr-hero h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

.rr-hero-sub {
    max-width: 640px;
    margin: 0 auto 1.5rem;
    font-size: 1.125rem;
    color: var(--eh-muted, #5b6674);
}

.rr-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.rr-chips li {
    background: var(--eh-green-tint, #e8f8ed);
    color: var(--eh-green-dark, #035c1e);
    border-radius: 999px;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* --- Why cards --- */

.rr-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.rr-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--eh-radius, 16px);
    box-shadow: var(--eh-shadow, 0 1px 2px rgba(15, 23, 42, 0.05));
    padding: 1.5rem;
}

.rr-card-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm, 10px);
    background: var(--eh-green-tint, #e8f8ed);
    color: var(--eh-green, #047727);
    margin-bottom: 0.875rem;
}

.rr-card-icon svg {
    width: 24px;
    height: 24px;
}

.rr-card h3 {
    font-size: 1.125rem;
    margin: 0 0 0.5rem;
}

.rr-card p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--eh-muted, #5b6674);
}

/* --- Steps --- */

.rr-steps-list {
    list-style: none;
    counter-reset: rr-step;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.rr-steps-list li {
    counter-increment: rr-step;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--eh-radius, 16px);
    padding: 1.5rem;
    position: relative;
}

.rr-steps-list li::before {
    content: counter(rr-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--eh-green, #047727);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.875rem;
}

.rr-steps-list h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.5rem;
}

.rr-steps-list p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--eh-muted, #5b6674);
}

/* --- Form --- */

/* Sits directly under the white hero, which already draws the separating
   hairline — a border-top here would double it. */
.rr-form-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.rr-form-intro {
    color: var(--eh-muted, #5b6674);
    margin: 0 0 1.5rem;
}

.rr-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--eh-radius, 16px);
    box-shadow: var(--eh-shadow-lift, 0 10px 30px rgba(15, 23, 42, 0.1));
    padding: 2rem;
}

.rr-form-card .gform_wrapper {
    margin: 0;
}

/* The signature add-on renders a fixed-width canvas; cap it so the pad
   never forces horizontal scroll on phones. */
.rr-form-card canvas {
    max-width: 100%;
}

.rr-form-card .gform_confirmation_message {
    background: var(--eh-green-tint, #e8f8ed);
    color: var(--eh-green-dark, #035c1e);
    border: 1px solid var(--eh-green, #047727);
    border-radius: var(--eh-radius-sm, 10px);
    padding: 1.25rem 1.5rem;
    font-size: 1.0625rem;
}

.rr-privacy-note {
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    color: var(--eh-muted, #5b6674);
    text-align: center;
}

/* --- Coronary intake state + trusted clinic context --- */

.cci-clinic {
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--eh-green-tint, #e8f8ed);
    border: 1px solid rgba(4, 119, 39, 0.35);
    border-radius: var(--eh-radius, 16px);
}

.cci-clinic p {
    margin: 0;
}

.cci-clinic__label {
    color: var(--eh-green-dark, #035c1e);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.cci-clinic__name {
    color: var(--eh-ink, #0f172a);
    font-size: 1.125rem;
    font-weight: 700;
}

.cci-clinic__address {
    color: var(--eh-muted, #5b6674);
    font-size: 0.9375rem;
}

.cci-safety-note {
    margin: 0 0 1.5rem;
    padding: 1rem 1.125rem;
    color: #713f12;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: var(--eh-radius-sm, 10px);
    font-size: 0.9375rem;
}

.cci-safety-note strong {
    display: block;
    color: #78350f;
}

.cci-acute-response {
    grid-column: 1 / -1;
    margin: -0.25rem 0 0.5rem;
    padding: 1rem 1.125rem;
    color: #7f1d1d;
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: var(--eh-radius-sm, 10px);
}

.cci-acute-response[hidden] {
    display: none;
}

.cci-acute-response strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #7f1d1d;
}

.cci-acute-response p {
    margin: 0;
}

.cci-state-section {
    min-height: 280px;
}

.cci-state {
    padding: 2rem;
    border-radius: var(--eh-radius, 16px);
}

.cci-state h2 {
    margin-bottom: 0.75rem;
}

.cci-state p {
    margin: 0;
}

.cci-state--success {
    color: var(--eh-green-dark, #035c1e);
    background: var(--eh-green-tint, #e8f8ed);
    border: 1px solid var(--eh-green, #047727);
}

.cci-state--error {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.cci-state--warning {
    color: #713f12;
    background: #fffbeb;
    border: 1px solid #fbbf24;
}

.rr-form-card .gform_validation_errors {
    border-radius: var(--eh-radius-sm, 10px);
}

/* --- Help strip --- */

.rr-help {
    padding-top: 0;
    text-align: center;
}

.rr-help p {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--eh-radius, 16px);
    padding: 1.5rem;
    margin: 0;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .rr-card-grid,
    .rr-steps-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .rr-page section {
        padding: 2.25rem 0;
    }

    .rr-hero {
        padding: 2.75rem 0 2.25rem;
    }

    .rr-hero h1 {
        font-size: 1.875rem;
    }

    .rr-page h2 {
        font-size: 1.5rem;
    }

    .rr-form-card {
        padding: 1.25rem;
    }

    .cci-clinic,
    .cci-state {
        padding: 1.25rem;
    }
}
