:root {
    --fchat-header-background-color: #319ed7;
    --fchat-header-text-color: #fff
}

.fchat-button-container {
    outline: none !important;
    visibility: visible !important;
    resize: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: none !important;
    opacity: 1 !important;
    filter: alpha(opacity=100) !important;
    -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity 1})' !important;
    -mz-opacity: 1 !important;
    -khtml-opacity: 1 !important;
    top: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    position: fixed !important;
    border: 0 !important;
    min-height: 60px !important;
    min-width: 64px !important;
    max-height: 60px !important;
    max-width: 64px !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-transition-property: none !important;
    -webkit-transition-property: none !important;
    -o-transition-property: none !important;
    transition-property: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    width: 64px !important;
    height: 60px !important;
    z-index: 1000001 !important;
    background-color: transparent !important;
    float: none !important;
    border-radius: unset !important;
    pointer-events: auto !important;
    clip: auto !important;
    color-scheme: light !important;
}

@media screen and (min-width: 501px) {
    .fchat-chat-container {
        outline: none !important;
        visibility: visible !important;
        resize: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        background-color: white;
        opacity: 1 !important;
        filter: alpha(opacity=100) !important;
        -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity 1})' !important;
        -mz-opacity: 1 !important;
        -khtml-opacity: 1 !important;
        top: auto !important;
        right: 20px !important;
        bottom: 100px !important;
        left: auto !important;
        position: fixed !important;
        border: 0 !important;
        min-width: 0 !important;
        max-height: 620px !important;
        height: min(620px, calc(100dvh - 120px)) !important;
        max-width: calc(100vw - 28px) !important;
        padding: 0 !important;
        margin: 0 !important;
        -moz-transition-property: none !important;
        -webkit-transition-property: none !important;
        -o-transition-property: none !important;
        transition-property: none !important;
        transform: none !important;
        -webkit-transform: none !important;
        -ms-transform: none !important;
        width: min(440px, calc(100vw - 28px)) !important;
        z-index: 1000002 !important;
        background-color: transparent !important;
        float: none !important;
        border-radius: 24px !important;
        pointer-events: auto !important;
        clip: auto !important;
        color-scheme: light !important;
    }
}

@media screen and (max-width: 500px) {
    .fchat-chat-container {
        outline: none !important;
        visibility: visible !important;
        resize: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        background-color: white;
        opacity: 1 !important;
        filter: alpha(opacity=100) !important;
        -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity 1})' !important;
        -mz-opacity: 1 !important;
        -khtml-opacity: 1 !important;
        top: auto !important;
        right: 14px !important;
        bottom: 94px !important;
        left: auto !important;
        position: fixed !important;
        border: 0 !important;
        min-width: 0 !important;
        max-height: calc(100vh - 116px) !important;
        height: calc(100dvh - 116px) !important;
        max-width: calc(100vw - 28px) !important;
        padding: 0 !important;
        margin: 0 !important;
        -moz-transition-property: none !important;
        -webkit-transition-property: none !important;
        -o-transition-property: none !important;
        transition-property: none !important;
        transform: none !important;
        -webkit-transform: none !important;
        -ms-transform: none !important;
        width: calc(100vw - 28px) !important;
        z-index: 1000002 !important;
        background-color: transparent !important;
        float: none !important;
        border-radius: 20px !important;
        pointer-events: auto !important;
        clip: auto !important;
        color-scheme: light !important;
    }
}


.fchat-min-container {
    position: relative
}

.fchat-min-container,.fchat-min-container .fchat-button {
    height: 100%;
    width: 100%
}

.fchat-min-container .fchat-button-circle.fchat-button-large {
    width: 60px;
    height: 60px
}

