/* /domain-preise only - the price table of WhoisPricelist::getHtmlTable() and
   its filter bar (js/domain-preise.js). Kept out of style.css so a change here
   does not mean raising style.css?v= in every page. Colours from the theme:
   blue #66b6d0 (table head), green #b6c062 (buttons), grey #f2f3f8. */

.dp {
  --dp-blue: #66b6d0;
  --dp-blue-dark: #3d8fa9;
  --dp-green: #b6c062;
  --dp-green-dark: #7f8a2e;
  --dp-text: #151515;
  --dp-muted: #6f6f6f;
  --dp-line: #e3e5ec;
  --dp-soft: #f2f3f8;
  text-align: left;
  color: var(--dp-text);
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin-top: 30px;
}

.dp [hidden] { display: none !important; }

/* ------------------------------------------------------------ filter bar */

.dp-tools {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 14px 16px;
  align-items: end;
  padding: 20px;
  background: var(--rw-surface, #fff);
  border: 1px solid var(--dp-line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(44, 54, 64, .07);
}

.dp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.dp-field label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dp-muted);
}

.dp-search { position: relative; }

.dp-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  fill: var(--dp-muted);
  pointer-events: none;
}

.dp-tools input[type="search"],
.dp-tools select,
.dp-checkrow input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd3dc;
  border-radius: 6px;
  background: var(--rw-surface, #fff);
  color: var(--dp-text);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}

.dp-tools input[type="search"] { padding-left: 44px; font-size: 16px; }

.dp-tools select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236f6f6f' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  cursor: pointer;
}

.dp-tools input:focus,
.dp-tools select:focus,
.dp-checkrow input:focus {
  outline: none;
  border-color: var(--dp-blue);
  box-shadow: 0 0 0 3px rgba(102, 182, 208, .25);
}

.dp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #cfd3dc;
  border-radius: 6px;
  font-size: 15px;
  color: var(--dp-text);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.dp-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--dp-green); cursor: pointer; }

.dp-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--rw-olive-soft, #f6f8e9);
  border: 1px solid #dfe4b4;
  font-size: 16px;
}

.dp-cta b { word-break: break-all; }
.dp-cta .button { margin: 0; }

/* ------------------------------------------------------------------ table */

.dp-count {
  margin: 22px 0 10px;
  font-size: 14px;
  color: var(--dp-muted);
}

