/* Default expert*/
.chat-wrapper {
    --chatbot-body-background: #F5F5F5;
    --chatbot-wrapper-background: #FFFFFF;
    --chatbot-banner-background: #FFFFFF;
    --chatbot-main-background:#F5F5F5;
    --chatbot-messages-background: #F5F5F5;
    --chatbot-message-bot-color: #212529;
    --chatbot-waiting-phrase-color: #6C757D;
    --chatbot-input-box-color: #6C757D;
    --chatbot-input-box-background: #FFF;
    --chatbot-input-box-boxshadow: rgba(144, 144, 144, 0.10);
    --chatbot-send-button-background: #6C757D;
    --chatbot-initial-question-color: #333;
    --expert-input-chatbot-voice-record-background: #FFF;
    --expert-input-chatbot-send-button-background: #6C757D;
    --chat-history-background: #F5F5F5;
    --chat-history-header-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-history-header-background: #FFF;
    --chat-history-title-color: #333;
    --chat-history-content-background: #EAEEF0;
    --chat-history-content-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-history-list-background: #EAEEF0;
    --chat-history-item-borderbottom: #DEDEDE;
    --chat-history-item-color: #333;
    --chat-history-item-active-bordercolor: #B12431;
    --chat-history-newchat-background: #B12431;
    --chat-history-newchat-color: #EAEEF0;
    --chat-mobile-bar: #F5F5F5;
    --chat-filters-label-color: #333;
    --chat-filter-border: #6C757D;
    --chat-filter-background: #FFF;
    --chat-filter-color: #6C757D;
    --chat-history-overlay-background: rgba(0,0,0,0.35);
    --chat-mobile-bar-background: #F5F5F5;
    --chat-mobile-toggle-color: #909090;
    --media-chat-history-header-background: #FFF;
    --media-chat-history-header-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-banner-boxshadow: #33333340;
    --message-user-color: #000;
    --message-user-borderright: #B12431;
    --message-user-background: #FFF;
    --message-user-boxshadow: rgba(144, 144, 144, 0.10);
    --expert-input-chatbot-input-box-background: #FFF;
    --chat-history-border-color: #EAEEF0;
}

.chat-wrapper[data-brand="ariston"] {
    --chatbot-body-background: #F5F5F5;
    --chatbot-wrapper-background: #FFFFFF;
    --chatbot-banner-background: #FFFFFF;
    --chatbot-main-background: #F7F7F8;
    --chatbot-messages-background: #F5F5F5;
    --chatbot-message-bot-color: #212529;
    --chatbot-waiting-phrase-color: #6C757D;
    --chatbot-input-box-color: #6C757D;
    --chatbot-input-box-background: #FFF;
    --chatbot-input-box-boxshadow: rgba(144, 144, 144, 0.10);
    --chatbot-send-button-background: #6C757D;
    --chatbot-initial-question-color: #333;
    --expert-input-chatbot-voice-record-background: #FFF;
    --expert-input-chatbot-send-button-background: #B12431;
    --chat-history-background: #FFFFFF;
    --chat-history-header-boxshadow: rgba(51, 51, 51, 0.08);
    --chat-history-header-background: #FFFFFF;
    --chat-history-title-color: #333;
    --chat-history-content-background: #FFFFFF;
    --chat-history-content-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-history-list-background: #FFFFFF;
    --chat-history-item-borderbottom: transparent;
    --chat-history-item-color: #333;
    --chat-history-item-active-bordercolor: #B12431;
    --chat-history-item-active-background: #F7F7F8;
    --chat-history-newchat-background: #B12431;
    --chat-history-newchat-color: #FFFFFF;
    --chat-mobile-bar: #F5F5F5;
    --chat-filters-label-color: #333;
    --chat-filter-border: #D0D5DF;
    --chat-filter-background: rgba(168, 173, 177, 0.15);
    --chat-filter-color: #333;
    --chat-history-overlay-background: rgba(0,0,0,0.35);
    --chat-mobile-bar-background: #F5F5F5;
    --chat-mobile-toggle-color: #909090;
    --media-chat-history-header-background: #FFFFFF;
    --media-chat-history-header-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-banner-boxshadow: #33333340;
    --message-user-color: #000;
    --message-user-borderright: #B12431;
    --message-user-background: #FFF;
    --message-user-boxshadow: rgba(144, 144, 144, 0.10);
    --expert-input-chatbot-input-box-background: #FFF;
}

