:host {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    /*border: 1px solid #ccc;*/
    border-radius: 10px;
    box-sizing: border-box;
    overflow: hidden;
    overflow-anchor: none !important;
    -webkit-text-size-adjust: 100%;
    container-type: inline-size;
    container-name: chat__resize;
    --color-1: var(--color_eUnify, var(--brand-600, #7F56D9));
    --color-text-chat: var(--gray-900, #181d27);
    --color-chat: rgba(from var(--gray-900, #181d27) r g b / 0.14);
    --color-2: var(--white, #ffffff);
    --color-def: rgba(249, 249, 249, .9); /*transparent;*/
    --color-bg-attch: var(--gray-300, #d5d7da);
    --chatcomponent-user-mess-bg: var(--color-1);
    --chatcomponent-chat-mess-bg: var(--color-def);
    --chatcomponent-chatV2-mess-bg: var(--color-chat);
    --chatcomponent-user-mess-text: var(--color-2);
    --chatcomponent-chat-mess-text: var(--color-text-chat);
    --chatcomponent-new-chat: var(--color-2);
    --chatcomponent-send-mess: var(--color-1);
    --chatcomponent-file-bg: var(--color-bg-attch);
    --chatcomponent-mention-color: var(--color-1);
    /* Font scale for accessibility A-A-A control. Default = 1 (no change). */
    --eun-chat-font-scale: 1;
}

button, input, optgroup, select, textarea, h2, div {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
}

.eunChat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    /*background: #f9f9f9;*/
    width: 100%;
    position: relative;

    & h2 {
        margin: 0;
    }

    & .header__label-name-mob,
    & .header__label-name {
        display: none;
    }

    @container eunChat__resize (max-width: 790px) {
        & {
            justify-content: flex-end;
        }

            & .new-eunChat-btn {
                max-width: 100px;
                width: 100%;
                gap: 8px;
            }

            & .header__label-name-mob {
                display: block;
            }
    }
}

.new-chat-btn {
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    padding: 4px;
    margin: 8px;
    border-radius: 4px;
    cursor: pointer;
    background: var(--chatcomponent-new-chat);
    border: 1px solid hsl(from var(--chatcomponent-send-mess) h s l / 0.2);
}

    .new-chat-btn:hover {
        background-color: hsl(from var(--chatcomponent-send-mess) h s l / 0.5);

        @container chat__resize (min-width: 800px) {
            & ~ .header__label-name {
                display: block;
                position: absolute;
                bottom: -20px;
                padding: 4px 8px;
                left: 8px;
                z-index: 2;
                border: 1px solid hsl(from var(--chatcomponent-send-mess) h s l / 0.2);
                border-radius: 4px;
                font-size: 14px;
            }
        }
    }

.eunChat-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    /*background: #f9f9f9;*/
    height: 100%;
    min-height: 0;
    overflow-anchor: none !important;
}

/* Wrapper around the scrollable history — positioning context for the
   floating "scroll to latest" button so the button stays put while the
   history scrolls underneath it. */
.eunChat-historyWrap {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eunChat-history {
    flex: 1;
    overflow-y: auto;
    /* Prevent wide content (long unbreakable tokens, code) from creating a
       horizontal scrollbar. padding-left:34px gives .message-actions (left:-24px)
       enough room so overflow-x:hidden does not clip them. */
    overflow-x: hidden;
    overflow-anchor: none !important;
    padding: 10px 10px 10px 34px;
    /*background: #f9f9f9;*/
    max-width: 768px;
    width: calc(100% - 38px);
    margin-bottom: 20px;
    min-height: 0;
    /* Scale message bubble text via the host-level custom property. */
    font-size: calc(16px * var(--eun-chat-font-scale));
}

/* Jump-to-bottom pill — only visible (via .is-visible) when scrolled up. */
.eunChat-scrollBottom {
    position: absolute;
    bottom: 28px;
    left: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 50%;
    background: #fff;
    color: var(--gray-600, #475467);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 7;
    /* hidden state */
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

    .eunChat-scrollBottom.is-visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .eunChat-scrollBottom:hover {
        background: var(--gray-50, #f9fafb);
        color: var(--gray-800, #1d2939);
    }

    .eunChat-scrollBottom:focus-visible {
        outline: 2px solid var(--chatcomponent-user-mess-bg, #0d6efd);
        outline-offset: 2px;
    }

/* Busy overlay — sibling of #eunChatHistory, positioned over it via JS offset metrics */
.eunChat-busy {
    position: absolute; /* geometry set by _positionBusy() to match the history box */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55); /* slight veil — history stays visible underneath */
    z-index: 6;
    border-radius: 10px;
}

    .eunChat-busy.is-active {
        display: flex;
    }

.eunChat-busy__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, .12);
    border-top-color: var(--chatcomponent-user-mess-bg, #0d6efd);
    border-radius: 50%;
    animation: eunChat-busy-spin .8s linear infinite;
}

@keyframes eunChat-busy-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification stack — top-right, over the chat. Entries auto-dismiss or close via × */
.eunChat-toasts {
    position: absolute;
    top: 44px;
    right: 12px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100% - 24px));
    pointer-events: none; /* container ignores clicks; individual toasts re-enable */
}

.eunChat-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--white, #ffffff);
    color: var(--gray-900, #181d27);
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-left: 3px solid var(--color-1, #0d6efd);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

    .eunChat-toast.is-visible {
        opacity: 1;
        transform: translateX(0);
    }

.eunChat-toast--warn {
    border-left-color: #f59e0b;
}

.eunChat-toast--error {
    border-left-color: #ef4444;
}

.eunChat-toast--success {
    border-left-color: #22c55e;
}

.eunChat-toast--info {
    border-left-color: var(--color-1, #0d6efd);
}

.eunChat-toast__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eunChat-toast__title {
    font-weight: 600;
    font-size: 13px;
}

.eunChat-toast__item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    font-size: 12px;
}

.eunChat-toast__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-800, #1d2939);
}

.eunChat-toast__reason {
    flex: none;
    font-size: 11px;
    color: var(--gray-500, #667085);
}

.eunChat-toast__close {
    flex: none;
    width: 18px;
    height: 18px;
    margin: -2px -4px 0 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-500, #667085);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}

    .eunChat-toast__close:hover {
        background: rgba(0, 0, 0, 0.06);
        color: var(--gray-800, #1d2939);
    }

.eunChat-wrapper__mess {
    width: fit-content;
    max-width: calc(100% - 160px);
}

.body__mess {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 4px;
    /* overflow-wrap:anywhere breaks only truly unbreakable tokens (long URLs,
       code identifiers) while keeping normal words intact; it also reduces
       the min-content width so fit-content bubbles never push past the container.
       word-break:break-all is removed — it was splitting ordinary words
       mid-character unnecessarily. */
    overflow-wrap: anywhere;
    min-width: 0;
    max-width: 100%;
    position: relative;

    & a {
    }

    & .message-actions {
        position: absolute;
        left: -24px;
        top: 4px;
        display: flex;
        flex-direction: column;
    }

    & .message-action {
        width: 24px;
        height: 14px;
        background: transparent;
        border: none;
        border: none;
        opacity: 0.6;
        cursor: pointer;
    }

        & .message-action:hover {
            opacity: 1;
        }

    &.minimal-user {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 4px;
        border-bottom-left-radius: 12px;
    }

    &.minimal-chat {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        border-bottom-left-radius: 4px;
    }
}

    /* Apply pre-wrap only to user bubbles, not bot/AI bubbles.
   v1 (eun_Chat.js): user messages are set via textContent (plain text) — newlines must
   be preserved visually; bot/loading bubbles receive class "mess__chat" (eun_Chat.js:363).
   v2 (eun_ChatV2.js): bot bubbles receive "mess--chat", system get "mess--system".
   User bubbles in both components have none of those three classes, so the :not() chain
   targets exactly the right set without touching bot/AI messages whose innerHTML markup
   would produce spurious blank lines under pre-wrap. */
    .body__mess:not(.mess__chat):not(.mess--chat):not(.mess--system) {
        white-space: revert; /*pre-wrap;*/
    }

.mess--user {
    text-align: right;
}

.mess--chat,
.mess--system {
    text-align: left;
}

.mess--system {
    opacity: 0.7;
}

.mess--user ~ .eunChat-message-info {
    display: flex;
    justify-content: flex-end;
    margin-right: 4px;
}

.mess--chat ~ .eunChat-message-info {
    display: flex;
    justify-content: flex-start;
    margin-left: 4px;
}

.default-user {
    background-color: var(--chatcomponent-user-mess-bg);
    color: var(--chatcomponent-user-mess-text);
}

.default-chat {
    background-color: var(--chatcomponent-chat-mess-bg);
    border: 1px solid var(--brand-100, #F4EBFF);
    color: var(--chatcomponent-chat-mess-text);
    line-height: 16px;

    & b {
        color: var(--gray-800, #252b37);
        line-height: 20px;
    }

    & a {
        color: #0d6efd;
        text-decoration: underline;
    }
}

.minimal-user {
    background: var(--chatcomponent-user-mess-bg);
    border: 1px solid var(--chatcomponent-user-mess-bg);
    color: var(--chatcomponent-user-mess-text);
    line-height: 16px;

    & b {
        color: var(--gray-800, #252b37);
        line-height: 20px;
    }

    & a {
        color: #0d6efd;
        text-decoration: underline;
    }
}

.minimal-chat {
    background: var(--gray-50, #fafafa);
    border: 1px solid var(--chatcomponent-chatV2-mess-bg);
    color: var(--chatcomponent-chat-mess-text);
    line-height: 16px;

    & b {
        color: var(--gray-800, #252b37);
        line-height: 20px;
    }

    & a {
        color: #0d6efd;
        text-decoration: underline;
    }
}

.eunChat-input {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    padding-right: 68px;
    background: var(--gray-50, #fafafa);
    border: 1px solid var(--gray-300, #d5d7da);
    border-radius: 16px;
    /*background: #f9f9f9;*/
    max-width: 768px;
    width: calc(100% - 28px);
}

    .eunChat-input textarea,
    .eunChat-input .eTextBox {
        flex: 1;
        height: 36px;
        padding: 10px;
        border-radius: 16px;
        background: var(--gray-50, #fafafa);
        border: 0px solid var(--gray-300, #d5d7da);
        resize: none;
        font-size: calc(16px * var(--eun-chat-font-scale));
    }

        .eunChat-input textarea:focus-visible {
            outline: 1px solid var(--brand-300);
        }

    .eunChat-input .eTextBox {
        box-shadow: none;
    }

    .eunChat-input .RadInputHovered,
    .eunChat-input .RadInputFocused,
    .eunChat-input .RadInputFocused .riTextBox {
        background: transparent;
        box-shadow: none !important;
        border-color: none !important;
    }

.eunChat-input {
    & .eTextBox .messenger-textarea {
        padding: 0;
        background: transparent;
        border: none;
    }

    &[chatDiscussion] {
        width: auto;
    }

        &[chatDiscussion] .messenger-textarea.RadInputMultiline.eTextBox {
            width: 100vw !important;
        }
}

.eunChat-input {
    position: relative;
    width: 100%;
    display: flex;

    @supports (width: -webkit-fill-available) {
        & {
            width: -webkit-fill-available;
        }
    }

    @supports (width: -moz-available) {
        & {
            width: -moz-available;
        }
    }

    & .eunChat-panel__panel-feld {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    & .eunChat-panel {
        position: absolute !important;
        right: 4px;
        display: flex;
        justify-content: space-between;
    }

    & .eunCht-panel__attach {
        width: 100%;
        overflow: auto;
    }

    & .eunCht-panel__btn {
        display: flex;
        flex-wrap: wrap;
        justify-content: end;
        gap: 4px;
        align-items: center;
        width: 60px;
    }

    & .send-btn,
    & .attach-btn,
    & .quick-notes-btn,
    & .stt-btn {
        width: 28px !important;
        min-width: 28px;
        height: 28px !important;
        background-color: var(--chatcomponent-send-mess);
        color: var(--text-on-brand, #ffffff);
        border: none;
        cursor: pointer;
        border-radius: 50% !important;
        display: flex !important;
        justify-content: center;
        align-items: center;

        &.RadButton[chatDiscussion] {
            background: var(--color_eUnify, var(--brand-600, #7F56D9));
            min-width: 28px !important;
            border-radius: 50% !important;
            padding: 4px 2px !important;
        }

        & svg {
            fill: var(--text-on-brand, #ffffff);
        }

        &[hidden] {
            display: none !important;
        }
    }

    & .eunChat-files {
        display: none;
        padding: 0;
        gap: 8px;
        white-space: nowrap;
    }

    & .eunChat-file {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 2px;
        background: var(--chatcomponent-file-bg);
        border-radius: 4px;
    }

    & .eunChat-mentions {
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(100% + 6px);
        width: fit-content;
        background: var(--white, #ffffff);
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
        max-height: 220px;
        overflow-y: auto;
        z-index: 1000;
    }

    & .eunChat-mention-item {
        padding: 6px 10px;
        cursor: pointer;
    }

        & .eunChat-mention-item:hover {
            background: var(--gray-200, #e9eaeb);
        }

    & .eunChat-editor {
        flex: 1;
        box-sizing: border-box;
        background: var(--white, #ffffff);
        border: 1px solid rgba(0,0,0,.2);
        border-radius: 10px;
        line-height: 1.3;
        padding: 8px 12px;
        font: inherit;
        font-size: calc(16px * var(--eun-chat-font-scale));
        min-height: 60px;
        max-height: 200px;
        overflow-y: auto;
        resize: none;
        outline: none;
        white-space: pre-wrap;
        word-break: break-word;
        transition: min-height .15s ease;
        transform: translateZ(0);
    }

        & .eunChat-editor:focus {
            border-color: #0b5cff;
            box-shadow: 0 0 0 2px rgba(11,92,255,.15);
        }

        & .eunChat-editor:empty:before {
            content: attr(data-placeholder);
            color: var(--gray-400, #6B6B6B);
            opacity: .7;
            pointer-events: none;
        }
}

.eunChat-mention__chip {
    font-weight: 600;
    font-size: 16px;
}

.mess--user .eunChat-mention__chip {
    color: var(--text-on-brand, #ffffff);
}

.mess--chat .eunChat-mention__chip {
    color: var(--chatcomponent-mention-color);
}

.eunChat-editor .eunChat-mention__chip {
    color: var(--chatcomponent-mention-color);
}

.send-btn:hover,
.attach-btn:hover,
.quick-notes-btn:hover,
.stt-btn:hover {
    background-color: hsl(from var(--chatcomponent-send-mess) h s l / 0.5);
}

.loading {
    font-style: italic;
    color: var(--gray-400, #6B6B6B);
}

    .loading span {
        animation: dots 1.5s infinite;

        &:nth-child(1) {
            animation-delay: 0s;
        }

        &:nth-child(2) {
            animation-delay: 0.3s;
        }

        &:nth-child(3) {
            animation-delay: 0.6s;
        }
    }

.eunChat__block-sender {
    display: flex;
    flex-direction: column;
}

.eunChat-upload {
    padding: 0 10px;
}

.chat__wrapper {
    height: var(--chatWrapperH, calc(70vh - 80px));
}

.section-mess__block {
    display: flex;
    align-items: flex-end;
    gap: 12px;

    &.section-mess__user {
        justify-content: flex-end;
    }

    &.section-mess__chat {
        justify-content: flex-start;
    }

    &.section-mess__header {
        justify-content: flex-start;
        padding: 8px;
        border-radius: 12px;
        border: 1px solid var(--chatcomponent-user-mess-bg);
    }
}

.section-mess__chat .eunChat-authorRow {
    background: var(--gray-50, #fafafa);
    border: 1px solid var(--chatcomponent-chatV2-mess-bg);
    color: var(--gray-800, #252b37);
}

.section-mess__user .eunChat-authorRow {
    background: #0d6efd3d;
    border: 1px solid var(--chatcomponent-chatV2-mess-bg);
    color: #0e00eb;
}

/*.section-mess__chat {
    flex-direction: row-reverse;
}*/

.eunChat-message-body {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.minimal-user .eunChat-message-body {
    flex-direction: row-reverse;
}

.messenger-message-right {
    margin-left: auto;
}

.messenger-message-left {
    margin-right: auto;
}

.eunChat-attachments {
}

.chat__wrapper {
    height: var(--eunChatWrapperH, calc(100vh - 300px));
    min-height: 280px;
    width: 100%;
}

/* Responsive thumbnail row — thumbs share available width, no scrollbar ever */
.eunChat-gallery {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    /* no overflow/scroll — flex-shrink on children prevents any overflow */
}

.eunChat-gallery__thumb {
    flex: 1 1 0; /* share row width equally; may shrink below intrinsic size */
    min-width: 0; /* allow shrinking past intrinsic size — prevents overflow */
    max-width: 88px; /* don't stretch huge on wide bubbles */
    aspect-ratio: 1; /* stay square; height tracks width responsively */
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* Single-image: constrain to a fixed comfortable size instead of stretching full width */
.eunChat-gallery--single .eunChat-gallery__thumb {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
}

/* "+N" standalone box — separate flex item after the thumbs, NOT overlaid on any image */
.eunChat-gallery__more {
    flex: 0 0 auto;
    align-self: center;
    min-width: 44px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.eunChat-gallery__moreCount {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.eunChat-inline-image {
    cursor: pointer;
}

.eunChat-filesList {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.eunChat-fileItem {
    border: 1px solid var(--color-bg-attch);
    border-radius: 8px;
    background: var(--color-2);
    display: flex;
    gap: 6px;
    width: fit-content;
    font-size: 13px;
    text-decoration: none !important;

    & .eunChat-fileIcon {
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
        width: 34px;
        height: 34px;
        background: var(--gray-700, #414651);
        color: var(--chatcomponent-file-bg);
    }

    & .eunChat-fileName {
        max-width: 150px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding: 2px 4px;
    }
}

.eunChat-imageOverlay {
    position: absolute;
    inset: 0;
    z-index: 1000;
}

.eunChat-imageOverlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(204, 204, 204, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.eunChat-imageOverlay__content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eunChat-imageOverlay img {
    max-width: 90%;
    max-height: 90%;
}

.eunChat-imageOverlay .close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-family: 'Font Awesome 6 Duotone';
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--chatcomponent-user-mess-bg);
    color: var(--text-on-brand, #ffffff);
    cursor: pointer;

    &:hover {
        opacity: 0.6;
    }
}

/* Overlay prev/next arrows — round, theme color, matching .close button */
.eunChat-imageOverlay__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--chatcomponent-user-mess-bg);
    color: #fff;
    cursor: pointer;
    z-index: 1;

    & svg {
        width: 18px;
        height: 18px;
        stroke: #fff;
    }

    &:hover {
        opacity: 0.6;
    }
}

.eunChat-imageOverlay__nav--prev {
    left: 16px;
}

.eunChat-imageOverlay__nav--next {
    right: 16px;
}

.eunChat-authorRow {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    color: var(--text-on-brand, #ffffff);
    margin-bottom: 4px;
}

    .eunChat-authorRow:not(:has( img)) {
        background: var(--chatcomponent-user-mess-bg);
    }

.mess--user .eunChat-authorRow {
    text-align: right;
}

.mess--chat .eunChat-authorRow {
    text-align: left;
}

.eunChat-author {
    font-size: 12px;
    font-weight: 600;

    & img {
        height: 32px;
        width: 32px;
        border-radius: 50%;
    }
}

    .eunChat-author:not(:has( > img)) {
        opacity: .7;
    }

.eunChat-text {
    text-align: start;
    word-break: break-word;
    white-space: pre-wrap;
    width: 100%;
    align-self: flex-start;
}

.eunChat-message-info {
    display: flex;
    gap: 4px;
}

.mess--user .eunChat-message-info {
    justify-content: flex-end;
}

.eunChat-message-edited,
.eunChat-message-date {
    margin-top: 8px;
    font-size: 10px;
    opacity: 0.6;
}

.quick-notes-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.quick-notes-dropdown {
    position: absolute;
    bottom: 48px;
    right: 8px;
    background: var(--white, #ffffff);
    border: 1px solid var(--gray-300, #d5d7da);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 20;
}

.quick-note-item {
    padding: 6px 10px;
    cursor: pointer;
}

    .quick-note-item:hover {
        background: var(--gray-100, #f5f5f5);
    }

.eunChat-date__top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 12px 0;
    opacity: 0.6;

    & .eunChat-date__line {
        width: 100%;
    }

    & .eunChat-date {
        white-space: nowrap;
        margin: 0 8px;
    }
}

/* ── Font-size accessibility toolbar (A A A) ── */
.eunChat-fontsize {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    box-sizing: border-box;
    background: transparent;
}

.eunChat-fontsize__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--gray-500, #667085);
    cursor: pointer;
    line-height: 1;
    /* Each button's A glyph has its own fixed size — not scaled with font-scale. */
}

    .eunChat-fontsize__btn[data-level="small"] span {
        font-size: 12px;
    }

    .eunChat-fontsize__btn[data-level="normal"] span {
        font-size: 15px;
    }

    .eunChat-fontsize__btn[data-level="large"] span {
        font-size: 19px;
    }

    .eunChat-fontsize__btn:hover {
        background: rgba(255, 255, 255, 0.95);
        border-color: hsl(from var(--color-1) h s l / 0.35);
        color: var(--color-1);
    }

    .eunChat-fontsize__btn:focus-visible {
        outline: 2px solid var(--color-1);
        outline-offset: 1px;
    }

    .eunChat-fontsize__btn[aria-pressed="true"] {
        background: hsl(from var(--color-1) h s l / 0.12);
        border-color: var(--color-1);
        color: var(--color-1);
    }

@keyframes dots {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}
