.lh-fluid-selector-popup-overlay[hidden] {
  display: none !important;
}

.lh-fluid-selector-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 8, 13, 0.72);
  z-index: 45;
}

.lh-fluid-selector-popup-panel {
  width: min(1220px, 100%);
  height: min(96vh, 1100px);
  max-height: min(96vh, 1100px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
}

.lh-fluid-selector-popup-header,
.lh-fluid-selector-popup-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lh-fluid-selector-popup-header {
  justify-content: space-between;
}

.lh-fluid-selector-popup-heading {
  display: grid;
  gap: 0.2rem;
}

.lh-fluid-selector-popup-provider {
  color: var(--lh-calculator-muted);
  font-size: 0.78rem;
}

.lh-fluid-selector-popup-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.lh-fluid-selector-popup-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.lh-fluid-selector-popup-field[hidden] {
  display: none !important;
}

.lh-fluid-selector-popup-field-label {
  color: var(--lh-calculator-muted);
  font-size: 0.75rem;
}

.lh-fluid-selector-popup-search {
  width: 100%;
  text-align: left;
}

.lh-fluid-selector-popup-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
}

.lh-fluid-selector-popup-state {
  color: var(--lh-calculator-muted);
  font-size: 0.84rem;
}

.lh-fluid-selector-popup-preview {
  min-height: 1rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
}

.lh-fluid-selector-popup-list,
.lh-fluid-selector-popup-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--lh-calculator-border);
  background: rgba(255, 255, 255, 0.02);
}

.lh-fluid-selector-popup-table-wrap[hidden] {
  display: none !important;
}

.lh-fluid-selector-popup-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.lh-fluid-selector-popup-option:hover,
.lh-fluid-selector-popup-option:focus-visible,
.lh-fluid-selector-popup-table-row:hover,
.lh-fluid-selector-popup-table-row:focus-visible {
  background: rgba(92, 184, 255, 0.12);
  outline: none;
}

.lh-fluid-selector-popup-option-name {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  text-align: left;
}

.lh-fluid-selector-popup-option-meta {
  color: var(--lh-calculator-muted);
  font-size: 0.75rem;
  text-align: right;
  white-space: nowrap;
}

.lh-fluid-selector-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.lh-fluid-selector-popup-table th,
.lh-fluid-selector-popup-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  text-align: left;
}

.lh-fluid-selector-popup-table thead th {
  position: sticky;
  top: 0;
  background: rgba(12, 18, 26, 0.96);
  z-index: 1;
}

.lh-fluid-selector-popup-table-row {
  cursor: pointer;
}

.lh-fluid-selector-popup-table-row[data-lh-selected="true"] {
  background: rgba(92, 184, 255, 0.18);
}

.lh-fluid-selector-popup-table-row[data-lh-selectable="false"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.lh-fluid-selector-popup-table-row[data-lh-selectable="false"]:hover,
.lh-fluid-selector-popup-table-row[data-lh-selectable="false"]:focus-visible {
  background: transparent;
}

.lh-fluid-selector-popup-table-code {
  font-family: Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.lh-fluid-selector-popup-table a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 920px) {
  .lh-fluid-selector-popup-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .lh-fluid-selector-popup-overlay {
    padding: 0.5rem;
  }

  .lh-fluid-selector-popup-toolbar {
    grid-template-columns: 1fr;
  }

  .lh-fluid-selector-popup-header,
  .lh-fluid-selector-popup-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
