/**
 * Numbers — what the pricing table does not already draw.
 *
 * The surface, rows, drawer, panel, picker and combobox are the rate table's
 * (blocks/rate-table/style.css, a dependency of this block), so the two pages
 * read as one design. Only four things are new here: the block's own padding,
 * feature chips, document lists, and the provider's requirement text.
 *
 * Tokens only.
 */

.vc-rates.wp-block-veloconnect-number-search {
  padding-block: 3.5rem var(--vc-section);
  background: transparent;
}

/* A drawer line here holds lists, not one figure: let the value column wrap. */
.vc-numbers .vc-rates__line {
  align-items: start;
}

.vc-numbers .vc-rates__prices {
  justify-content: flex-end;
}

/* Feature chips — the only colour in the panel, as the channel tile is in a row. */
.vc-numbers__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vc-space-2xs);
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vc-numbers__chips li {
  padding: 0.25rem 0.625rem;
  border-radius: var(--vc-radius-full);
  background: var(--vc-tint);
  color: var(--vc-link-hover);
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-medium);
}

/*
 * Documents and details: a lead-in ("Any 1 of:") over a bulleted list, read
 * left to right like any list (owner, 12 Nov 2026: the right-aligned stack,
 * without markers, ran long names into each other). The column starts where
 * the prices do on the other drawers.
 */
.vc-numbers__docs {
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  text-align: start;
  min-inline-size: min(100%, 18rem);
}

.vc-numbers__k {
  font-size: var(--vc-text-sm);
  color: var(--vc-rates-muted);
}

.vc-numbers__k:not(:first-child) {
  margin-block-start: var(--vc-space-2xs);
}

.vc-numbers__docs .vc-numbers__list {
  display: grid;
  gap: 0.25rem;
  padding-inline-start: 1.125rem;
  list-style: disc;
}

.vc-numbers__docs .vc-numbers__list li::marker {
  color: var(--vc-accent);
}

/* Lines that hold document lists share one column split, so every list starts
   at the same point instead of each being pushed to the right edge. */
.vc-numbers .vc-rates__line:has(.vc-numbers__docs) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.vc-numbers .vc-rates__line:has(.vc-numbers__docs) .vc-rates__prices {
  justify-content: flex-start;
  text-align: start;
}

.vc-numbers__list,
.vc-numbers__areas {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--vc-text-sm);
  color: var(--vc-fg);
}

/* In a drawer column the area list starts where the document lists do. */
.vc-numbers__docs .vc-numbers__areas {
  justify-content: flex-start;
}

.vc-numbers__areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  justify-content: flex-end;
  max-width: 32rem;
  color: var(--vc-fg-2);
}

/*
 * Service restrictions: full width under the lines, never folded — they are
 * what a buyer must know before ordering. A heading, then one bulleted list
 * per distinct text.
 */
.vc-numbers__restrict {
  display: grid;
  gap: var(--vc-space-xs);
  padding: 0.875rem;
  border-block-start: 1px solid var(--vc-line);
  font-size: var(--vc-text-sm);
  color: var(--vc-fg);
}

.vc-numbers__restrict-h {
  margin: 0;
  font-size: var(--vc-text-base);
  font-weight: var(--vc-weight-semibold);
}

.vc-numbers__rset {
  display: grid;
  gap: 0.25rem;
}

.vc-numbers__restrict .vc-numbers__list {
  display: grid;
  gap: 0.25rem;
  max-width: 72ch;
  padding-inline-start: 1.125rem;
  list-style: disc;
}

.vc-numbers__restrict .vc-numbers__list li::marker {
  color: var(--vc-accent);
}

/* The lines carry their rule only between two of them; the next one after the block needs its own. */
.vc-numbers__restrict + .vc-rates__line {
  border-block-start: 1px solid var(--vc-line);
}

/* The supplier's own wording, folded away: long, and the lists above summarise it. */
.vc-numbers__text {
  padding: 0.6875rem 0.875rem;
  border-block-start: 1px solid var(--vc-line);
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-2);
}

.vc-numbers__text summary {
  cursor: pointer;
  color: var(--vc-link);
  font-weight: var(--vc-weight-medium);
}

.vc-numbers__text summary:hover {
  color: var(--vc-link-hover);
}

.vc-numbers__text p {
  margin-block: var(--vc-space-xs) 0;
  max-width: 72ch;
  white-space: normal;
}

/*
 * The sub-search, under the surface's head and on its inset, so its left edge
 * is the title's. The picker's language, one size down: fields on the next
 * surface up, the field radius, one focus ring; features as chips, the same
 * pills the drawers use, filled when on.
 */
.vc-numbers__filter {
  display: grid;
  gap: 1rem;
  padding: 1.125rem var(--vc-space-md) 1.25rem;
  border-block-end: 1px solid var(--vc-line);
}