.chat-wrapper[data-brand="wolf"] {
    --chatbot-body-background: #ECEFF4;
    --chatbot-wrapper-background: #FFFFFF;
    --chatbot-banner-background: #0B1320;
    --chatbot-main-background: #ECEFF4;
    --chatbot-messages-background: #ECEFF4;
    --chatbot-message-bot-color: #101620;
    --chatbot-waiting-phrase-color: #6C757D;
    --chatbot-input-box-color: #6C757D;
    --chatbot-input-box-background: #FFF;
    --chatbot-input-box-boxshadow: rgba(33, 45, 64, 0.10);
    --chatbot-send-button-background: #6C757D;
    --chatbot-initial-question-color: #101620;
    --expert-input-chatbot-voice-record-background: #FFF;
    --expert-input-chatbot-send-button-background: #212D40;
    --chat-history-background: #FFFFFF;
    --chat-history-header-boxshadow: rgba(33, 45, 64, 0.08);
    --chat-history-header-background: #FFFFFF;
    --chat-history-title-color: #101620;
    --chat-history-content-background: #FFFFFF;
    --chat-history-content-boxshadow: rgba(33, 45, 64, 0.10);
    --chat-history-list-background: #FFFFFF;
    --chat-history-item-borderbottom: transparent;
    --chat-history-item-color: #212D40;
    --chat-history-item-active-bordercolor: #212D40;
    --chat-history-item-active-background: #DCE3EF;
    --chat-history-item-active-color: #101620;
    --chat-history-newchat-background: #212D40;
    --chat-history-newchat-color: #FFFFFF;
    --chat-mobile-bar: #ECEFF4;
    --chat-filters-label-color: #101620;
    --chat-filter-border: #D0D5DF;
    --chat-filter-background: #FFF;
    --chat-filter-color: #101620;
    --chat-history-overlay-background: rgba(11, 19, 32, 0.45);
    --chat-mobile-bar-background: #ECEFF4;
    --chat-mobile-toggle-color: #6C757D;
    --media-chat-history-header-background: #FFFFFF;
    --media-chat-history-header-boxshadow: rgba(33, 45, 64, 0.10);
    --chat-banner-boxshadow: rgba(11, 19, 32, 0.40);
    --message-user-color: #101620;
    --message-user-borderright: #212D40;
    --message-user-background: #FFFFFF;
    --message-user-boxshadow: rgba(33, 45, 64, 0.10);
    --expert-input-chatbot-input-box-background: #FFF;
}

.chat-wrapper[data-brand="elco"] {
    --chatbot-body-background: #F5F5F5;
    --chatbot-wrapper-background: #FFFFFF;
    --chatbot-banner-background: #FFFFFF;
    --chatbot-main-background:#F5F5F5;
    --chatbot-messages-background: #F5F5F5;
    --chatbot-message-bot-color: #212529;
    --chatbot-waiting-phrase-color: #6C757D;
    --chatbot-input-box-color: #6C757D;
    --chatbot-input-box-background: #FFF;
    --chatbot-input-box-boxshadow: rgba(144, 144, 144, 0.10);
    --chatbot-send-button-background: #6C757D;
    --chatbot-initial-question-color: #333;
    --expert-input-chatbot-voice-record-background: #FFF;
    --expert-input-chatbot-send-button-background: #BB3317;
    --chat-history-background: #FFFFFF;
    --chat-history-header-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-history-header-background: #FFFFFF;
    --chat-history-title-color: #333;
    --chat-history-content-background: #FFFFFF;
    --chat-history-content-boxshadow: rgba(51, 51, 51, 0.10);
    --chat-history-list-background: #FFFFFF;
    --chat-history-item-borderbottom: #DEDEDE;
    --chat-history-item-color: #333;
    --chat-history-item-active-bordercolor: #BB3317;
    --chat-history-item-active-background: #F5F5F5;
    --chat-history-newchat-background: #BB3317;
    --chat-history-newchat-color: #FFFFFF;
    --chat-mobile-bar: #F5F5F5;
    --chat-filters-label-color: #333;
    --chat-filter-border: #6C757D;
    --chat-filter-background: rgba(168, 173, 177, 0.15);
    --chat-filter-color: #6C757D;
    --chat-history-overlay-background: rgba(0,0,0,0.35);
    --chat-mobile-bar-background: #F5F5F5;
    --chat-mobile-toggle-color: #909090;
    --media-chat-history-header-background: #FFF;
    --media-chat-history-header-boxshadow: rgba(168, 173, 177, 0.50);
    --chat-banner-boxshadow: #33333340;
    --message-user-color: #000;
    --message-user-borderright: #BB3317;
    --message-user-background: #FFF;
    --message-user-boxshadow: rgba(144, 144, 144, 0.10);
    --expert-input-chatbot-input-box-background: #FFF;
}

