/*
 * CyCBuscador 1.0.0
 * Selector reutilizable de catálogos sobre CyCModal.
 */

.cyc-lookup-dialog .cyc-lookup-body {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.cyc-lookup-dialog .dialog-intro {
  margin-bottom: 0;
}

.cyc-lookup-search {
  align-items: center;
  border: 1px solid var(--cyc-modal-line, #d8dee8);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 32px;
  min-height: 38px;
  padding: 0 4px 0 10px;
}

.cyc-lookup-search:focus-within {
  border-color: var(--cyc-modal-blue-secondary, #0a3a7a);
  box-shadow: 0 0 0 2px rgba(10, 58, 122, 0.12);
}

.cyc-lookup-search > svg {
  fill: #667085;
  height: 17px;
  width: 17px;
}

.cyc-lookup-search input {
  border: 0;
  color: #172033;
  min-width: 0;
  outline: 0;
  padding: 8px 9px;
  width: 100%;
}

.cyc-lookup-search input::-webkit-search-cancel-button,
.cyc-lookup-search input::-webkit-search-decoration {
  appearance: none;
  -webkit-appearance: none;
}

.cyc-lookup-clear {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #667085;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.cyc-lookup-clear[hidden] {
  display: none;
}

.cyc-lookup-clear:hover,
.cyc-lookup-clear:focus-visible {
  background: #fff4da;
  color: #062d65;
  outline: 2px solid rgba(217, 155, 43, 0.32);
}

.cyc-lookup-clear svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

.cyc-lookup-results {
  border: 1px solid var(--cyc-modal-line, #d8dee8);
  border-radius: 6px;
  max-height: min(52vh, 460px);
  min-height: 210px;
  overflow: auto;
}

.cyc-lookup-results[hidden] {
  display: none;
}

.cyc-lookup-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}

.cyc-lookup-table th {
  background: #e9eff7;
  border-bottom: 1px solid #c7d3e3;
  color: #062d65;
  font-size: 12px;
  height: 34px;
  padding: 0;
  position: sticky;
  text-align: left;
  top: 0;
  z-index: 1;
}

.cyc-lookup-table th + th,
.cyc-lookup-table td + td {
  border-left: 1px solid #e3e8ef;
}

.cyc-lookup-table th button {
  align-items: center;
  background: transparent;
  color: inherit;
  display: flex;
  font-size: inherit;
  font-weight: 700;
  height: 100%;
  padding: 0 10px;
  text-align: left;
  width: 100%;
}

.cyc-lookup-table th button:hover,
.cyc-lookup-table th button:focus-visible {
  background: #dce6f3;
  outline: 2px solid rgba(217, 155, 43, 0.35);
  outline-offset: -2px;
}

.cyc-lookup-table td {
  border-bottom: 1px solid #e3e8ef;
  color: #344054;
  font-size: 12px;
  height: 32px;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cyc-lookup-table tbody tr {
  cursor: pointer;
  outline: 0;
}

.cyc-lookup-table tbody tr:hover td {
  background: #f5f8fc;
}

.cyc-lookup-table tbody tr[aria-selected="true"] td {
  background: #fff4da;
  color: #062d65;
  font-weight: 700;
}

.cyc-lookup-table tbody tr[aria-selected="true"] td:first-child {
  box-shadow: inset 3px 0 #d99b2b;
}

.cyc-lookup-table tbody tr:focus-visible td {
  box-shadow: inset 0 0 0 2px #d99b2b;
}

.cyc-lookup-empty {
  align-content: center;
  background: #f8fafc;
  border: 1px dashed var(--cyc-modal-line, #d8dee8);
  border-radius: 6px;
  color: #667085;
  display: grid;
  min-height: 210px;
  padding: 24px;
  text-align: center;
}

.cyc-lookup-empty[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .cyc-lookup-results {
    max-height: 48vh;
    min-height: 180px;
  }
}
