/* /buy-domain-name price table, design B (#225): a dark band with Site shapes in two corners, quick picks next to
   the search, white rows with a yellow "More info" button and the bulk discount link under the list.
   Markup: the band and heading in buy-domain-name.html, the table in components/domain-pricings-band.html.
   Phones and tablets (< 1024px) show every row as the extension, its 3 labelled prices and a round arrow.
   Every text is 14px or bigger. */

/* No stacking context on the band or the section: the bulk discount dialog inside them must stay above the header.
   The section comes after the shapes, so its text paints over them. */
.dpb-band {
  position: relative;
  overflow: hidden;
  background: var(--foreground);
  color: #fff;
}

.dpb-shapes {
  position: absolute;
  pointer-events: none;
}

.dpb-shapes-top {
  top: 0;
  right: 0;
  width: 120px;
}

.dpb-shapes-bottom {
  bottom: 0;
  left: 0;
  width: 96px;
}

.dpb-section {
  position: relative;
  padding-top: 56px;
  padding-bottom: 80px;
}

.dpb-head a:focus-visible,
.dpb-chip:focus-visible,
.dpb-sort:focus-visible,
.dpb-bulk:focus-visible {
  outline: 3px solid #bcefff;
  outline-offset: 2px;
}

/* Search field and quick picks */
.dpb-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-bottom: 20px;
}

.dpb-search {
  display: flex;
  flex: 1 1 100%;
  min-width: 0;
}

.dpb-search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: var(--foreground);
  font-size: 16px;
  font-weight: 700;
}

.dpb-search-input::placeholder {
  color: #6b6b80;
  opacity: 1;
}

.dpb-search-input:focus-visible {
  outline: 3px solid #bcefff;
  outline-offset: 2px;
}

.dpb-search-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 48px;
  border-radius: 0 8px 8px 0;
  background: rgb(var(--yellow));
  color: var(--foreground);
  font-size: 22px;
}

.dpb-search-icon .icon-search {
  transform: scaleX(-1);
}

.dpb-chips {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.dpb-chips::-webkit-scrollbar {
  display: none;
}

.dpb-chips:empty {
  display: none;
}

.dpb-chip {
  flex: none;
  padding: 8px 14px 7px;
  border: 1.5px solid rgb(255 255 255 / 40%);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-uni-neue);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.dpb-chip:hover {
  border-color: #fff;
}

.dpb-chip[aria-pressed='true'] {
  border-color: rgb(var(--yellow));
  color: rgb(var(--yellow));
}

/* Table: on wide screens the head and every row share the same columns (the last one fits "Mer information");
   the extension column gets more room from 1280px, so "ENREGISTREMENT" fits its column at 1024px */
.dpb-table {
  --dpb-cols: minmax(0, 1fr) repeat(3, minmax(0, 1fr)) 156px;
}

.dpb-thead {
  display: none;
}

.dpb-sort {
  display: inline-flex;
  align-items: center;
  color: rgb(var(--yellow));
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.dpb-listwrap {
  position: relative;
}

/* minmax(0, 1fr): a row with a long extension must not make every row wider than the list */
.dpb-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
  max-height: 470px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: none;
}

.dpb-list::-webkit-scrollbar {
  display: none;
}

.dpb-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 56px;
  background: linear-gradient(180deg, rgb(30 30 65 / 0%), var(--foreground));
  pointer-events: none;
}

.dpb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  row-gap: 2px;
  padding: 10px 12px 10px 14px;
  border-radius: 6px 18px 6px 18px;
  background: #fff;
  color: var(--foreground);
}

.dpb-tld {
  grid-row: 1 / span 3;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dpb-price {
  display: flex;
  grid-column: 2;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dpb-label {
  color: #6b6b80;
  font-size: 14px;
}

/* A fixed minimum width keeps the labels of every row in one line on phones; the maximum lets "price not
   available" wrap instead of pushing the row wider than the list */
.dpb-value {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 4.2em;
  max-width: 8.5em;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.dpb-go {
  position: relative;
  display: inline-flex;
  grid-row: 1 / span 3;
  grid-column: 3;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 10px;
  border-radius: 50%;
  background: rgb(var(--yellow));
  color: var(--foreground);
  box-shadow: 0 4px 0 rgb(255 214 114 / 30%);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.dpb-go:hover {
  background: var(--yellow-light);
}

.dpb-go:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 2px;
}

.dpb-go .icon-arrow-right {
  font-size: 16px;
}

/* "More info" stays the link's name on phones, where only the arrow shows */
.dpb-go-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Bulk discount link under the list; on site.eu + site.de also the link to the TLD list (#326) */
.dpb-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 26px;
}

.dpb-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  text-underline-offset: 2px;
}

.dpb-all .icon-arrow-right {
  color: rgb(var(--yellow));
  font-size: 20px;
}

.dpb-all:hover,
.dpb-all:focus-visible {
  text-decoration: underline;
  outline: none;
}

.dpb-bulk {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgb(var(--yellow));
  font-weight: 700;
  text-align: left;
  text-underline-offset: 2px;
}

.dpb-bulk:hover,
.dpb-bulk:focus-visible {
  text-decoration: underline;
}

.dpb-bulk-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--foreground);
  font-size: 20px;
}

/* Narrow phones (< 400px) get a smaller extension and less space, so long labels (fr "Renouvellement") still leave
   room for it */
@media (min-width: 400px) {
  .dpb-row {
    padding: 10px 14px 10px 16px;
  }

  .dpb-tld {
    font-size: 20px;
  }

  .dpb-price {
    gap: 14px;
  }

  .dpb-go {
    margin-left: 12px;
  }
}

@media (min-width: 768px) {
  .dpb-shapes-top {
    width: 144px;
  }

  .dpb-section {
    padding-top: 76px;
  }

  .dpb-tools {
    gap: 14px 28px;
    margin-bottom: 30px;
  }

  .dpb-search {
    flex: 1 1 440px;
    max-width: 620px;
  }

  .dpb-search-input,
  .dpb-search-icon {
    height: 52px;
  }

  .dpb-search-icon {
    width: 56px;
  }

  .dpb-chips {
    flex-wrap: wrap;
    width: auto;
    overflow: visible;
  }
}

/* Tablets: the phone rows in two columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .dpb-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (min-width: 1024px) {
  .dpb-thead {
    display: grid;
    grid-template-columns: var(--dpb-cols);
    align-items: end;
    column-gap: 16px;
    padding: 0 32px 12px 24px;
  }

  .dpb-list {
    max-height: 560px;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / 35%) transparent;
  }

  .dpb-row {
    grid-template-columns: var(--dpb-cols);
    column-gap: 16px;
    padding: 10px 24px;
  }

  .dpb-tld {
    grid-row: auto;
    font-size: 22px;
  }

  .dpb-price {
    grid-column: auto;
    justify-content: flex-start;
  }

  .dpb-label {
    display: none;
  }

  .dpb-value {
    align-items: flex-start;
    min-width: 0;
    max-width: none;
    font-size: 18px;
    text-align: left;
  }

  .dpb-go {
    grid-row: auto;
    grid-column: auto;
    justify-self: end;
    gap: 6px;
    width: auto;
    height: auto;
    margin-left: 0;
    padding: 8px 14px;
    border-radius: 6px;
  }

  .dpb-go-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

@media (min-width: 1280px) {
  .dpb-table {
    --dpb-cols: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) 156px;
  }

  .dpb-shapes-top {
    width: 192px;
  }

  .dpb-shapes-bottom {
    width: 144px;
  }

  .dpb-section {
    padding-bottom: 64px;
  }
}
