.sfl-wrap {
    max-width: 640px;
    margin: 2.5rem auto;
    padding: 2.25rem;
    background: transparent;
    border-radius: 18px;
    box-shadow: 0 28px 60px -35px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.sfl-wrap * {
    box-sizing: border-box;
}

.is-hidden {
    display: none !important;
}

.sfl-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sfl-step-indicator {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.sfl-steps {
    margin-top: 1.5rem;
    display: grid;
}

.sfl-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #333;
    border-radius: 16px;
    background: #222;
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.18);
}

.sfl-step.is-hidden {
    display: none;
}

.sfl-step+.sfl-step {
    margin-top: 1rem;
}

.sfl-step.is-active {
    border-color: #93c5fd;
    box-shadow: 0 16px 36px -22px rgba(59, 130, 246, 0.45);
}

.sfl-step:not(.is-active) {
    background: #111;
    box-shadow: none;
}

.sfl-step:not(.is-active) .sfl-step-summary {
    padding: 0.25rem 0;
}

.sfl-step:not(.is-active) .sfl-step-status {
    color: #64748b;
}

input.text:focus,
input.title:focus,
input[type=text]:focus,
select:focus,
textarea:focus,
input.text,
input.title,
input[type=text],
select,
textarea {
    background-color: #333;
    color: #fff;
    border-color: rgba(249, 0, 43, .8);
}

.wpgpt-steps__intro {
    margin: 0.5rem 0 0;
    color: #475569;
    font-size: 0.95rem;
}

.wpgpt-steps {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpgpt-step {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #222;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    margin: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wpgpt-step+.wpgpt-step {
    margin-top: 12px;
}

.wpgpt-step.is-active {
    border-color: rgba(249, 0, 43, .8);
    box-shadow: 0 0px 10px rgba(249, 0, 43, .8);
}

.wpgpt-step.is-collapsed {
    background: #111;
}

.wpgpt-step.is-collapsed .wpgpt-step__summary {
    background: #111;
}

.wpgpt-step.is-pending {
    display: none;
}

.wpgpt-step__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.wpgpt-step__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

h3.wpgpt-step__title {
    font-weight: 600;
    font-size: 1rem;
    color: #999 !important;
    margin: 0;
}

.wpgpt-step__value {
    font-size: 0.95rem;
    color: #667085;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.wpgpt-step__body {
    padding: 0 16px 20px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease;
}

.wpgpt-step.is-active .wpgpt-step__body {
    max-height: 800px;
    opacity: 1;
}

.wpgpt-step.is-collapsed .wpgpt-step__body,
.wpgpt-step.is-pending .wpgpt-step__body {
    max-height: 0;
    opacity: 0;
}

.wpgpt-step__body>*+* {
    margin-top: 12px;
}

.wpgpt-step__body fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.wpgpt-step__edit {
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 999px;
}

.wpgpt-step.is-active .wpgpt-step__summary {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.wpgpt-nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    width: 100%;
}

.wpgpt-nav__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.wpgpt-nav__step {
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
}

.wpgpt-progress {
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: rgba(126, 126, 126, 0.9);
    overflow: hidden;
}

.wpgpt-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.2s ease;
}

.wpgpt-nav__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpgpt-nav__skip.is-hidden {
    display: none !important;
}

.wpgpt-nav .sfl-btn[disabled],
.wpgpt-nav .sfl-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpgpt-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.sfl-step-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.sfl-step-summary-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sfl-step-title {
    font-weight: 600;
    color: #111827;
}

.sfl-step-status {
    font-size: 0.95rem;
    color: #475569;
}

.sfl-step-edit {
    border: none;
    background: none;
    color: #2563eb;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sfl-step-edit:hover,
.sfl-step-edit:focus-visible {
    background: rgba(37, 99, 235, 0.12);
    outline: none;
}

.sfl-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sfl-step-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.sfl-label,
.sfl-step legend {
    font-weight: 600;
    color: #f9002b;
    font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif !important;
    text-transform: uppercase;
    padding: 10px;
}

.gform-body label {
    font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif !important;
    text-transform: uppercase;
    color: #fff !important;
}


.sfl-input,
.sfl-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #d0d5dd;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #333;
    color: #fff;
}

