/* Shared MGS AI chat skin for every dashboard with chat enabled. */
#chat-icon,
#close-chat-icon {
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #f4fbff;
    background: linear-gradient(135deg, #293a55, #1b2333) padding-box,
                linear-gradient(135deg, #5273a2, #8c6caf, #d18455) border-box;
    box-shadow: 0 12px 28px rgba(3, 10, 23, .35);
    font: 700 12px/1 Inter, Arial, sans-serif;
    letter-spacing: .01em;
    text-align: center;
    white-space: nowrap;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

#chat-icon { display: inline-flex; }
#close-chat-icon { display: none; }

.portal-chat-trigger__content {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#chat-icon:hover,
#close-chat-icon:hover {
    background: linear-gradient(135deg, #354a69, #253148) padding-box,
                linear-gradient(135deg, #76a6d0, #a881c4, #e6a35e) border-box;
    box-shadow: 0 14px 32px rgba(3, 10, 23, .45);
    transform: translateY(-2px);
}

#chat-icon:active,
#close-chat-icon:active {
    bottom: 24px;
    transform: translateY(0);
}

#chat-icon:focus-visible,
#close-chat-icon:focus-visible,
#chat-window button:focus-visible,
#chat-window select:focus-visible,
#chat-window textarea:focus-visible,
#histo_chat button:focus-visible {
    outline: 2px solid #e6a35e !important;
    outline-offset: 3px;
}

.portal-chat-trigger__symbol {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid #d18455;
    border-radius: 6px;
    color: #ffcc8a;
    font: 400 23px/1 Arial, sans-serif;
}

#chat-icon .portal-chat-trigger__symbol--ai {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border: 0;
}

#chat-icon .portal-chat-trigger__symbol--ai svg { display: none; }

#chat-icon .portal-chat-trigger__symbol--ai img {
    display: block;
    width: 32px;
    height: 36px;
    object-fit: contain;
}

#phrase-accroche { display: none; }

#chat-window,
#chat-window * {
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif !important;
}

#chat-window {
    right: 24px;
    bottom: 88px;
    width: min(440px, calc(100vw - 32px));
    height: min(650px, calc(100dvh - 116px));
    border: 1px solid #64799b;
    border-radius: 18px;
    color: #f4fbff;
    background: radial-gradient(circle at 25% 10%, rgba(64, 105, 151, .2), transparent 42%),
                linear-gradient(150deg, #212f45, #171d2a 70%);
    box-shadow: 0 26px 68px rgba(3, 9, 21, .6), 0 0 0 4px rgba(57, 81, 117, .16);
}

#chat-header {
    flex: 0 0 78px;
    height: 78px;
    border-bottom: 1px solid rgba(143, 166, 207, .3);
    border-radius: 0;
    background: linear-gradient(120deg, #2d4568, #1e2b40 58%, #192434);
}

#chat-header .portal-chat-brand-bars {
    position: absolute;
    top: 0;
    right: 112px;
    width: 43px;
    height: 54px;
    object-fit: contain;
    pointer-events: none;
}

#chatbot-icon {
    top: 21px;
    left: 18px;
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 1px solid rgba(142, 169, 209, .6);
    border-radius: 9px;
    background: rgba(10, 23, 42, .35);
}

#chat-title {
    top: 17px;
    left: 62px;
    font-size: 15px;
    letter-spacing: .01em;
}

#chat-status-container { top: 43px; left: 62px; right: 80px; }
#chat-status { color: #bbcbdf; font-size: 10px; line-height: 1.3; }

#chat-openwide {
    top: 28px;
    right: 61px;
    width: 18px;
    stroke: #dce8f6;
}

#chat-close {
    position: absolute;
    top: 19px;
    right: 16px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 8px;
    place-items: center;
    border: 1px solid rgba(190, 207, 231, .45);
    border-radius: 9px;
    background: rgba(14, 27, 45, .4);
    cursor: pointer;
}

#chat-close:hover { background: rgba(87, 118, 155, .5); }
#chat-close svg { width: 16px; height: 16px; stroke: #eff7ff; }

#sub_header {
    min-height: 46px;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(143, 166, 207, .2);
    background: rgba(30, 45, 67, .8);
}

#sub_header select {
    color: #e6f1ff;
    color-scheme: dark;
    background: #283954;
    border: 1px solid rgba(150, 176, 210, .35);
    border-radius: 7px;
    cursor: pointer;
}

