.cfl-auth-shell {
    --cfl-auth-max-width: 520px;
    --cfl-auth-radius: 18px;
    --cfl-auth-border: color-mix(in srgb, currentColor 14%, transparent);
    --cfl-auth-muted: color-mix(in srgb, currentColor 68%, transparent);
    --cfl-auth-soft: color-mix(in srgb, currentColor 5%, transparent);
    --cfl-auth-focus: color-mix(in srgb, currentColor 48%, transparent);
    width: min(100%, var(--cfl-auth-max-width));
    max-width: 100%;
    box-sizing: border-box;
    margin-inline: auto;
    color: inherit;
    font: inherit;
}

.cfl-auth-shell *,
.cfl-auth-shell *::before,
.cfl-auth-shell *::after {
    box-sizing: border-box;
}

.cfl-auth--card {
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid var(--cfl-auth-border);
    border-radius: var(--cfl-auth-radius);
    background: color-mix(in srgb, Canvas 96%, transparent);
    box-shadow: 0 18px 50px color-mix(in srgb, #000 10%, transparent);
}

.cfl-auth--minimal {
    padding-block: clamp(8px, 2vw, 18px);
}

.cfl-auth__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 clamp(22px, 4vw, 32px);
    padding: 4px;
    border-radius: 12px;
    background: var(--cfl-auth-soft);
}

