:host {
  display: inline-block;
  --panel-height: 75vh;
}

slot[name=title] {
  font-weight: 600;
  font-size: 14px;
}

.popover {
  position: relative;
}
.popover.popover--open .popover__positioner {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}
.popover__header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1em;
}
.popover__header-close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--sc-border-radius-small);
}
.popover__header-close-button:focus {
  outline: 2px solid var(--sc-focus-ring-color, var(--sc-color-primary-500));
  outline-offset: 2px;
}
.popover__header-close-button:hover {
  opacity: 0.7;
}
.popover__header-close-icon {
  vertical-align: middle;
  width: 1.5em;
  height: 1.5em;
}
.popover__footer {
  border-top: 1px solid var(--sc-input-border-color);
  padding-top: 0.5em;
  margin-top: 1em;
}
.popover__trigger {
  display: block;
  cursor: pointer;
  border-width: 0;
  outline: none;
  background-color: unset;
}
.popover--disabled, .popover--disabled .popover__trigger {
  cursor: not-allowed;
}

.popover__positioner {
  position: absolute;
  right: 0;
  width: 100%;
  z-index: var(--sc-z-index-popover);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
  min-width: var(--panel-width, "fit-content");
}

.popover__panel {
  transform-origin: top left;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-height: var(--panel-height);
  font-family: var(--sc-font-sans);
  font-size: var(--sc-font-size-medium);
  font-weight: var(--sc-font-weight-normal);
  color: var(--sc-input-label-color);
  background-color: var(--sc-panel-background-color);
  border: solid 1px var(--sc-panel-border-color);
  border-radius: var(--sc-border-radius-x-large);
  box-shadow: var(--sc-shadow-large);
  overflow: auto;
  overscroll-behavior: none;
  transition: var(--sc-transition-fast) opacity, var(--sc-transition-fast) transform;
  z-index: 5;
  padding: var(--sc-spacing-medium);
}