/* EDS-COMPONENT: FloatingLayer
   Shared geometry for PopoverPanel, FilterMenu, SortMenu, ActionMenu and
   compact InfoPopover states. Product styles must not redefine this layer. */

.eds-body details[data-floating-open] > [data-ui-component="PopoverPanel"],
.eds-body details:is(.filter-menu, .sort-menu)[data-floating-open] >
  [data-ui-component="PopoverPanel"].filter-menu-panel {
  position: fixed !important;
  display: grid;
  left: var(--eds-floating-left) !important;
  right: auto !important;
  top: var(--eds-floating-top) !important;
  bottom: auto !important;
  width: var(--eds-floating-width) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: var(--eds-floating-max-height) !important;
  border: 1px solid var(--eds-line);
  background: var(--eds-surface-1);
  box-shadow: var(--eds-shadow-float);
  opacity: 1;
  overflow: auto !important;
  isolation: isolate;
  transform: none !important;
  z-index: calc(var(--eds-z-popover) + 240) !important;
}

.eds-body .eds-topbar:has(details[data-floating-open]),
.eds-body .eds-card:has(details[data-floating-open]) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.eds-body details[data-floating-open] > [data-ui-component="PopoverPanel"][data-ui-variant="filter-menu"],
.eds-body details[data-floating-open] > [data-ui-component="PopoverPanel"][data-ui-variant="sort-menu"],
.eds-body details[data-floating-open] > [data-ui-component="PopoverPanel"][data-ui-variant="action-menu"] {
  gap: 4px !important;
  padding: 6px !important;
  border-radius: 12px !important;
}

.eds-body [data-ui-component="PopoverPanel"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 60, 67, .28) transparent;
}

.eds-body [data-ui-component="PopoverPanel"]::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.eds-body [data-ui-component="PopoverPanel"]::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(60, 60, 67, .28);
}

.eds-body [data-ui-component="InfoButton"][data-ui-variant="compact"] {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
}

.eds-body [data-ui-component="InfoButton"][data-ui-variant="compact"]::before {
  width: 14px !important;
  height: 14px !important;
  font-size: 9px !important;
}

.eds-body [data-ui-component="InfoButton"][data-ui-variant="compact"]::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
}

.eds-body .eds-popover-help[data-ui-variant="compact"] {
  width: min(210px, calc(100vw - 24px));
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .eds-body [data-ui-component="PopoverPanel"][data-ui-variant="filter-menu"] .filter-chips {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 6px;
  }

  .eds-body [data-ui-component="PopoverPanel"][data-ui-variant="filter-menu"] .tab {
    width: max-content;
    min-width: 0;
    white-space: nowrap;
  }

  .eds-body [data-ui-component="PopoverPanel"][data-ui-variant="sort-menu"] .tab {
    width: max-content;
    min-width: 100%;
    white-space: nowrap;
  }
}