.sfl-input:focus-visible,
.sfl-textarea:focus-visible {
    outline: none;
    border-color: #f9002b;
    box-shadow: 0 0 0 3px rgba(249, 0, 43, .4);
    background-color: #333;
    color: #fff;
}

.sfl-field-helper {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.sfl-field-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.sfl-field-count {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.sfl-textarea {
    min-height: 120px;
    resize: vertical;
}

.sfl-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.sfl-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 1px solid #222;
    background: #333;
    color: #fff;
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.sfl-pill:hover {
    background: #ffe0e0;
    color: #333;
    border-color: #fca5a5;
}

.sfl-pill.is-selected {
    background: linear-gradient(135deg, #f9002b, #ed3a49);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 0px 5px rgba(249, 0, 43, .8);
}

.sfl-pill:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 3px;
}

.sfl-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid #222;
    border-radius: 999px;
    background: #111;
}

.sfl-segmented__option {
    appearance: none;
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sfl-segmented__option:hover:not(.is-selected) {
    background: rgba(37, 99, 235, 0.12);
    color: #fff;
}

.sfl-segmented__option.is-selected {
    background: linear-gradient(135deg, #f9002b, #ed3a49);
    color: #ffffff;
    box-shadow: 0 12px 26px -20px rgba(249, 0, 43, .8);
}

.sfl-segmented__option:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 2px;
}

.sfl-negative-pill-group {
    margin-top: 0.5rem;
}

.sfl-negative-other {
    margin-top: 0.75rem;
}

.sfl-negative-other .sfl-label {
    font-weight: 500;
}

.sfl-relationship-other {
    margin-top: 1rem;
}

.sfl-inline-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sfl-inline-field .sfl-input {
    max-width: 180px;
}

.sfl-other-input {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sfl-other-input.is-hidden {
    display: none;
}

.sfl-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #1f2937;
}

.sfl-option input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #f9002b;
}

.sfl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.6rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sfl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sfl-btn--primary {
    background: linear-gradient(135deg, #f9002b, #ed3a49);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 0px 5px rgba(249, 0, 43, .8);
}

.sfl-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.sfl-btn--primary:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 3px;
}

.sfl-btn--secondary {
    background: transparent;
    border-color: #d0d5dd;
    color: #fff;
}

.sfl-btn--secondary:hover:not(:disabled) {
    background: #333;
}

.sfl-btn--secondary:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 3px;
}

.sfl-btn--ghost {
    background: transparent;
    color: #a0a0a0;
}

.sfl-btn.is-disabled[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.sfl-btn--ghost:hover:not(:disabled) {
    color: #ccc;
}

.sfl-btn--ghost:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 3px;
}

.sfl-inline-message {
    min-height: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.sfl-inline-message.is-error {
    color: #b91c1c;
}

.sfl-inline-message.is-success {
    color: #047857;
}

.sfl-inline-message.is-loading {
    color: #1d4ed8;
}


.sfl-inline-message.is-loading::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: .5rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: sfl-spin .7s linear infinite;
    vertical-align: -2px;
}

@keyframes sfl-spin {
    to {
        transform: rotate(360deg)
    }
}

.sfl-error-message {
    font-size: 0.85rem;
    color: #b91c1c;
    margin: 0;
    min-height: 1.25rem;
}

.sfl-error-message:empty {
    display: none;
}