.dp-table-wrap {
  border: 1px solid var(--dp-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--rw-surface, #fff);
}

.dp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.dp-table thead th {
  padding: 0;
  background: var(--dp-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: left;
  border: 0;
}

.dp-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.dp-sort svg { width: 16px; height: 16px; fill: currentColor; opacity: .45; flex: none; }
.dp-sort-label { text-align: left; }
.dp-sort-label small {
  display: block;
  text-align: left;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
  opacity: .9;
}
.dp-sort:hover { background: rgba(255, 255, 255, .12); }
.dp-sort:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
th[aria-sort="ascending"] .dp-sort svg,
th[aria-sort="descending"] .dp-sort svg { opacity: 1; }
th[aria-sort="ascending"] .dp-sort svg { clip-path: inset(0 0 50% 0); }
th[aria-sort="descending"] .dp-sort svg { clip-path: inset(50% 0 0 0); }

.dp-row > th,
.dp-row > td {
  padding: 14px 18px;
  border-top: 1px solid var(--dp-line);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
  background: var(--rw-surface, #fff);
}

.dp-row:hover > th,
.dp-row:hover > td { background: var(--rw-alt, #fafbfd); }

.dp-tld { width: 26%; }

.dp-tld-name {
  font-family: "Space Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--dp-text);
  word-break: break-all;
}

.dp-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dp-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: 3px;
}

.dp-note {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dp-warn, #a35a00);
}

.dp-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--dp-text);
  white-space: nowrap;
}

.dp-unit {
  margin-left: 5px;
  font-size: 13px;
  color: var(--dp-muted);
  white-space: nowrap;
}

.dp-monthly,
.dp-extra {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dp-muted);
}

.dp-extra--offer { color: var(--dp-green-dark); font-weight: 700; }

.dp-actions { width: 1%; text-align: right !important; white-space: nowrap; }

.dp-toggle-details {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid #cfd3dc;
  border-radius: 6px;
  background: var(--rw-surface, #fff);
  color: var(--dp-blue-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dp-toggle-details svg { width: 18px; height: 18px; fill: currentColor; transition: transform .15s; }
.dp-toggle-details[aria-expanded="true"] svg { transform: rotate(180deg); }
.dp-toggle-details:hover,
.dp-toggle-details[aria-expanded="true"] { border-color: var(--dp-blue); background: var(--rw-olive-soft, #f2f9fc); }

/* ---------------------------------------------------------------- details */

.dp-details-row > td {
  padding: 0 18px 18px;
  background: var(--rw-alt, #fafbfd);
}

.dp-details {
  padding: 18px;
  border: 1px solid var(--dp-line);
  border-radius: 6px;
  background: var(--rw-surface, #fff);
}

.dp-details-term { margin: 0 0 14px; font-size: 14px; }

.dp-fees {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px 28px;
  margin: 0;
}

.dp-fees div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--dp-line); padding-bottom: 6px; }
.dp-fees dt { font-weight: 400; color: var(--dp-muted); white-space: nowrap; }
.dp-fees dd { white-space: nowrap; }
.dp-fees dd { margin: 0; font-weight: 700; text-align: right; }

.dp-details-hint { margin: 8px 0 0; font-size: 13px; color: var(--dp-muted); }

.dp-checkform { margin-top: 16px; }
.dp-checkform label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.dp-checkrow { display: flex; align-items: center; gap: 8px; max-width: 560px; }
.dp-checkrow input { flex: 1; min-width: 0; }
.dp-checktld { font-family: "Space Mono", Menlo, Consolas, monospace; font-weight: 700; white-space: nowrap; }
.dp-checkrow .button { margin: 0; flex: none; }

/* ------------------------------------------------------------- more/empty */

.dp-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
}

.dp-more .button { margin: 0; }

.dp-link {
  border: 0;
  background: none;
  color: var(--dp-blue-dark);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.dp-empty {
  margin-top: 16px;
  padding: 28px 20px;
  border: 1px dashed #cfd3dc;
  border-radius: 8px;
  text-align: center;
  color: var(--dp-muted);
}

.dp-empty p { margin: 0; }
.dp-empty p + p { margin-top: 6px; }

.dp-footnote { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--dp-muted); text-align: left; }

/* ---------------------------------------------------------------- layouts */

@media (max-width: 1199px) {
  .dp-tools { grid-template-columns: 1fr 1fr 1fr; }
  .dp-field--search { grid-column: 1 / -1; }
}

/* phones and small tablets: every row becomes a card */
@media (max-width: 767px) {
  .dp-tools { grid-template-columns: 1fr 1fr; padding: 14px; }
  .dp-field--search { grid-column: 1 / -1; }
  .dp-toggle { justify-content: center; }

  .dp-table-wrap { border: 0; overflow: visible; background: none; }
  .dp-table, .dp-table tbody { display: block; }
  .dp-table thead { display: none; }

  .dp-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 8px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--dp-line);
    border-radius: 8px;
    background: var(--rw-surface, #fff);
  }

  .dp-row > th,
  .dp-row > td { display: block; padding: 0; border: 0; background: none !important; width: auto; }
  .dp-row > .dp-tld { grid-column: 1 / -1; }
  .dp-row > .dp-actions { grid-column: 1 / -1; text-align: left !important; }
  .dp-toggle-details { width: 100%; justify-content: center; }

  .dp-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dp-muted);
  }

  /* the head says "pro Jahr" - on a card it has to stand with the label */
  .dp-row[data-runtime="12"] .dp-cell::before { content: attr(data-label) " pro Jahr"; }

  .dp-price { font-size: 15px; }
  .dp-unit { display: block; margin: 0; font-size: 12px; }
  .dp-monthly, .dp-extra { font-size: 12px; }

  .dp-details-row { display: block; margin: -8px 0 12px; }
  .dp-details-row > td { display: block; padding: 0; background: none; }
  .dp-checkrow { flex-wrap: wrap; }
  .dp-checkrow input { flex-basis: 60%; }
  .dp-checkrow .button { width: 100%; }
}

@media (max-width: 400px) {
  .dp-row { grid-template-columns: 1fr 1fr; }
  .dp-field label { font-size: 11px; }
  .dp-tools select, .dp-toggle { font-size: 14px; }
}

@media (max-width: 339px) {
  .dp-tools { grid-template-columns: 1fr; }
}