#chat-external-context { color: #e6f1ff; background: #283954; border-color: rgba(150,176,210,.35); margin: 0; }
#chat-external-context input { accent-color: #91badb; }
#chat-export-pdf { color: #e6f1ff; background: rgba(68,94,132,.32); border-color: rgba(150,176,210,.35); }
#chat-export-pdf:hover:not(:disabled) { background: rgba(97,126,170,.48); }
#chat-export-pdf-status[data-error="true"] { color: #ffd6db; background: #283954; border-color: rgba(150,176,210,.35); }

#sub_header select option {
    color: #e6f1ff;
    background-color: #283954;
}

#sub_header select { min-width: 0; margin-left: 0; padding: 5px 7px; }
#sub_header img { cursor: pointer; filter: brightness(0) invert(1); opacity: .86; }
#sub_header img:hover { opacity: 1; }

#sub_header .portal-chat-toolbar-button {
    display: inline-grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(150, 176, 210, .35);
    border-radius: 8px;
    color: #e6f1ff;
    background: rgba(68, 94, 132, .32);
    cursor: pointer;
}

#sub_header .portal-chat-toolbar-button:hover { background: rgba(97, 126, 170, .48); }
#sub_header .portal-chat-toolbar-button img {
    width: 16px;
    height: 16px;
    margin: 0;
    object-fit: contain;
}

#chat-new,
#save-chat {
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
    border: 1px solid rgba(150, 176, 210, .35);
    border-radius: 8px;
    color: #e6f1ff;
    background: rgba(68, 94, 132, .32);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}



#chat-new { margin-right: 0; background: linear-gradient(145deg, #e59d56, #be702e) }
#chat-new span,
#save-chat span { color: #e6f1ff; }
#chat-new svg { stroke: #e6f1ff; }
#chat-new:hover,
#save-chat:hover { background: rgba(97, 126, 170, .48); }

#chat-window #title-input-area {
    border-color: #60799e;
    color: #edf5ff;
    background: linear-gradient(145deg, #2b3e5a, #202d42);
}

#chat-window #chat-save-description { color: #bbcbdf; }
#chat-window #label_title_input { color: #d8e7f6; }
#chat-window #title-input {
    border-color: #5b7196;
    color: #f4fbff;
    background: #19283e;
}
#chat-window #title-input::placeholder { color: #9dafc5; opacity: 1; }
#chat-window #chat-save-cancel { border-color: #5b7196; color: #d8e7f6; }
#chat-window #chat-save-cancel:hover,
#chat-window #chat-save-close:hover { background: rgba(97, 126, 170, .3); }
#chat-window #send-button-title {
    background: linear-gradient(145deg, #e59d56, #be702e);
    box-shadow: 0 3px 10px rgba(7, 17, 33, .2);
}
#chat-window #send-button-title:hover { background: linear-gradient(145deg, #edaf72, #cb823f); }

.portal-chat-label--full { display: none; }
#chat-window.chatFullScreen .portal-chat-label--compact { display: none; }
#chat-window.chatFullScreen .portal-chat-label--full { display: inline; }

#welcome_chat {
    flex-direction: column;
    gap: 22px;
    padding: 24px;
    background: radial-gradient(circle at center, rgba(74, 106, 155, .16), transparent 65%);
}

#welcome_chat::before {
    content: "✦";
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(187, 142, 191, .72);
    border-radius: 16px;
    color: #e9ad6e;
    background: linear-gradient(145deg, rgba(60, 80, 117, .8), rgba(27, 36, 57, .85));
    box-shadow: 0 12px 30px rgba(4, 11, 24, .25);
    font-size: 30px;
}

#welcome_chat h1 {
    max-width: 340px;
    color: #f4fbff;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.4;
}

#chat-content {
    width: 100%;
    padding: 18px;
    color: #e9f2ff;
    scrollbar-color: #637b9e transparent;
}

#chat-content .chat-message-user {
    max-width: calc(100% - 35px);
    margin-right: 28px;
    padding: 11px 13px;
    border-radius: 12px 4px 12px 12px;
    color: #fff;
    background: #2f6cc1;
}

#chat-content .chat-message-chatbot {
    max-width: calc(100% - 42px);
    padding: 11px 13px;
    border: 1px solid rgba(142, 169, 209, .33);
    border-radius: 4px 12px 12px 12px;
    color: #eef6ff;
    background: #3a4f70;
}

#chat-content .chat-message-chatbot.chat-message-complete { padding-bottom: 34px; }
#chat-content .chat-message-footer-icon {
    filter: brightness(0) invert(1);
    opacity: .85;
}
#chat-content .chat-message-footer-icon:hover { opacity: 1; }
#chat-content .chat-speech-error {
    margin-top: 8px;
    color: #ffd7b0;
    font-size: 12px;
}
#chat-content .chat-message-body {
    color: #eef6ff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