.sfl-results {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sfl-refine-panel {
    border: 1px solid #333;
    border-radius: 18px;
    background: #222;
    padding: 1.5rem;
}

.sfl-refine-panel fieldset {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sfl-refine-panel legend {
    font-weight: 700;
    color: #b91c1c;
    font-size: 1.5rem;
    text-align: center;
}

.sfl-refine-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.sfl-refine-panel .sfl-btn--ghost {
    color: #fff;
    border: 2px solid #fff;
}

.sfl-letter-output pre,
pre.sfl-letter-text {
    white-space: pre-line !important;
}

@media (min-width: 720px) {
    .sfl-refine-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sfl-refine-options>.sfl-refine-field:nth-child(1),
    .sfl-refine-options>.sfl-refine-field:nth-child(2) {
        grid-column: 1 / -1;
    }
}

.sfl-refine-field {
    display: flex;
    flex-direction: column;
    gap: 0.0rem;
    width: 100%;
}


.sfl-refine-field .sfl-label,
.sfl-refine-field span.sfl-label {
    padding-bottom: 5px;
    line-height: 1.2em;
    color: #fff;
    font-size: 16px;
}

.sfl-refine-field--textarea textarea {
    min-height: 110px;
}

.sfl-refine-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.sfl-letter-output {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #1e293b;
    min-height: 180px;
    white-space: pre-wrap;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    overflow-x: auto;
}


.sfl-letter-output:focus-visible {
    outline: 3px solid rgba(249, 0, 43, .8);
    outline-offset: 4px;
}

.sfl-print-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sfl-generate-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.sfl-post-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sfl-letter-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.sfl-copy-toast {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: #047857;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Results remain hidden until letter is ready */
.sfl-results.is-hidden {
    display: none;
}

/* Ready callout */
.sfl-ready-callout {
    margin: 12px 0 16px;
    border: 1px solid #f9002b;
    background: #444;
    border-radius: 12px;
    padding: 12px;
}

.sfl-ready-callout__body {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.sfl-ready-callout__text {
    display: grid;
    gap: 2px;
}

.sfl-ready-callout__text strong {
    font-weight: 600;
}

.sfl-ready-callout__text span {
    color: #667085;
}

/* Animated loader for inline message */
.sfl-inline-message.is-loading {
    position: relative;
}

.sfl-inline-message.is-loading::after {
    content: '';
    display: inline-block;
    width: 1.5em;
    text-align: left;
    animation: sfl-ellipsis 1.2s steps(4, end) infinite;
}

@keyframes sfl-ellipsis {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}

/* Saved toast (autosave) */
.sfl-saved-toast {
    margin-left: 8px;
    font-size: 12px;
    color: #0a7c2f;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sfl-saved-toast.is-visible {
    opacity: 1;
}

/* Optional: fully collapse last step’s controls when summarized */
.sfl-step.is-collapsed .sfl-pill-group,
.sfl-step.is-collapsed fieldset>*:not(legend) {
    display: none !important;
}

.sfl-copy-toast[hidden] {
    display: none !important;
}

.sfl-footer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2937;
}

.sfl-footer-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #f9002b;
}

.sfl-save-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.sfl-save-controls.is-hidden {
    display: none;
}

.sfl-save-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
}

.sfl-save-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #f9002b;
}

.sfl-download-btn {
    text-decoration: none;
}

.sfl-download-btn.is-hidden {
    display: none;
}

.sfl-auth-prompt {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem;
    border-radius: 14px;
    border: 1px dashed #cbd5f5;
    background: #222;
    color: #fff;
}

.sfl-auth-prompt.is-hidden {
    display: none;
}

.sfl-auth-prompt[hidden] {
    display: none !important;
}