html:has(.chat-wrapper),
body:has(.chat-wrapper) {
    background: #F5F5F5;
}

html:has(.chat-wrapper[data-brand="ariston"]),
body:has(.chat-wrapper[data-brand="ariston"]) {
    background: #F7F7F8;
}

html:has(.chat-wrapper[data-brand="wolf"]),
body:has(.chat-wrapper[data-brand="wolf"]) {
    background: #ECEFF4;
}

html:has(.chat-wrapper[data-brand="elco"]),
body:has(.chat-wrapper[data-brand="elco"]) {
    background: #F5F5F5;
}

body,html {
    margin: 0;
    font-family: "Proxima Nova", sans-serif;
}

/* --- MOBILE BACK BUTTON --- */
.chat-mobile-back {
    display: none;
}

/* AEM Edit Mode */
html.aem-AuthorLayer-Edit .chat-wrapper {
    width: 90% !important;
    max-width: 1358px !important;
    height: 850px !important;
    margin: 20px auto !important;
    overflow: hidden !important;
}

html.aem-AuthorLayer-Edit .chatbot-container,
html.aem-AuthorLayer-Edit .chatbot-messages-wrapper,
cq-Overlay--component {
    height: 850px !important;
}

html.aem-AuthorLayer-Edit .chatbot-messages {
    overflow-y: auto !important;
}

/* ============================================
   CHAT WRAPPER
   ============================================ */

.chat-wrapper {
    width: 100%;
    max-width: 1358px;
    height: calc(100vh - 40px);
    background: var(--chatbot-wrapper-background);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin: 20px auto;
    overflow: hidden;
}

.chat-wrapper.has-history {
    background: var(--chatbot-main-background);
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* ============================================
   BANNER
   ============================================ */

.chat-banner {
    width: 100%;
    height: 80px;
    background: var(--chatbot-banner-background);
    box-shadow: 0px 0px 10px 0px var(--chat-banner-boxshadow);
    display: flex;
    align-items: center;
    padding: 20px 115px;
    gap: 10px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.chat-banner img {
    height: 40px;
    object-fit: contain;
    max-width: 100%;
}

/* ============================================
   MAIN CHAT
   ============================================ */

.chat-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--chatbot-main-background);
}

.chat-wrapper.has-history .chat-main {
    padding: 0 20px 0 20px;
}

/* ============================================
   CHATBOT
   ============================================ */

.chatbot-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: center;
    width: 100%;
    max-width: 1128px;
    min-height: 0;
    overflow: hidden;
}

.chatbot-messages-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    min-height: 0;
}

.chatbot-messages {
    background: var(--chatbot-messages-background);
    flex: 1;
    overflow-y: auto;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 0;
}

.chatbot-messages.expert-mode {
    display: flex;
}

.chat-wrapper.has-history .chatbot-messages {
    padding-bottom: 20px !important;
}

/* ============================================
   MESSAGES
   ============================================ */

.message.user {
    display: inline-block;
    max-width: 70%;
    padding: 16px;
    margin: 6px 0;
    font-size: 16px;
    color: var(--message-user-color);
    align-self: flex-end;
    border-radius: 2px 0 0 2px;
    border-right: 4px solid var(--message-user-borderright);
    background: var(--message-user-background);
    box-shadow: 0 0 28px 0 var(--message-user-boxshadow);
}