#chat-content .chat-message-body > :first-child { margin-top: 0; }
#chat-content .chat-message-body > :last-child { margin-bottom: 0; }
#chat-content .chat-message-body p { margin: 0 0 10px; line-height: inherit; }
#chat-content .chat-message-body ul,
#chat-content .chat-message-body ol { margin: 8px 0 12px; padding-left: 24px; }
#chat-content .chat-message-body ul { list-style: disc outside; }
#chat-content .chat-message-body ol { list-style: decimal outside; }
#chat-content .chat-message-body li { display: list-item; margin: 0 0 6px; padding-left: 2px; list-style-type: inherit; font-weight: 400; line-height: 1.5; }
#chat-content .chat-message-body li::marker { content: normal; color: #b9cbe4; }
#chat-content .chat-message-body ol li::before { content: none; }
#chat-content .chat-message-body li > p { margin: 0; }
#chat-content .chat-message-body strong { color: #fff; font-weight: 650; }
#chat-content .chat-message-body h1,
#chat-content .chat-message-body h2,
#chat-content .chat-message-body h3,
#chat-content .chat-message-body h4,
#chat-content .chat-message-body h5,
#chat-content .chat-message-body h6 {
    margin: 14px 0 7px;
    color: #f4f9ff;
    background: none;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}
#chat-content .chat-message-body h1 { font-size: 16px; }
#chat-content .chat-message-body h2 { font-size: 15px; }

#chat-content .chat-message-has-table {
    display: block;
    box-sizing: border-box;
    width: min(720px, calc(100% - 42px));
}

#chat-content .chat-message-body .chat-table-scroll {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    border: 1px solid rgba(151, 177, 211, .38);
    border-radius: 10px;
    background: #24344b;
    scrollbar-color: #7891b1 transparent;
    scrollbar-width: thin;
}

#chat-content .chat-message-body .chat-table-scroll:focus-visible {
    outline: 2px solid #e6a35e;
    outline-offset: 2px;
}

#chat-content .chat-message-body .chat-table-scroll table {
    display: table;
    width: 100%;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: #eaf3ff;
    background: #24344b;
}

#chat-content .chat-message-body .chat-table-scroll thead {
    display: table-header-group;
    position: static;
    background: transparent;
}

#chat-content .chat-message-body .chat-table-scroll tbody {
    display: table-row-group;
    text-align: left;
    background: transparent;
}

#chat-content .chat-message-body .chat-table-scroll th,
#chat-content .chat-message-body .chat-table-scroll td {
    position: static;
    min-width: 180px;
    max-width: none;
    padding: 10px 12px;
    border: 0;
    border-right: 1px solid rgba(151, 177, 211, .18);
    border-bottom: 1px solid rgba(151, 177, 211, .18);
    border-radius: 0;
    /* Dashboard pages can apply inset grid shadows to every th/td. */
    box-shadow: none;
    color: #eaf3ff;
    background: #24344b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: break-word;
}

#chat-content .chat-message-body .chat-table-scroll tr > :first-child {
    left: auto;
    z-index: auto;
    min-width: 104px;
    max-width: 180px;
}

#chat-content .chat-message-body .chat-table-scroll thead th {
    color: #fff;
    background: #334d6e;
    font-weight: 650;
}

#chat-content .chat-message-body .chat-table-scroll tbody tr > :first-child {
    color: #434f77;
    background: #e1e8fb;
    font-weight: 650;
}

/* Bold labels must keep the row header's contrast on its light background. */
#chat-content .chat-message-body .chat-table-scroll tbody tr > :first-child strong,
#chat-content .chat-message-body .chat-table-scroll tbody tr > :first-child b {
    color: inherit;
}

#chat-content .chat-message-body .chat-table-scroll tbody tr:nth-child(even) td:not(:first-child) { background: #293b54; }
#chat-content .chat-message-body .chat-table-scroll tbody tr:nth-child(even) > :first-child { background: #d6dff3; }
#chat-content .chat-message-body .chat-table-scroll tr > :last-child { border-right: 0; }
#chat-content .chat-message-body .chat-table-scroll tbody tr:last-child > * { border-bottom: 0; }
#chat-content .chat-message-body .chat-table-scroll td p { margin: 0; }