.sfl-auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sfl-auth-note {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.sfl-print-btn {
    align-self: flex-start;
}

.sfl-my-letters {
    border: 1px solid #333;
    border-radius: 16px;
    background: #222;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 16px 40px -32px rgba(15, 23, 42, 0.28);
}

.sfl-my-letters__toggle {
    appearance: none;
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
    cursor: pointer;
    padding: 0;
}

.sfl-my-letters__toggle::after {
    content: '\25BC';
    font-size: 0.9rem;
    color: #475569;
    transition: transform 0.2s ease;
}

.sfl-my-letters__toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.sfl-my-letters__title {
    font-weight: 700;
}

.sfl-my-letters__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

.sfl-my-letters__panel {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.sfl-my-letters__panel[hidden] {
    display: none !important;
}

.sfl-my-letters__status {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.sfl-my-letters__status.is-error {
    color: #b91c1c;
}

.sfl-my-letters__status[hidden] {
    display: none !important;
}

.sfl-my-letters__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.sfl-my-letters__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    border: 1px solid #000;
    background: #000;
    box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.3);
}

.sfl-my-letters__meta {
    font-size: 0.85rem;
    color: #ccc;
}

.sfl-my-letters__preview {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #334155;
}

.sfl-my-letters__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.sfl-my-letters__action {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
}

.sfl-my-letters__pdf {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f9002b;
    text-decoration: none;
}

.sfl-my-letters__pdf:hover,
.sfl-my-letters__pdf:focus-visible {
    text-decoration: underline;
}

.sfl-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.sfl-link:hover,
.sfl-link:focus-visible {
    text-decoration: underline;
}

#sfl-auth-modal {
    border: none;
    padding: 0;
    max-width: none;
    width: min(420px, calc(100vw - 3rem));
    border-radius: 18px;
    background: transparent;
}

#sfl-auth-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

#sfl-auth-modal[open] {
    display: flex;

    justify-content: center;
    padding: 0;
}

#sfl-auth-modal.is-open {
    position: fixed;
    inset: 0;
    display: flex;

    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 1.5rem;
    z-index: 9999;
}

.sfl-auth-modal__content {
    position: relative;
    background: #333;
    border-radius: 18px;
    padding: 2rem;
    width: min(420px, calc(100vw - 3rem));
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sfl-auth-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sfl-auth-modal__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-transform: capitalize !important;
}

.sfl-auth-modal__close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: #ccc;
    cursor: pointer;
}

.sfl-auth-modal__close:hover,
.sfl-auth-modal__close:focus-visible {
    color: #fff;
    outline: none;
}

.sfl-auth-modal__tabs {
    display: flex;
    gap: 0.75rem;
}

.sfl-auth-modal__tab {
    flex: 1;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 0.75rem 0;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: #ccc;
    text-transform: capitalize !important;
}

.sfl-auth-modal__tab[aria-selected="true"] {
    color: #f9002b;
    border-color: #f9002b;
}

.sfl-auth-modal__tab:focus-visible {
    outline: 3px solid #f9002b;
    outline-offset: 2px;
}

#sfl-auth-modal[data-can-register="0"] .sfl-auth-modal__tab[data-tab="register"] {
    color: #94a3b8;
}

.sfl-auth-modal__panes {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sfl-auth-modal__pane {
    display: block;
}

.sfl-auth-modal__content[data-active="login"] [data-pane="register"] {
    display: none;
}

.sfl-auth-modal__content[data-active="register"] [data-pane="login"] {
    display: none;
}

.sfl-auth-modal__pane form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sfl-auth-modal__pane p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #fff;
}

.sfl-auth-modal__pane .login-remember {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.sfl-auth-modal__pane .login-remember label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.gform-body .sfl-auth-modal__pane input[type="text"],
.gform-body .sfl-auth-modal__pane input[type="password"],
.gform-body .sfl-auth-modal__pane input[type="email"],
.sfl-auth-modal__pane input[type="text"],
.sfl-auth-modal__pane input[type="email"],
.sfl-auth-modal__pane input[type="password"],
.sfl-auth-modal__pane input[type="url"],
.sfl-auth-modal__pane input[type="tel"] {
    width: 100% !important;
    padding: 0.65rem 0.85rem !important;
    border-radius: 10px !important;
    border: 1px solid #d0d5dd;
    background: #f8fafc;
    font-size: 0.95rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    color: #0f172a !important;
}

#input_1_5_1,
.gform-body .sfl-auth-modal__pane input[type="checkbox" i] {
    padding: 0px !important;
}

.gform-theme--framework .gfield_consent_description:where(:not(.gform-theme__disable):not(.gform-theme__disable *):not(.gform-theme__disable-framework):not(.gform-theme__disable-framework *)) {
    background-color: #222 !important;
    color: #ccc !important;
    border-radius: 8px !important;
}

.login-remember label {
    white-space: nowrap !important;
}

.sfl-auth-modal__pane input[type="text"]:focus-visible,
.sfl-auth-modal__pane input[type="email"]:focus-visible,
.sfl-auth-modal__pane input[type="password"]:focus-visible,
.sfl-auth-modal__pane input[type="url"]:focus-visible,
.sfl-auth-modal__pane input[type="tel"]:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
    background: #ffffff;
}

