/* The suggestions are added after the initial empty state is rendered. */
#emptyState.empty-state:not(.hidden):not([hidden]) {
  display: grid;
  grid-template: "icon copy actions" auto "help help help" auto / auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: 16px 14px;
  padding: clamp(16px, 2.5vw, 26px);
  text-align: start;
}

#emptyState .market-empty-icon {
  grid-area: icon;
  margin: 0;
  align-self: start;
}

#emptyState .market-empty-copy {
  grid-area: copy;
  min-width: 0;
  margin: 0;
  text-align: start;
}

#emptyState .market-empty-copy h3 {
  margin: 0;
  line-height: 1.25;
}

#emptyState .market-empty-copy p {
  max-width: none;
  margin: 4px 0 0;
  line-height: 1.45;
}

#emptyState .market-empty-actions,
#emptyState #cfEmptyHelp {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

#emptyState .market-empty-actions {
  grid-area: actions;
  justify-self: end;
}

#emptyState #cfEmptyHelp {
  grid-area: help;
  justify-self: stretch;
  border-top: 1px solid var(--theme-border, #dce5ed);
  padding: 14px 0 0;
}

#emptyState #cfEmptyHelp > p {
  flex: 0 0 100%;
  max-width: none;
  margin: 0;
  text-align: start;
  line-height: 1.45;
}

#emptyState .market-empty-actions > button:not([hidden]),
#emptyState #cfEmptyHelp > button:not([hidden]) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

#emptyState #clearFilters {
  border: 1px solid #08699f;
  background: #08699f;
  color: #fff;
  font-weight: 600;
}

#emptyState #cfEmptyHelp > button:not([hidden]) {
  border: 1px solid var(--theme-border, #dce5ed);
  background: var(--theme-surface, #fff);
  color: var(--theme-text, #26394b);
}

#emptyState button:focus-visible {
  outline: 2px solid var(--cx-accent, #0877b3);
  outline-offset: 2px;
}

@media (hover: hover) {
  #emptyState #clearFilters:hover { background: #075783; }
  #emptyState #cfEmptyHelp > button:hover { border-color: var(--cx-accent, #0877b3); }
}

@media (max-width: 900px) {
  #emptyState.empty-state:not(.hidden):not([hidden]) {
    grid-template: "icon copy" auto "actions actions" auto "help help" auto / auto minmax(0, 1fr);
    gap: 12px;
  }
  #emptyState .market-empty-actions { justify-self: stretch; }
}

@media (max-width: 560px) {
  #emptyState .market-empty-actions,
  #emptyState #cfEmptyHelp {
    flex-direction: column;
  }
  #emptyState #cfEmptyHelp > p { flex: none; }
  #emptyState .market-empty-actions > button:not([hidden]),
  #emptyState #cfEmptyHelp > button:not([hidden]) {
    width: 100%;
  }
}
