/*
 * SPDX-FileCopyrightText: 2026 Siemens AG
 *
 * SPDX-License-Identifier: MIT
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
:host {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
:host *,
:host *::after,
:host *::before {
  box-sizing: border-box;
}
:host *::-webkit-scrollbar-button {
  display: none;
}
@-moz-document url-prefix() {
  :host * {
    scrollbar-color: var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);
    scrollbar-width: thin;
  }
}
:host * {
  /* width */
}
:host *::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}
:host * {
  /* Track */
}
:host *::-webkit-scrollbar-track {
  border-radius: 5px;
  background: var(--theme-scrollbar-track--background);
}
:host *::-webkit-scrollbar-track:hover {
  background: var(--theme-scrollbar-track--background--hover);
}
:host * {
  /* Handle */
}
:host *::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--theme-scrollbar-thumb--background);
}
:host * {
  /* Handle on hover */
}
:host *::-webkit-scrollbar-thumb:hover {
  background: var(--theme-scrollbar-thumb--background--hover);
}
:host *::-webkit-scrollbar-corner {
  display: none;
}
:host .message {
  width: -moz-fit-content;
  width: fit-content;
  min-width: max(15.375rem, 45%);
  max-width: 80%;
  box-sizing: border-box;
  padding: var(--theme-space-2) var(--theme-space-3);
  border-radius: var(--theme-default-border-radius);
  background-color: var(--theme-color-component-8);
  color: var(--theme-color-std-text);
}
:host .attachments {
  display: none;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--theme-space-1) 0;
  width: 100%;
  max-width: 75%;
  margin-bottom: var(--theme-space-1);
  overflow: hidden;
}
:host .attachments ::slotted(ix-chat-attachment) {
  flex: 0 1 6.375rem;
  padding-left: var(--theme-space-1);
}
:host .attachment-overflow {
  margin-bottom: var(--theme-space-1);
  --ix-dropdown-button-border-radius-left: var(--theme-small-border-radius);
  --ix-dropdown-button-border-radius-right: var(--theme-small-border-radius);
}
:host .message-text {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
:host .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--theme-space-1);
  min-height: 2rem;
  margin-top: var(--theme-space-1);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
:host .actions ::slotted(ix-icon-button) {
  flex: 0 0 auto;
}

:host(.has-attachments) .attachments {
  display: flex;
}

:host(:focus-visible) {
  outline: none;
}
:host(:focus-visible) .message {
  outline: 1px solid var(--theme-color-focus-bdr);
  outline-offset: var(--theme-focus-outline-offset);
}

:host(.has-actions:focus) .actions,
:host(.has-actions:hover) .actions,
:host(.has-actions:focus-within) .actions {
  opacity: 1;
}