.fchat-min-container .fchat-button-circle.fchat-button-large {
    background: linear-gradient(145deg, #397ff0, #2367dc);
    border: 1px solid rgba(255, 255, 255, .35) !important;
    box-shadow: 0 10px 26px rgba(37, 107, 224, .4);
    transition: transform .2s ease, box-shadow .2s ease !important;
}

.fchat-min-container .fchat-button-circle.fchat-button-large:hover {
    box-shadow: 0 13px 32px rgba(37, 107, 224, .5);
    transform: translateY(-2px) !important;
}

.fchat-min-container .fchat-button-circle.fchat-button-large[aria-expanded="true"] {
    background: #fff;
    border-color: rgba(54, 116, 220, .42) !important;
    box-shadow: 0 10px 30px rgba(34, 103, 220, .42);
}

.fchat-min-container .fchat-button-circle.fchat-button-large[aria-expanded="true"] .fchat-min-chat-icon {
    fill: #18202f;
}


.fchat-badge,.fchat-button {
    box-sizing: border-box;
    vertical-align: middle;
    text-align: center
}

.fchat-button {
    margin: 0;
    border-radius: 5px;
    overflow: hidden;
    font: inherit;
    color: inherit;
    text-transform: none;
    display: inline-block;
    padding: .5rem 1rem;
    font-size: 1rem;
    border: 1px solid #1f6885;
    border-color: var(--fchat-header-background-color);
    line-height: 1.5rem;
    text-decoration: none;
    background-color: #1f6885;
    background-color: var(--fchat-header-background-color);
    color: #fff;
    color: var(--fchat-header-text-color)
}

.fchat-button:not(:disabled) {
    cursor: pointer
}

.fchat-button:disabled {
    cursor: not-allowed;
    opacity: .7
}

.fchat-button::-moz-focus-inner {
    border: 0;
    padding: 0
}

.fchat-button:hover,a.fchat-button:hover {
    text-decoration: none
}

a.fchat-button:hover {
    color: #fff;
    color: var(--fchat-header-text-color)
}

.fchat-button:active,.fchat-button:focus {
    outline: 0;
    -webkit-tap-highlight-color: transparent
}

.fchat-button-success {
    background-color: #1f6885;
    color: #fff;
    border: 1px solid #1f6885
}

.fchat-button-danger {
    background-color: #f0505c;
    color: #fff;
    border: 1px solid #f0505c
}

.fchat-button-outline,a.fchat-button-outline:hover {
    background-color: #fff;
    background-color: var(--fchat-header-text-color);
    color: #1f6885;
    color: var(--fchat-header-background-color);
    border-color: #1f6885;
    border-color: var(--fchat-header-background-color)
}

.fchat-button-outline:hover {
    color: var(--fchat-header-text-color);
    background-color: var(--fchat-header-background-color)
}

.fchat-button-outline-success {
    color: #1f6885;
    border: 1.5px solid #1f6885
}

.fchat-button-outline-danger {
    color: #f0505c;
    border: 1.5px solid #f0505c
}

.fchat-button-dashed {
    border-style: dashed;
    background-color: #fff;
    color: #1f6885;
    color: var(--fchat-header-background-color)
}

.fchat-button-small {
    padding: .25rem 1rem;
    line-height: 1.5rem;
    font-size: .812rem
}

.fchat-button-large {
    padding: 1rem 2rem;
    line-height: 1.5rem;
    font-size: .937rem
}

.fchat-button-rounded {
    border-radius: 2.5rem
}

.fchat-button-small.fchat-button-rounded {
    border-radius: 1.875rem
}

.fchat-button-large.fchat-button-rounded {
    border-radius: 2.5rem
}

.fchat-button-text {
    padding: 0;
    line-height: 1.618;
    background: 0 0;
    border: none
}

.fchat-button-text,.fchat-button-text:focus,.fchat-button-text:hover {
    color: #1f6885;
    color: var(--fchat-header-background-color)
}

.fchat-button-text:active,.fchat-button-text:focus {
    outline: 0;
    -webkit-tap-highlight-color: transparent
}

.fchat-button-text:disabled {
    color: #92929e!important;
    cursor: not-allowed;
    outline: none
}

.fchat-button-group {
    display: -ms-inline-flexbox;
    display: inline-flex;
    vertical-align: middle;
    position: relative
}

.fchat-button-circle {
    height: 2.5rem;
    width: 2.5rem;
    line-height: 2.5rem;
    padding: 0;
    border-radius: 100%
}

.fchat-button-circle.fchat-button-small {
    height: 1.625rem;
    width: 1.625rem;
    line-height: 1.625rem
}

.fchat-button-circle.fchat-button-large {
    height: 3.75rem;
    width: 3.75rem;
    line-height: 3.75rem
}

.fchat-button-dashed .fchat-button-color-inverse,.fchat-button-outline .fchat-button-color-inverse {
    color: #fff;
    color: var(--fchat-header-text-color);
    border-color: #fff;
    border-color: var(--fchat-header-text-color)
}

.fchat-button-text.fchat-button-color-inverse,.fchat-button-text.fchat-button-color-inverse:focus,.fchat-button-text.fchat-button-color-inverse:hover {
    color: #fff;
    color: var(--fchat-header-text-color)
}

.fchat-min-chat-icon {
    fill: #fff;
    fill: var(--fchat-header-text-color);
    animation-duration: .25s;
    animation-name: iconAnimation
}

@keyframes iconAnimation {
    0% {
        opacity: 0;
        transform: scale(.5)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.fchat-badge {
    height: 1.25rem;
    width: 1.25rem;
    font-size: .687rem;
    line-height: 1.25rem;
    background: #bf1212;
    color: #fff;
    border-radius: 50%
}

.fchat-badge.fchat-min-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1100
}

body.fchat-rtl .fchat-badge.fchat-min-badge {
    right: auto;
    left: 0
}


.fchat-max-container {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(25, 34, 49, .08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(18, 25, 38, .22);
}

.fchat-status {
    box-sizing: border-box;
    margin: 18px 28px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #315b93;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.fchat-status.fchat-status-error {
    background: #fff1f2;
    color: #a52d3d;
}

.fchat-start-screen,
.fchat-start-screen * {
    box-sizing: border-box;
}

.fchat-start-screen {
    width: 100%;
    padding: 36px 34px 28px;
    color: #18202f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
}

.fchat-start-screen__mark {
    display: flex;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(28, 38, 55, .05);
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, #f5f7fb);
    box-shadow: 0 9px 20px rgba(24, 32, 47, .15);
}

.fchat-start-screen__mark img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.fchat-start-screen__heading h2 {
    margin: 0;
    color: #18202f;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.18;
}

.fchat-start-screen__heading p {
    margin: 10px 0 25px;
    color: #6d7689;
    font-size: 16px;
    line-height: 1.5;
}

.fchat-start-screen__fields {
    display: grid;
    gap: 14px;
}

.fchat-start-field {
    display: flex;
    min-height: 60px;
    margin: 0;
    padding: 0 18px;
    align-items: center;
    gap: 14px;
    border: 1px solid #d8dce4;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(24, 32, 47, .02);
    cursor: text;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.fchat-start-field:focus-within {
    border-color: #2f78df;
    box-shadow: 0 0 0 3px rgba(47, 120, 223, .14);
}

.fchat-start-field__icon {
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: #2f78df;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.fchat-start-field .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fchat-start-field .fchat-start-field__input {
    -webkit-appearance: none;
    width: 100% !important;
    min-width: 0;
    height: auto;
    margin: 0 !important;
    padding: 17px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #18202f !important;
    font: inherit;
    font-size: 17px;
    line-height: 1.4;
}

.fchat-start-field .fchat-start-field__input::placeholder {
    color: #7b8290;
    opacity: 1;
}

.fchat-start-button {
    display: flex;
    width: 100%;
    min-height: 60px;
    margin: 18px 0 0;
    padding: 14px 22px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #2c72e5 0%, #3487f4 100%);
    box-shadow: 0 9px 20px rgba(44, 114, 229, .3);
    color: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.fchat-start-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.fchat-start-button:hover {
    box-shadow: 0 12px 25px rgba(44, 114, 229, .38);
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.fchat-start-button:focus-visible {
    outline: 3px solid rgba(47, 120, 223, .3);
    outline-offset: 3px;
}

.fchat-start-button:active {
    box-shadow: 0 6px 14px rgba(44, 114, 229, .28);
    transform: translateY(1px);
}

.fchat-start-screen__privacy {
    display: flex;
    margin: 18px 0 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6d7689;
    font-size: 13px;
    line-height: 1.4;
}

.fchat-start-screen__privacy svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

@media screen and (max-width: 500px) {
    .fchat-start-screen {
        max-height: calc(100vh - 116px);
        padding: 26px 20px 22px;
        overflow-y: auto;
    }

    .fchat-start-screen__mark {
        width: 64px;
        height: 64px;
        margin-bottom: 15px;
    }

    .fchat-start-screen__mark img {
        width: 37px;
        height: 37px;
    }

    .fchat-start-screen__heading h2 {
        font-size: 25px;
    }

    .fchat-start-screen__heading p {
        margin: 8px 0 20px;
        font-size: 14px;
    }

    .fchat-start-field,
    .fchat-start-button {
        min-height: 56px;
    }

    .fchat-start-field {
        padding: 0 15px;
    }

    .fchat-start-field .fchat-start-field__input {
        padding: 15px 0 !important;
        font-size: 16px;
    }

    .fchat-start-button {
        margin-top: 15px;
        font-size: 17px;
    }

    .fchat-start-screen__privacy {
        margin-top: 15px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fchat-min-container .fchat-button-circle.fchat-button-large,
    .fchat-start-field,
    .fchat-start-button {
        transition: none !important;
    }
}

/* Reference-inspired conversation window */
.fchat-max-container {
    border: 1px solid #e4e8ef;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(24, 32, 47, .22);
    color: #18202f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fchat-window-header {
    display: flex;
    height: 92px;
    flex: 0 0 92px;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px 0 34px;
    border-bottom: 1px solid #e7ebf1;
    background: #fff;
}

.fchat-window-brand,
.fchat-window-actions {
    display: flex;
    align-items: center;
}

.fchat-window-brand { gap: 20px; }
.fchat-window-brand__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #347ff2, #2368df);
    box-shadow: 0 8px 18px rgba(43, 112, 231, .22);
}
.fchat-window-brand__icon img { width: 34px; height: 34px; object-fit: contain; }
.fchat-window-brand__title { color: #18202f; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.fchat-window-actions { gap: 24px; }
.fchat-window-action { position: relative; width: 32px; height: 36px; padding: 0; border: 0; background: transparent; color: #8791a4; cursor: pointer; }
.fchat-window-menu { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.fchat-window-menu span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.fchat-window-close span { position: absolute; top: 16px; left: 3px; width: 31px; height: 3px; border-radius: 2px; background: currentColor; }
.fchat-window-close span:first-child { transform: rotate(45deg); }
.fchat-window-close span:last-child { transform: rotate(-45deg); }
.fchat-window-action:focus-visible { outline: 3px solid rgba(47, 120, 223, .25); outline-offset: 3px; }

.fchat-status { margin: 14px 28px 0; }
.fchat-overlay {
    flex: 1 1 auto;
    box-sizing: border-box;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 30px 30px 20px;
    scrollbar-width: thin;
    scrollbar-color: #c9d1df transparent;
}
.fchat-message-remote,
.fchat-message-local { position: relative; left: auto; width: 100%; margin: 0 0 28px; padding: 0 !important; align-items: flex-start; }
.fchat-message-remote { justify-content: flex-start; }
.fchat-message-local { justify-content: flex-end; }
.fchat-message-remote > .fchat-flex-auto:first-child,
.fchat-message-local > .fchat-flex-auto:last-of-type { flex: 0 0 46px; max-width: 46px !important; width: 46px; }
.fchat-message-remote img,
.fchat-message-local img { display: block; width: 46px; height: 46px; object-fit: cover; border: 0; }
.fchat-message-remote .fchat-message-text,
.fchat-message-local .fchat-message-text { box-sizing: border-box; max-width: calc(100% - 62px); margin: 0; padding: 18px 24px; border-radius: 23px; font-size: 20px; line-height: 1.35; }
.fchat-message-remote .fchat-message-text { margin-left: 16px; background: #f0f3f8; color: #18202f; border-bottom-left-radius: 4px; }
.fchat-message-local .fchat-message-text { margin-right: 16px; order: 1; background: linear-gradient(135deg, #2f76e8, #347ff2); color: #fff; border-bottom-right-radius: 4px; }
.fchat-message-remote > div:nth-child(2), .fchat-message-local > div:first-child { display: flex; flex-direction: column; }
.fchat-message-local > div:first-child { align-items: flex-end; }
.fchat-message-remote .fchat-message-author,
.fchat-message-local .fchat-message-author { padding: 8px 0 0; color: #7c879b; font-size: 15px; font-style: normal; line-height: 1.3; }
.fchat-message-remote .fchat-message-author { padding-left: 16px; }
.fchat-message-local .fchat-message-author { padding-right: 16px; }
.fchat-message-local .fchat-message-author::after { content: " ✓"; color: #2f7bea; font-weight: 700; }
.fchat-message-links a { color: inherit; }

.fchat-composer { display: flex; min-height: 92px; flex: 0 0 auto; align-items: center; gap: 10px; margin: 0 28px 28px; padding: 10px 12px 10px 22px; border: 1px solid #dbe1eb; border-radius: 22px; background: #fff; box-shadow: 0 2px 4px rgba(24, 32, 47, .03); }
.fchat-composer__attachment, .fchat-composer__send { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; }
.fchat-composer__attachment { width: 34px; height: 48px; color: #7f8ba0; }
.fchat-composer__attachment svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.fchat-composer__attachment[aria-disabled="true"] { cursor: default; }
.fchat-composer input { min-width: 0; flex: 1 1 auto; height: 52px; margin: 0 !important; padding: 0 8px !important; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; color: #18202f !important; font: inherit; font-size: 19px; }
.fchat-composer input::placeholder { color: #7f8ba0; opacity: 1; }
.fchat-composer__send { width: 62px; height: 62px; border-radius: 20px; background: linear-gradient(145deg, #347ff2, #2368df); box-shadow: 0 8px 18px rgba(43, 112, 231, .24); color: #fff; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.fchat-composer__send svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.fchat-composer__send:hover { transform: translateY(-1px); box-shadow: 0 11px 23px rgba(43, 112, 231, .34); }
.fchat-composer__send:disabled { cursor: not-allowed; opacity: .55; transform: none; }

@media screen and (max-width: 500px) {
    .fchat-window-header { height: 76px; flex-basis: 76px; padding: 0 18px 0 22px; }
    .fchat-window-brand { gap: 13px; }
    .fchat-window-brand__icon { width: 44px; height: 44px; }
    .fchat-window-brand__icon img { width: 29px; height: 29px; }
    .fchat-window-brand__title { font-size: 24px; }
    .fchat-window-actions { gap: 10px; }
    .fchat-overlay { padding: 22px 16px 14px; }
    .fchat-message-remote .fchat-message-text, .fchat-message-local .fchat-message-text { font-size: 17px; padding: 14px 17px; }
    .fchat-message-remote img, .fchat-message-local img { width: 38px; height: 38px; }
    .fchat-message-remote > .fchat-flex-auto:first-child, .fchat-message-local > .fchat-flex-auto:last-of-type { flex-basis: 38px; width: 38px; }
    .fchat-composer { min-height: 76px; margin: 0 14px 16px; padding-left: 12px; border-radius: 19px; }
    .fchat-composer__send { width: 52px; height: 52px; border-radius: 16px; }
    .fchat-composer input { font-size: 16px; }
}

.fchat-max-container.fchat-no-toolbar-elements .slide-fade-leave-active .fchat-chat-panel:before {
    visibility: hidden
}

.fchat-max-container.fchat-no-toolbar-elements .fchat-main-panel .fchat-chat-panel:before {
    content: " ";
    position: fixed;
    top: 1rem;
    left: 1px;
    right: 1px;
    height: calc(29px + 1rem);
    width: auto
}


.fchat-message-remote {
    position: relative;
    left: 10px;
}

.fchat-message-remote  .fchat-message-text {
    margin-left: 10px; 
    padding: 10px 20px 10px 10px; 
    border-radius: 5px 5px 5px 0px; 
    background-color: #cbcbcb;
    max-width: calc(100% - 70px)
}

.fchat-message-remote  .fchat-message-author {
    font-size: 0.6rem;
    font-style: italic;
    padding: 3px 0 0 20px;
}

.fchat-message-local {
    width: 100%; 
    padding-left: 25px;
}

.fchat-message-local  .fchat-message-text {
    margin-left: 10px; 
    padding: 10px 10px 10px 10px; 
    border-radius: 5px 5px 0px 5px; 
    background-color: #54bff8;
    max-width: calc(100% - 65px);
}

.fchat-message-local  .fchat-message-author {
    font-size: 0.6rem;
    font-style: italic;
    padding: 3px 0 0 20px;
}

.fchat-message-local::nth-child(n+1) {
    margin-top: 25px;
}

.fchat-message-remote::nth-child(n+1) {
    margin-top: 25px;
}

/* Keep the reference message treatment ahead of legacy theme overrides. */
.fchat-message-remote { left: auto; margin: 0 0 28px; padding: 0 !important; }
.fchat-message-local { width: 100%; padding-left: 0; margin: 0 0 28px; }
.fchat-message-remote .fchat-message-text,
.fchat-message-local .fchat-message-text { margin: 0; padding: 18px 24px; border-radius: 23px; max-width: calc(100% - 62px); font-size: 20px; line-height: 1.35; }
.fchat-message-remote .fchat-message-text { margin-left: 16px; border-bottom-left-radius: 4px; background: #f0f3f8; color: #18202f; }
.fchat-message-local .fchat-message-text { margin-right: 16px; border-radius: 23px 23px 4px 23px; background: linear-gradient(135deg, #2f76e8, #347ff2); color: #fff; }
.fchat-message-remote .fchat-message-author,
.fchat-message-local .fchat-message-author { padding: 8px 0 0; font-size: 15px; font-style: normal; color: #7c879b; }
.fchat-message-remote .fchat-message-author { padding-left: 16px; }
.fchat-message-local .fchat-message-author { padding-right: 16px; }
.fchat-message-local .fchat-message-author::after { content: " ✓"; color: #2f7bea; font-weight: 700; }
@media screen and (max-width: 500px) {
    .fchat-message-remote .fchat-message-text, .fchat-message-local .fchat-message-text { padding: 14px 17px; font-size: 17px; }
}

/* Keep message content inside the panel when the local avatar uses the legacy inline styles. */
.fchat-message-remote > div:nth-child(2),
.fchat-message-local > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 62px);
}
.fchat-message-remote,
.fchat-message-local {
    flex-wrap: nowrap;
    box-sizing: border-box;
    overflow: hidden;
}
.fchat-message-local > div:first-child {
    flex: 0 1 auto;
    width: 100% !important;
    max-width: 100% !important;
}
/* The local wrapper is the only direct child, so do not let the avatar sizing rule collapse it. */
.fchat-message-local > .fchat-flex-auto:first-child {
    flex: 1 1 auto !important;
    min-width: 0;
    width: 100% !important;
    max-width: 100% !important;
}
.fchat-message-remote .fchat-message-text,
.fchat-message-local .fchat-message-text {
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.fchat-message-local > div:first-child > .fchat-flex-auto {
    position: static !important;
    top: auto !important;
    right: auto !important;
    float: none !important;
    flex: 0 0 46px;
    width: 46px;
    max-width: 46px !important;
    align-self: flex-end;
}
.fchat-message-local > div:first-child > .fchat-flex-auto img {
    width: 46px;
    height: 46px;
}
@media screen and (max-width: 500px) {
    .fchat-message-remote > div:nth-child(2),
    .fchat-message-local > div:first-child {
        max-width: calc(100% - 50px);
    }
    .fchat-message-local > div:first-child {
        flex: 0 1 auto;
        width: 100% !important;
        max-width: 100% !important;
    }
    .fchat-message-local > div:first-child > .fchat-flex-auto {
        flex-basis: 38px;
        width: 38px;
        max-width: 38px !important;
    }
    .fchat-message-local > div:first-child > .fchat-flex-auto img {
        width: 38px;
        height: 38px;
    }
}