#chat-content .chat-message-body .chat-table-block { margin: 14px 0; max-width: 100%; }
#chat-content .chat-message-body .chat-table-toolbar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
#chat-content .chat-message-body .chat-table-export-status { color: #cbd8e9; font-size: 12px; }
#chat-content .chat-message-body .chat-table-export-status[data-error="true"] { color: #ffccaf; }
#chat-content .chat-message-body .chat-table-toolbar .btn_dwl {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: inline-flex !important;
    width: auto;
    height: 32px;
    gap: 7px;
    margin: 0;
    padding: 5px 10px;
    align-items: center;
    border: 1px solid rgba(221, 234, 255, .4);
    border-radius: 6px;
    color: #eef6ff;
    background: rgba(15, 29, 48, .35);
    font: 500 12px/1.3 Inter, Arial, sans-serif;
    cursor: pointer;
}

#chat-content .chat-message-body .chat-table-toolbar .btn_dwl:hover { background: rgba(15, 29, 48, .7); border-color: #a9d7ff; }
#chat-content .chat-message-body .chat-table-toolbar .btn_dwl:focus-visible { outline: 2px solid #a9d7ff; outline-offset: 2px; }
#chat-content .chat-message-body .chat-table-toolbar .btn_dwl:disabled { cursor: wait; opacity: .65; }
#chat-content .chat-message-body .chat-table-toolbar .btn_dwl svg { width: 18px; height: 18px; flex: 0 0 18px; color: #a8d4c0; }
#chat-content .chat-message-body .chat-table-scroll .chat-calculation-table th { min-width: 160px; }
#chat-content .chat-message-body .chat-table-scroll .chat-calculation-table td { min-width: 180px; font-variant-numeric: tabular-nums; }

#chat-content .portal-chat-pending {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 10px;
    color: #bed0e8;
    font-size: 12px;
    font-weight: 500;
}
#chat-content .portal-chat-pending__dots { display: inline-flex; align-items: center; gap: 4px; }
#chat-content .portal-chat-pending__dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e6a35e;
    animation: portal-chat-pending-pulse 1.2s ease-in-out infinite;
}
#chat-content .portal-chat-pending__dots span:nth-child(2) { animation-delay: .16s; }
#chat-content .portal-chat-pending__dots span:nth-child(3) { animation-delay: .32s; }
@keyframes portal-chat-pending-pulse {
    0%, 65%, 100% { opacity: .35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
    #chat-content .portal-chat-pending__dots span { animation: none; }
}

#chat-content .chat-message-chatbot a { color: #a9d7ff; }

#chat-content #messageInfoChat {
    display: block;
    box-sizing: border-box;
    width: min(720px, calc(100% - 42px));
    max-width: calc(100% - 42px);
}

#chat-content #messageInfoChat .chat-info-body {
    color: #dce8f7;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

#chat-content #messageInfoChat h2,
#chat-content #messageInfoChat h3 {
    color: #f4f9ff;
    line-height: 1.35;
}

#chat-content #messageInfoChat h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

#chat-content #messageInfoChat h3 {
    margin: 20px 0 9px;
    font-size: 14px;
}

#chat-content #messageInfoChat p { margin: 0; font-size: 13px; line-height: 1.55; }
#chat-content #messageInfoChat ul { margin: 0; padding: 0; list-style: none; }
#chat-content #messageInfoChat li {
    position: relative;
    margin: 0 0 10px;
    padding-left: 17px;
    font-size: 13px;
    line-height: 1.55;
}

#chat-content #messageInfoChat li:last-child { margin-bottom: 0; }
#chat-content #messageInfoChat li::marker { content: none; }
#chat-content #messageInfoChat li::before {
    position: absolute;
    top: .62em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e6a35e;
    content: '';
}

#chat-content #messageInfoChat strong { color: #f4f9ff; font-weight: 650; }

#chat-content .user-prpt-pic,
#chat-content .ai-prpt-pic {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .95;
}

#chat-content .user-prpt-pic { top: 0; right: -32px; }
#chat-content .ai-prpt-pic {
    top: 0;
    left: -40px;
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 1px solid rgba(142, 169, 209, .6);
    border-radius: 9px;
    background: rgba(10, 23, 42, .35);
    filter: none;
    opacity: 1;
}

#chat-window #user-input-area,
#chat-window #user-input-area.active-conversation {
    flex: 0 0 auto;
    height: 112px;
    margin: 0 14px 7px;
    padding: 11px 12px;
    border: 1px solid #5b7196;
    border-radius: 13px;
    background: #26364e;
    box-shadow: inset 0 1px 0 rgba(228, 238, 255, .06);
}

