/*
 * 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.
 */
:host {
  --theme-popover--background: var(--theme-color-2);
  --theme-popover--border-color: transparent;
  --theme-popover--color: var(--theme-color-std-text);
  --theme-popover--elevation-filter: drop-shadow(0 0 2px var(--theme-color-shadow-2))
    drop-shadow(0 4px 8px var(--theme-color-shadow-3))
    drop-shadow(0 12px 18px var(--theme-color-shadow-3));
  --theme-popover-close--color: var(--theme-color-soft-text);
  --theme-popover-close-btn--background: transparent;
  --theme-popover-close-btn--background--active: var(--theme-color-ghost--active);
  --theme-popover-close-btn--background--hover: var(--theme-color-ghost--hover);
}
:host dialog.dialog {
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
  box-shadow: none;
  overflow: visible;
  position: fixed;
  inset: unset;
  width: 25rem;
  min-width: 15rem;
  max-width: 37.5rem;
  max-height: calc(100vh - 2rem);
}
:host .popover-container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-height: calc(100vh - 2rem);
  background: var(--theme-popover--background);
  color: var(--theme-popover--color);
  border: 1px solid var(--theme-popover--border-color);
  box-shadow: var(--theme-shadow-4);
  border-radius: var(--theme-default-border-radius);
  overflow: visible;
}
:host .popover-body {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}
:host .popover-container:has(.spike) {
  box-shadow: none;
  filter: var(--theme-popover--elevation-filter);
}
:host .spike,
:host .spike::before {
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
}
:host .spike {
  visibility: hidden;
  z-index: 0;
  pointer-events: none;
}
:host .spike::before {
  visibility: visible;
  content: "";
  transform: rotate(45deg);
  background-color: var(--theme-popover--background);
}