.cfl-auth__tab {
    appearance: none;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 650;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.cfl-auth__tab[aria-selected="true"] {
    background: Canvas;
    box-shadow: 0 2px 12px color-mix(in srgb, #000 8%, transparent);
}

.cfl-auth__tab:focus-visible,
.cfl-auth-shell :where(input, select, textarea, button, a):focus-visible {
    outline: 3px solid var(--cfl-auth-focus);
    outline-offset: 2px;
}

.cfl-auth--mode-switcher .cfl-auth__body {
    position: relative;
}

.cfl-auth--mode-switcher .cfl-auth__panel[aria-hidden="true"] {
    position: absolute;
    inset: 0;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
}

.cfl-auth__heading {
    margin: 0 0 8px;
    color: inherit;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.cfl-auth__intro {
    margin: 0 0 24px;
    color: var(--cfl-auth-muted);
    line-height: 1.55;
}

.cfl-auth__form .fluentform,
.cfl-auth__form .frm-fluent-form {
    width: 100%;
    max-width: 100%;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-group {
    margin-bottom: 18px;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-input--label {
    margin-bottom: 7px;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-input--label label {
    color: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-form-control,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform select,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform textarea {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 10px;
    font: inherit;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform textarea.ff-el-form-control {
    min-height: 110px;
}

.cfl-password-field {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
}

.cfl-password-field > input[type="password"],
.cfl-password-field > input[data-cfl-password-visible="true"] {
    padding-inline-end: 50px !important;
}

/* Hide the legacy Edge/IE native reveal control when Concept supplies its own.
 * Chromium/WebKit password-manager affordances are intentionally left alone. */
.cfl-password-field > input::-ms-reveal,
.cfl-password-field > input::-ms-clear {
    display: none;
}

.cfl-password-toggle {
    position: absolute;
    z-index: 3;
    inset-block-start: 50%;
    inset-inline-end: 7px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px;
    margin: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    opacity: 0.62;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.cfl-password-toggle:hover {
    opacity: 0.9;
    background: color-mix(in srgb, currentColor 7%, transparent);
}

.cfl-password-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 1px;
    opacity: 1;
}

.cfl-password-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.cfl-password-toggle__slash {
    opacity: 0;
}

.cfl-password-toggle.is-visible .cfl-password-toggle__slash {
    opacity: 1;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-form-control:focus,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform input:focus,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform select:focus,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cfl-auth-focus);
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-btn-submit,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform button[type="submit"],
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform input[type="submit"] {
    min-height: 46px;
    max-width: 100%;
    border-radius: 10px;
    padding: 11px 20px;
    font: inherit;
    font-weight: 650;
    line-height: 1.2;
    width: 100%;
}

.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff_submit_btn_wrapper,
.cfl-auth-shell:not(.cfl-auth--unstyled) .fluentform .ff-el-group.ff_submit_btn_wrapper {
    margin-bottom: 0;
}

.cfl-auth-shell .fluentform .ff-el-is-error .text-danger,
.cfl-auth-shell .fluentform .error.text-danger,
.cfl-auth-shell .fluentform .ff-errors-in-stack {
    overflow-wrap: anywhere;
}

.cfl-auth__signed-in,
.cfl-auth--unavailable {
    text-align: center;
}

.cfl-auth__signed-in p,
.cfl-auth--unavailable p {
    margin: 0 0 16px;
}

.cfl-auth__account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--cfl-auth-border);
    border-radius: 10px;
    color: inherit;
    font-weight: 650;
    text-decoration: none;
}

.cfl-auth-admin-notice {
    max-width: 720px;
    margin: 12px auto;
    padding: 12px 14px;
    border: 1px solid #d63638;
    border-radius: 6px;
    background: #fff;
    color: #1d2327;
}


/* Standalone popup placement */
.cfl-auth-popup[hidden] {
    display: none !important;
}

.cfl-auth-popup {
    --cfl-popup-edge: clamp(12px, 2.5vw, 28px);
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: var(--cfl-popup-edge);
    overflow: hidden;
    overscroll-behavior: contain;
}

.cfl-auth-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 62%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cfl-auth-popup__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, var(--cfl-popup-auth-width, 520px));
    max-width: 100%;
    max-height: calc(100vh - (2 * var(--cfl-popup-edge)));
    max-height: calc(100dvh - (2 * var(--cfl-popup-edge)));
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: CanvasText;
    box-shadow: none;
    outline: 0;
}

.cfl-auth-popup__content {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin-inline: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 54px 0 0;
}

.cfl-auth-popup__content > .cfl-auth-shell {
    width: min(100%, var(--cfl-auth-max-width));
}

.cfl-auth-popup__close {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    display: inline-grid;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, CanvasText 16%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, Canvas 92%, CanvasText 8%);
    color: CanvasText;
    font: inherit;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 14px rgb(0 0 0 / 10%);
}

.cfl-auth-popup__close:hover {
    background: color-mix(in srgb, Canvas 84%, CanvasText 16%);
}

.cfl-auth-popup__close:focus-visible {
    outline: 3px solid color-mix(in srgb, CanvasText 48%, transparent);
    outline-offset: 2px;
}

html.cfl-auth-popup-open,
body.cfl-auth-popup-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.cfl-auth-trigger--button {
    display: inline-flex;
    min-height: 44px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 10px;
    background: ButtonFace;
    color: ButtonText;
    font: inherit;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.cfl-auth-trigger--button:focus-visible {
    outline: 3px solid color-mix(in srgb, currentColor 48%, transparent);
    outline-offset: 2px;
}

/* Keep third-party form layouts from forcing the modal wider than the viewport. */
.cfl-auth-popup .cfl-auth-shell,
.cfl-auth-popup .cfl-auth-shell form,
.cfl-auth-popup .cfl-auth-shell fieldset,
.cfl-auth-popup .cfl-auth-shell .fluentform,
.cfl-auth-popup .cfl-auth-shell .frm-fluent-form,
.cfl-auth-popup .cfl-auth-shell .ff-el-group,
.cfl-auth-popup .cfl-auth-shell .ff-el-input--content,
.cfl-auth-popup .cfl-auth-shell .ff-t-container,
.cfl-auth-popup .cfl-auth-shell .ff-t-cell {
    min-width: 0;
    max-width: 100%;
}

.cfl-auth-popup .cfl-auth-shell :where(img, svg, video, canvas, iframe) {
    max-width: 100%;
}

@media (max-width: 640px) {
    .cfl-auth-popup {
        --cfl-popup-edge: 10px;
        align-items: center;
    }

    .cfl-auth-popup__dialog {
        width: 100%;
        border-radius: 18px;
    }

    .cfl-auth-popup__content {
        padding: 50px 0 0;
    }

    .cfl-auth-popup__close {
        top: 8px;
        right: 8px;
    }

    .cfl-auth-popup .cfl-auth-shell .ff-t-container {
        display: block;
    }

    .cfl-auth-popup .cfl-auth-shell .ff-t-cell {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .cfl-auth-shell {
        width: 100%;
    }

    .cfl-auth--card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .cfl-auth__tabs {
        margin-bottom: 22px;
    }


    .cfl-auth-shell .fluentform .ff-t-cell,
    .cfl-auth-shell .fluentform .ff-el-group.ff_list_buttons,
    .cfl-auth-shell .fluentform .ff-el-form-check {
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .cfl-auth-popup {
        --cfl-popup-edge: 6px;
    }

    .cfl-auth-popup__dialog {
        border-radius: 14px;
    }

    .cfl-auth-popup__content {
        padding: 48px 0 0;
    }

    .cfl-auth--card {
        padding-inline: 12px;
    }

    .cfl-auth__tab {
        padding-inline: 8px;
        font-size: 0.94rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cfl-auth-popup *,
    .cfl-auth-popup *::before,
    .cfl-auth-popup *::after,
    .cfl-auth-shell *,
    .cfl-auth-shell *::before,
    .cfl-auth-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (forced-colors: active) {
    .cfl-auth-popup__backdrop {
        background: Canvas;
        opacity: 0.82;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .cfl-auth-popup__dialog,
    .cfl-auth-popup__close,
    .cfl-auth-trigger--button,
    .cfl-auth__tabs,
    .cfl-auth__tab[aria-selected="true"],
    .cfl-auth--card,
    .cfl-auth__account-link {
        border: 1px solid CanvasText;
    }
}

/* Flatsome / WooCommerce supported-popup adapter. */
#login-form-popup.cfl-flatsome-auth-popup {
    box-sizing: border-box;
    width: min(calc(100vw - 24px), var(--cfl-adapter-auth-width, 520px)) !important;
    max-width: var(--cfl-adapter-auth-width, 520px) !important;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-inline: auto;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#login-form-popup.cfl-flatsome-auth-popup > .cfl-auth-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell form,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell fieldset,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .fluentform,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .frm-fluent-form,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .ff-t-container,
#login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .ff-t-cell {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 540px) {
    #login-form-popup.cfl-flatsome-auth-popup {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }

    #login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .ff-t-container {
        display: block;
    }

    #login-form-popup.cfl-flatsome-auth-popup .cfl-auth-shell .ff-t-cell {
        width: 100% !important;
        padding-inline: 0 !important;
    }
}

/* Universal theme / builder integration staging and mounted states. */
.cfl-universal-source:not(.is-mounted) {
    position: fixed !important;
    inset: auto auto 0 -200vw !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.cfl-universal-source.is-mounted {
    width: 100%;
    max-width: 100%;
}

.cfl-universal-target,
.cfl-universal-target > .cfl-universal-source,
.cfl-universal-target .cfl-auth-shell {
    box-sizing: border-box;
    max-width: 100%;
}

/*
 * Existing-container replace mode owns the administrator-confirmed auth-body
 * target, so compact that target around the Concept card instead of inheriting
 * a theme's full-width white lightbox canvas. Common modal-content ancestors
 * are marked by frontend.js only while they actually contain the mounted
 * Concept interface; unrelated theme popups are untouched.
 */
.cfl-universal-compact-host,
.cfl-adapter-compact-host {
    box-sizing: border-box !important;
    width: min(calc(100vw - 16px), var(--cfl-universal-auth-width, var(--cfl-adapter-auth-width, 520px))) !important;
    max-width: var(--cfl-universal-auth-width, var(--cfl-adapter-auth-width, 520px)) !important;
    margin-inline: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.cfl-universal-compact-host > .cfl-universal-source.is-mounted,
.cfl-adapter-compact-host > #login-form-popup.cfl-flatsome-auth-popup {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 540px) {
    .cfl-universal-compact-host,
    .cfl-adapter-compact-host {
        width: calc(100vw - 12px) !important;
    }
}

/* Non-destructive administrator preview for Universal CSS-selector targets. */
.cfl-universal-preview-match {
    outline: 3px solid currentColor !important;
    outline-offset: 3px !important;
    position: relative;
}

.cfl-universal-preview-panel {
    position: fixed;
    z-index: 2147483646;
    right: 16px;
    bottom: 16px;
    box-sizing: border-box;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 14px 16px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: Canvas;
    color: CanvasText;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
    font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cfl-universal-preview-panel > * {
    display: block;
    margin: 0 0 8px;
}

.cfl-universal-preview-panel > *:last-child {
    margin-bottom: 0;
}

.cfl-universal-preview-selector {
    overflow-wrap: anywhere;
    white-space: normal;
}

.cfl-universal-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cfl-universal-preview-actions a {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.cfl-universal-preview-confirm {
    font-weight: 700;
}

@media (max-width: 540px) {
    .cfl-universal-preview-panel {
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }
}

.cfl-auth__recovery {
    margin: 12px 0 0;
    font-size: 0.925rem;
}

.cfl-auth__recovery a {
    text-decoration: none;
}

.cfl-auth__recovery a:hover,
.cfl-auth__recovery a:focus-visible {
    text-decoration: underline;
}