#chat-window #user-input {
    width: calc(100% - 108px);
    height: 75px;
    padding: 5px;
    color: #f4fbff;
    background: transparent;
    font-size: 13px;
    line-height: 1.5;
}

#chat-window #user-input::placeholder { color: #aebfd3; opacity: 1; }
#chat-window #user-input:disabled { color: #aebfd3; background: transparent; }

#chat-window #send-button,
#user-input-area.active-conversation #send-button {
    top: 17px;
    right: 11px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #e59d56, #be702e);
    box-shadow: 0 4px 12px rgba(7, 17, 33, .22);
}

#chat-window #send-button:hover { transform: translateY(-2px); }
#chat-window #send-button img {
    width: 22px;
    margin: 0;
    filter: brightness(0) invert(1);
}

#chat-window #record-button,
#user-input-area.active-conversation #record-button {
    top: 20px;
    right: 60px;
    bottom: auto;
    width: 36px;
    height: 36px;
    background: #3e5b82;
    cursor: pointer;
}

#chat-window #record-button img { width: 18px; height: 18px; margin: 0; }
#chat-window #record-button.recording img { width: 12px; height: 12px; }
#chat-window #record-button:hover { background: #4b6c96; }
#chat-window #record-button.recording,
#chat-window #record-button.recording:hover { background: #a52c40; }
#chat-window #record-button.transcribing { background: #304764; }
#chat-window #record-indicator {
    top: 70px;
    right: 11px;
    bottom: auto;
    border: 1px solid rgba(255, 157, 174, .22);
    color: #ffc0cb;
    background: rgba(122, 35, 53, .3);
}
#chat-window #voice-input-notice { margin: 0 16px 8px; color: #b9cadf; }
#chat-window #voice-input-notice.voice-input-error { color: #ffc0cb; }
#chat-window .chat-mistakes { color: #a8b8cc; padding-bottom: 12px; }

#histo_chat {
    right: calc(min(440px, 100vw - 32px) + 36px);
    bottom: 88px;
    height: min(650px, calc(100dvh - 116px));
    border: 1px solid #64799b;
    border-radius: 18px;
    color: #eaf3ff;
    background: #202d42;
    box-shadow: 0 24px 55px rgba(3, 9, 21, .45);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

#histo_chat h2,
#histo_chat h3 { width: auto; }

#histo_chat .tuile_histo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
    border-color: rgba(150, 176, 210, .35);
    color: #eaf3ff;
    background: #2b3b55;
}

#histo_chat .histo_open {
    grid-column: 1 / -1;
    min-width: 0;
    row-gap: 4px;
}

#histo_chat .histo_question {
    min-width: 0;
    font-weight: 600;
}

#histo_chat .histo_last_question {
    grid-column: 2;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #d0dded;
    font-size: 12px;
    line-height: 1.35;
}

#histo_chat .histo_last_question:empty { display: none; }
#histo_chat .histo_time { grid-column: 1; align-self: end; margin-left: 4px; }
#histo_chat .histo_actions { grid-column: 2; align-self: end; }

#chat-history-close,
#histo_chat h2,
#histo_chat h3,
#histo_chat .histo_open { color: #eaf3ff; }

#histo_chat .histo_actions button { color: #b9d9ff; }
#histo_chat .tuile_histo.choice { border-color: #d58a3e; }
#histo_chat .histo_open img { filter: brightness(0) invert(1); }

#histo_chat .histo_time,
#lite_conv_histo:empty::after,
#tmp_chat:empty::after { color: #b2c3d7; }

@media (max-width: 900px) {
    #histo_chat,
    #histo_chat.chatFullScreen {
        right: 16px;
        bottom: 88px;
        width: min(440px, calc(100vw - 32px));
        height: min(650px, calc(100dvh - 116px));
    }
}

@media (max-width: 1199px) {
    #chat-window.chatFullScreen .portal-chat-label--compact { display: inline; }
    #chat-window.chatFullScreen .portal-chat-label--full { display: none; }
}

@media (max-width: 600px) {
    #chat-icon,
    #close-chat-icon { right: 14px; bottom: 18px; }
    #chat-icon:active,
    #close-chat-icon:active { bottom: 18px; }

    #chat-window,
    #chat-window.chatFullScreen,
    #histo_chat,
    #histo_chat.chatFullScreen {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    #chat-header { border-radius: 0; }
    #chat-window #user-input-area,
    #chat-window #user-input-area.active-conversation { margin: 0 10px 6px; }
}

@media (max-width: 460px) {
    #sub_header { flex-wrap: wrap; }
}