input#gform_submit_button_1,
.sfl-auth-modal__pane .button,
.sfl-auth-modal__pane button,
.sfl-auth-modal__pane input[type="submit"] {
    align-self: flex-start;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    background-color: #f9002b;
    color: #fff;
    width: 100%;
}

.sfl-auth-modal__pane .description {
    color: #475569;
    font-size: 0.85rem;
}

.sfl-auth-modal__message {
    margin: 0;
    font-size: 0.9rem;
    color: #b91c1c;
    min-height: 1.1rem;
}

.sfl-auth-modal__message.is-success {
    color: #047857;
}

.sfl-auth-modal__notice {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
}

@media (max-width: 640px) {

    .wpgpt-nav {
        flex-direction: column;
    }

    .wpgpt-nav__controls {
        gap: 0px;
    }

    .sfl-segmented {
        border-radius: 8px;
        padding: 10px;
    }

    .sfl-wrap {
        padding: 1.75rem 1.25rem;
    }

    .sfl-step-footer,
    .sfl-generate-container {
        flex-direction: column;
        align-items: stretch;
    }

    .sfl-step-footer .sfl-btn,
    .sfl-generate-container .sfl-btn {
        width: 100%;
    }

    .sfl-letter-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .sfl-pill {
        width: 100%;
        justify-content: center;
    }

    .sfl-my-letters {
        padding: 1rem;
    }

    .sfl-my-letters__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sfl-auth-modal__content {
        width: calc(100vw - 2rem);
        padding: 1.5rem;
    }
}

@media print {

    /* Page margins */
    @page {
        margin: 0.5in;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }

    /* Hide theme/chrome and everything in the page except the letter wrapper */
    header,
    #main-header,
    #et-top-navigation,
    #et_mobile_nav_menu,
    #et-boc>*:not(#et-main-area),
    #et-main-area>*:not(#main-content),
    #main-content>*:not(article),
    article>*:not(.entry-content),
    .entry-content>*:not(.sfl-wrap),
    /* hide in-app controls */
    .sfl-form,
    .sfl-save-controls,
    .sfl-auth-prompt,
    .sfl-print-btn,
    .sfl-letter-tools,
    .sfl-my-letters,
    .sfl-refine-panel,
    .sfl-inline-message,
    .sfl-post-actions,
    [data-auth-prompt],
    [data-my-letters] {
        display: none !important;
    }

    /* Only print these: header + letter */
    .sfl-print-header {
        display: block !important;
        margin: 0 0 12pt !important;
        color: #000 !important;
    }

    /* IMPORTANT: your HTML uses .sfl-letter-output (not .sfl-print-output) */
    .sfl-letter-output {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
    }

    /* Your letter text lives inside a nested <pre class="sfl-letter-text"> */
    .sfl-letter-output .sfl-letter-text {
        white-space: pre-wrap !important;
        /* wrap nicely on print */
        margin: 0 !important;
        color: #000 !important;
        display: block !important;
    }

    /* Respect the promo toggle (it’s a <p> with [hidden]) */
    .sfl-letter-promo[hidden] {
        display: none !important;
    }
}