.message.bot {
    display: inline-block;
    max-width: 80%;
    padding: 16px;
    margin: 6px 0;
    align-self: flex-start;
    color: var(--chatbot-message-bot-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.chatbot-waiting-phrase {
    margin-bottom: 4px;
    font-style: italic;
    text-align: left;
    padding-left: 8px;
    align-self: flex-start;
    max-width: 80%;
    opacity: 0.9;
    color: var(--chatbot-waiting-phrase-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px; /* 142.857% */
}

.chat-wrapper[data-brand="elco"] .chatbot-waiting-phrase {
    padding-left: 0;
}

/* ============================================
   INPUT AREA
   ============================================ */

.chatbot-input {
    display: flex;
    gap: 8px;
    box-sizing: border-box;
    margin: 20px 0 0 0;
    flex-shrink: 0;
    height: auto;
    min-height: 65px;
    max-height: 50vh;
    align-items: flex-end;
}

.chatbot-left-group {
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
    height: auto;
    align-items: flex-end;
}

.chatbot-input-box {
    flex: 1 1 auto;
    display: flex;
    box-sizing: border-box;
    min-width: 0;
    color: var(--chatbot-input-box-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    border-radius: 2px;
    background: var(--chatbot-input-box-background);
    box-shadow: 0 0 28px 0 var(--chatbot-input-box-boxshadow);
    height: auto;
    min-height: 65px;
    max-height: 50vh;
    align-items: flex-end;
    padding: 12px 12px;
    gap: 8px;
    overflow: hidden;
}

.chatbot-input-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    height: 100%;
}

.chatbot-voice-record {
    margin: 8px 8px;
    padding: 8px 0;
    gap: 16px;
    align-self: end;
}

.chatbot-voice-record img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    display: block;
}

.chatbot-voice-record:active img,
.chatbot-voice-record img:active {
    transform: none !important;
    scale: 1 !important;
}

.chatbot-voice-record.is-recording img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
}

.chatbot-send-button {
    display: flex;
    width: 41px;
    height: 41px;
    padding: 8px;
    align-items: center;
    gap: 10px;
    border-radius: 2px;
    background: var(--chatbot-send-button-background);
    margin: 8px 8px;
}

.chatbot-send-button img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    display: block;
}

.chatbot-initial-question {
    margin: 20px 0;
    font-weight: 700;
    align-self: center;
    color: var(--chatbot-initial-question-color);
    text-align: center;
    font-family: "Proxima Nova", sans-serif;
    font-size: 24px;
    font-style: normal;
    line-height: normal;
}

.chatbot-enabled input,
.chatbot-enabled .chatbot-send-button,
.chatbot-enabled .chatbot-voice-record {
    opacity: 1;
    pointer-events: auto;
}

.chatbot-disabled input,
.chatbot-disabled .chatbot-send-button,
.chatbot-disabled .chatbot-voice-record {
    opacity: 0.6;
    pointer-events: none;
}

/* --- INPUT EXPERT --- */

.expert-input .chatbot-input {
    margin-bottom: unset;
    margin-top: 20px;
}

.expert-input .chatbot-input-box {
    flex: 1;
    display: flex;
    padding: 0 12px;
    background: var(--expert-input-chatbot-input-box-background);
    box-sizing: border-box;
    gap: 16px;
    height: auto !important;
    min-height: 64px;
    max-height: 50vh;
    align-items: flex-end !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    border-radius: 8px;
    border: 1px solid #EAEEF0;
}

.expert-input .chatbot-input-box input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
}

.expert-input .chatbot-voice-record {
    display: flex;
    padding: 8px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 2px;
    background: var(--expert-input-chatbot-voice-record-background);
    flex-shrink: 0;
    height: 41px !important;
    align-self: flex-end;
    margin: 8px 8px;
}

.expert-input .chatbot-voice-record img {
    width: 100%;
    height: 100%;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
}

.expert-input .chatbot-send-button {
    display: flex;
    padding: 8px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 2px;
    background: var(--expert-input-chatbot-send-button-background);
    flex-shrink: 0;
    height: 41px !important;
    align-self: flex-end;
    margin-bottom: 16px;
}

.expert-input .chatbot-send-button img {
    width: 100%;
    height: 100%;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
}

.chatbot-send-button,
.chatbot-send-button:focus,
.chatbot-send-button:active {
    outline: none !important;
    border: none !important;
}

.chatbot-input-box textarea,
.expert-input .chatbot-input-box textarea {
    flex: 1 1 auto;
    align-self: center;
    border: none;
    background: transparent;
    outline: none;
    resize: none;
    width: 100%;
    min-width: 0;
    min-height: 41px;
    overflow-y: auto;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    line-height: 24px;
    padding: 8px 0;
    margin: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    display: block;
    max-height: calc(50vh - 24px);
    max-width: 100%;
}

.chatbot-enabled textarea {
    opacity: 1;
    pointer-events: auto;
    align-content: center;
}
.chatbot-disabled textarea {
    opacity: 0.6;
    pointer-events: none;
    align-content: center;
}

/* ============================================
   SIDEBAR HISTORY
   ============================================ */

.chat-history {
    display: none;
    flex: 0 0 327px;
    width: 327px;
    background: var(--chat-history-background);
    box-sizing: border-box;
    overflow: hidden;
    flex-direction: column;
    border-radius: 8px;
    border: 1px solid #EAEEF0;
}