.vc-numbers__fields {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.vc-numbers__field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.vc-numbers__label {
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-medium);
  color: var(--vc-fg-2);
}

.vc-numbers__select,
.vc-numbers__search {
  position: relative;
  display: block;
}

.vc-numbers__select select,
.vc-numbers__search input {
  box-sizing: border-box;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  padding: 0 0.875rem;
  font: var(--vc-weight-medium) var(--vc-text-base) / 1 var(--vc-font-body);
  color: var(--vc-fg);
  background: var(--vc-surface-2);
  border: 1px solid var(--vc-line-2);
  border-radius: var(--vc-radius-md);
  transition: border-color 0.15s var(--vc-ease), box-shadow 0.15s var(--vc-ease);
}

.vc-numbers__select select {
  appearance: none;
  padding-inline-end: 2.5rem;
  cursor: pointer;
}

/* The select's chevron, drawn in currentColor: no literal colour, no image. */
.vc-numbers__select::after {
  content: "";
  position: absolute;
  inset-inline-end: 1rem;
  top: 50%;
  width: 0.4375rem;
  height: 0.4375rem;
  border-inline-end: 1.5px solid var(--vc-fg-2);
  border-block-end: 1.5px solid var(--vc-fg-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.vc-numbers__search svg {
  position: absolute;
  inset-inline-start: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vc-fg-2);
  pointer-events: none;
}

.vc-numbers__search input {
  padding-inline-start: 2.5rem;
}

.vc-numbers__search input::placeholder {
  color: var(--vc-fg-3);
  opacity: 1;
}

.vc-numbers__select select:hover,
.vc-numbers__search input:hover {
  border-color: var(--vc-control);
}

/* One ring, not a ring around a border: the border takes the colour. */
.vc-numbers__select select:focus-visible,
.vc-numbers__search input:focus-visible {
  outline: none;
  border-color: var(--vc-link);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vc-link) 22%, transparent);
}

/* Only without JavaScript: view.js removes it and searches as you go. */
.vc-numbers__apply {
  height: 2.75rem;
}

/* Features: a row of chips. */
.vc-numbers__chips-set {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.vc-numbers__chips-set legend {
  float: left;
  width: 100%;
  margin-block-end: 0.5rem;
  padding: 0;
}

.vc-numbers__chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  clear: both;
}

.vc-numbers__chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

/* The real checkbox, kept focusable and announced, drawn as the pill. */
.vc-numbers__chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.vc-numbers__chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-medium);
  line-height: 1.2;
  color: var(--vc-fg-2);
  background: var(--vc-surface-2);
  border: 1px solid var(--vc-line-2);
  border-radius: var(--vc-radius-full);
  transition: background-color 0.15s var(--vc-ease), color 0.15s var(--vc-ease), border-color 0.15s var(--vc-ease);
}

.vc-numbers__chip:hover span {
  color: var(--vc-fg);
  border-color: var(--vc-control);
}

.vc-numbers__chip input:checked + span {
  color: var(--vc-link-hover);
  background: var(--vc-tint);
  border-color: color-mix(in srgb, var(--vc-blue) 45%, transparent);
}

.vc-numbers__chip input:checked + span::before {
  content: "✓";
  font-size: 0.75rem;
  line-height: 1;
}

.vc-numbers__chip input:focus-visible + span {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vc-link) 22%, transparent);
  border-color: var(--vc-link);
}

/* The way forward: under the results, on the surface's inset. */
.vc-numbers__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vc-space-sm);
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem var(--vc-space-md);
  background: var(--vc-surface-2);
  border-block-start: 1px solid var(--vc-line);
}

.vc-numbers__cta p {
  margin: 0;
  max-width: 60ch;
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-2);
}

.vc-numbers__cta b {
  color: var(--vc-fg);
  font-weight: var(--vc-weight-semibold);
}

/* The results' count, on the same inset as the head and the bar. */
.vc-numbers__count {
  margin: 0;
  padding: 0.875rem var(--vc-space-md) 0;
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-2);
}

@media (max-width: 45rem) {
  .vc-numbers__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .vc-numbers__filter,
  .vc-numbers__count,
  .vc-numbers__cta {
    padding-inline: var(--vc-space-sm);
  }

  .vc-rates.wp-block-veloconnect-number-search {
    padding-block-start: var(--vc-space-lg);
  }

  .vc-numbers .vc-rates__line,
  .vc-numbers .vc-rates__line:has(.vc-numbers__docs) {
    grid-template-columns: minmax(0, 1fr);
  }

  .vc-numbers__chips,
  .vc-numbers__areas {
    justify-items: start;
    justify-content: flex-start;
    text-align: start;
  }
}
