/* Standalone so any page can load it. Colours fall back to sensible defaults but can be
   themed by defining the --dkaddr-* custom properties on a parent. */

.dkaddr-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1050;                    /* above Bootstrap modals and input groups */
  background: #fff;
  border: 1px solid var(--dkaddr-line, #e3e0db);
  border-radius: 8px;
  /* About 15 rows of window, scrolling for the rest - the list carries far more than it
     shows. Never taller than the window either: on a phone the cap gives way to the
     viewport. The plain value is the fallback for browsers without min(). */
  max-height: 565px;
  max-height: min(70vh, 565px);
  overflow: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  text-align: left;
}

.dkaddr-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.dkaddr-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dkaddr-item.is-active { background: var(--dkaddr-active, #eef4f0); }
.dkaddr-item.is-retired .dkaddr-label { color: var(--dkaddr-muted, #6b6560); }
.dkaddr-item.is-disabled { cursor: default; opacity: 0.6; }

/* Its own line rather than a chip beside the label: the sentence is too long to sit in the
   meta without squeezing the address out of a narrow field. align-self stops the pill from
   stretching the full width of the row. */
.dkaddr-note { align-self: flex-start; white-space: normal; }

.dkaddr-item.is-unit { padding-left: 26px; }
.dkaddr-item.is-unit .dkaddr-label::before {
  content: '↳';
  color: var(--dkaddr-muted, #6b6560);
  margin-left: -14px;
  margin-right: 6px;
}

.dkaddr-warning { color: var(--dkaddr-warn, #a8501f); font-size: 12px; }

.dkaddr-meta { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }

.dkaddr-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: #eeebe6;
  color: var(--dkaddr-muted, #6b6560);
  white-space: nowrap;
}

.dkaddr-tag--retired { background: #f6e7de; color: var(--dkaddr-warn, #a8501f); }
.dkaddr-tag--typed { background: #e6eef6; color: #2c5f86; }

.dkaddr-score {
  font-variant-numeric: tabular-nums;
  color: var(--dkaddr-muted, #6b6560);
  font-size: 12px;
  min-width: 34px;
  text-align: right;
}