.chat-wrapper.has-history .chat-history {
    display: flex;
}


.chat-history-header {
    display: flex;
    padding: 24px 16px;
    align-items: center;
    align-self: stretch;
    background: var(--chat-history-header-background);
    border-radius: 2px;
}

.chat-history-title {
    margin: 0;
    font-weight: 600;
    color: var(--chat-history-title-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-style: normal;
    line-height: normal;
}

.chat-history-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 2px;
    background: var(--chat-history-content-background);
    min-width: 0;
    overflow: hidden;
    border-top: 1px solid #EAEEF0;
}

.chat-history-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 2px;
    background: var(--chat-history-list-background);
    min-width: 0;
    overflow: hidden;
}

.chat-history-item {
    all: unset;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px 10px 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: var(--chat-history-item-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history-item:hover {
    background: transparent !important;
}

.chat-history-item.active {
    border-left: 4px solid var(--chat-history-item-active-bordercolor);
    background: var(--chat-history-item-active-background);
}

.chat-history-newchat {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px 0;
    align-self: stretch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 41px;
    padding: 14px 12px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 2px;
    background: var(--chat-history-newchat-background);
    color: var(--chat-history-newchat-color);
    text-align: center;
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border-bottom-width: unset;
    border-color: transparent;
}

.expert-mode .chat-history-list {
    display: flex;
    flex-direction: column;
}

.expert-mode .chat-history-newchat {
    margin-top: auto;
}

.chat-mobile-bar {
    background: var(--chat-mobile-bar);
    display: none;
}

.chat-history-overlay {
    display: none;
}

/* ============================================
   FILTERS
   ============================================ */

.chat-filters {
    display: flex;
    align-items: center;
    margin: 12px 0 12px;
}

.chat-filters-label {
    color: var(--chat-filters-label-color);
    font-family: "Proxima Nova", Arial, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.chat-filters-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 16px;
}

.chat-filter {
    display: flex;
    padding: 12px 8px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--chat-filter-border);
    background: var(--chat-filter-background);
    color: var(--chat-filter-color);
    font-family: "Proxima Nova", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 0; /* 0% */
    letter-spacing: 0.896px;
    text-transform: uppercase;
    border-radius: 9999px;
    border: 1px solid #EAEEF0;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {

    body {
        display: block;
        min-height: 100vh;
        margin: 0;
    }

    .chat-wrapper {
        width: 100%;
        height: 100vh;
        margin: 0;
        flex-direction: column;
    }

    .chat-banner {
        height: 64px;
        padding: 12px 16px;
        margin-bottom: 20px;
    }

    .chat-history-header, .chat-history-content {
        border: 1px solid #EAEEF0;
    }

    /* --- Sidebar mobile --- */
    .chat-wrapper.has-history .chat-history {
        flex-direction: column;
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        min-height: 100vh;
        z-index: 9999;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        width: 327px;
        max-width: 90vw;
        padding: 0 20px;
    }

    .chat-wrapper.has-history .chat-history-content {
        margin-bottom: 44px;
    }

    .chat-wrapper.has-history.history-open .chat-history {
        transform: translateX(0);
    }

    .chat-wrapper.has-history.history-open .chat-mobile-back {
        display: flex;
        margin: 16px 8px;
        align-self: flex-start;
    }

    .chat-history-overlay {
        position: fixed;
        inset: 0;
        background: var(--chat-history-overlay-background);
        z-index: 9998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .chat-wrapper.has-history .chat-main {
        padding: 40px 20px 40px 20px;
    }

    .chat-wrapper.has-history.history-open .chat-history-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .chat-mobile-bar {
        background: var(--chat-mobile-bar-background);
        display: flex;
        margin-bottom: 10px;
    }

    .chat-mobile-toggle,
    .chat-mobile-back {
        display: flex;
        padding: 4px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        border-radius: 9999px;
        border: 1px solid currentColor;
        background: transparent;
        cursor: pointer;
    }

    .chat-mobile-toggle {
        color: var(--chat-mobile-toggle-color);
        font-family: "Proxima Nova", sans-serif;
        font-size: 12px;
        font-style: normal;
        font-weight: 600;
        line-height: normal;
        letter-spacing: 0.24px;
        text-transform: uppercase;
    }

    .expert-mode .chat-history-list {
        padding-bottom: 44px;
        box-sizing: border-box;
    }
}