/*
 | The domain page's search box after Spaceship's (24 Nov 2026, the owner's
 | word): Register | Transfer above it, Bulk Mode and Search inside it on the
 | right, and what the Transfer tab and Bulk Mode answer (domain-search/bulk).
 | Pushed by domain-search/section beside domain-search.css. The box is the
 | page's surface on the deep band; the tab and the switch are form fields, so
 | the stylesheet swaps the one line for the list (`:has()`), and the script
 | sets `.is-bulk`/`.is-transfer` too for a browser without it.
 */

/* ---- the tabs above the box ---- */
.dsx-wrap { width: 100%; max-width: 720px; display: grid; gap: 10px; }
.dsx-modes { justify-self: start; display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.06); border: 1px solid var(--deep-line-2); box-sizing: border-box; }
.dsx-mode { position: relative; display: block; }
.dsx-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dsx-mode span { display: block; padding: 0 18px; line-height: 32px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--deep-fg-2); white-space: nowrap; }
.dsx-mode:hover input:not(:checked) + span { color: var(--deep-fg); background: rgb(255 255 255 / 0.06); }
.dsx-mode input:checked + span { background: var(--deep-fg); color: var(--deep); }
.dsx-mode input:focus-visible + span { outline: 2px solid var(--jade); outline-offset: 2px; }

/* ---- the box ---- */
.dsearch.dsx { max-width: none; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 16px; background: var(--surface); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.dsearch.dsx:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint-2), 0 20px 50px -20px rgb(0 0 0 / 0.6); }
.dsx .dsearch-i { display: block; flex: none; width: 20px; height: 20px; fill: none; stroke: var(--fg-3); stroke-width: 2.2; stroke-linecap: round; }
.dsx input[name="name"] { flex: 1 1 0; width: 0; min-width: 0; color: var(--fg); font-family: var(--font-sans); font-size: 17px; font-weight: 500; padding: 10px 6px; }
.dsx input[name="name"]::placeholder, .dsx-list::placeholder { color: var(--fg-3); font-weight: 400; }
.dsx .dsearch-clear { color: var(--fg-3); }
.dsx .dsearch-clear:hover { background: var(--surface-2); color: var(--fg); }
.dsearch-clear[hidden] { display: none; }
.dsx-list { display: none; flex: 1 1 100%; box-sizing: border-box; min-width: 0; min-height: 140px; resize: vertical; margin: 0; padding: 10px 4px 6px; border: 0; background: none; color: var(--fg); font: 500 16px/1.55 var(--font-mono); }
.dsx-list:focus { outline: none; }

/* Bulk Mode: a switch, the sliders and the words. */
.dsx-bulk { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent; color: var(--fg-2); font-size: 14.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.dsx-bulk input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dsx-bulk-i { width: 19px; height: 19px; flex: none; }
.dsx-bulk:hover { background: var(--surface-2); color: var(--fg); }
.dsx.is-bulk .dsx-bulk { background: var(--tint); border-color: var(--tint-2); color: var(--primary-text); }
.dsx-bulk:has(input:checked) { background: var(--tint); border-color: var(--tint-2); color: var(--primary-text); }
.dsx-bulk:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Search: a dark rounded box with its icon on the left (light on the dark theme's dark box). */
.dsx-go { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--fg); color: var(--bg); font: 600 15.5px var(--font-sans); cursor: pointer; }
.dsx-go:hover { opacity: 0.88; }
.dsx-go:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.dsx-go-i { width: 18px; height: 18px; flex: none; }

/* The list in place of the line: the words fill the box, the switch and the button sit under them. */
.dsx.is-bulk { flex-wrap: wrap; align-items: flex-end; padding: 8px 8px 8px 16px; }
.dsx.is-bulk .dsx-list { display: block; }
.dsx.is-bulk input[name="name"], .dsx.is-bulk .dsearch-i, .dsx.is-bulk .dsearch-clear { display: none; }
.dsx.is-bulk .dsx-bulk { margin-left: auto; }
.dsx:has(.dsx-bulk input:checked) { flex-wrap: wrap; align-items: flex-end; padding: 8px 8px 8px 16px; }
.dsx:has(.dsx-bulk input:checked) .dsx-list { display: block; }
.dsx:has(.dsx-bulk input:checked) input[name="name"], .dsx:has(.dsx-bulk input:checked) .dsearch-i, .dsx:has(.dsx-bulk input:checked) .dsearch-clear { display: none; }
.dsx:has(.dsx-bulk input:checked) .dsx-bulk { margin-left: auto; }

/* What a transfer asks for, under the box while the Transfer tab is chosen. */
.dsx-hint { display: none; margin: 0; font-size: 13.5px; color: var(--deep-fg-2); text-align: left; }
.dfind.is-transfer .dsx-hint { display: block; }
.dsx-wrap:has(.dsx-modes input[value="transfer"]:checked) .dsx-hint { display: block; }
.dsx-wrap:has(.dsx-modes input[value="register"]:checked) .dsx-hint { display: none; }

/* While results show (`.dfind.is-searching`, domain-search.css): the tabs stay
   above the bar, 40px and a 10px gap, so the band's sticky offset there grows
   by those 50px and the bar stops exactly where it did. A list (Bulk Mode) is
   too tall to keep at the top, so that band scrolls with the page. */
.dfind.is-searching .dsx-wrap { max-width: none; }
.dfind.is-searching .dsx-modes { height: 40px; }
.dfind.is-searching .dsx-wrap .dsx-hint { display: none !important; }
.dfind.has-modes.is-searching { top: -140px; }
.dfind.is-searching .dsearch.dsx { height: 68px; padding: 0 10px 0 22px; border-radius: 999px; }
.dfind.is-searching .dsx .dsx-bulk { border-radius: 999px; }
.dfind.is-searching .dsx .dsx-go { height: 50px; border-radius: 999px; padding-inline: 24px; }
.dfind.is-searching.is-bulk { position: relative; top: auto; }
.dfind.is-searching .dsearch.dsx.is-bulk { height: auto; padding: 8px 8px 8px 16px; border-radius: 20px; }
.dfind.is-searching:has(.dsx-bulk input:checked) { position: relative; top: auto; }
.dfind.is-searching .dsearch.dsx:has(.dsx-bulk input:checked) { height: auto; padding: 8px 8px 8px 16px; border-radius: 20px; }

@media (max-width: 640px) {
    .dsx-bulk span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .dsx-bulk { padding: 0 11px; }
    .dfind.has-modes.is-searching { top: -132px; }
    .dfind.is-searching .dsearch.dsx { height: 58px; padding: 0 6px 0 14px; gap: 2px; }
    .dfind.is-searching .dsx .dsx-go { height: 44px; padding-inline: 14px; }
    .dfind.is-searching .dsx input[name="name"] { font-size: 16px; }
}
@media (max-width: 420px) {
    /* site.css stacks a search box on a phone; this one keeps its line and
       puts Bulk Mode and Search on the next. */
    .dsearch.dsx { flex-direction: row; flex-wrap: wrap; padding: 6px 6px 6px 14px; }
    .dsx input[name="name"] { flex: 1 1 calc(100% - 64px); }
    .dsx .dsx-go { flex: 1 1 auto; }
    .dfind.is-searching .dsearch.dsx { flex-wrap: nowrap; }
    .dfind.is-searching .dsx .dsx-go { flex: none; }
    .dfind.is-searching .dsx .dsx-go span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .dfind.is-searching .dsx input[name="name"] { flex: 1 1 0; }
}

/* ---- the Transfer tab's answer: one card ---- */
.dtx { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
@media (min-width: 760px) { .dtx { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .dtx-epp { grid-column: 1 / -1; } }
.dtx.is-transferable { border-color: var(--ok-line); background: radial-gradient(100% 160% at 0% 0%, var(--ok-bg), transparent 60%), var(--surface); }
.dtx.is-unknown { border-color: var(--renew-line); }
.dtx-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.dtx-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fg-3); color: var(--surface); }
.dtx-mark svg { width: 22px; height: 22px; }
.dtx.is-transferable .dtx-mark, .dtx.is-ours .dtx-mark { background: var(--success); }
.dtx.is-unknown .dtx-mark { background: var(--warning); }
.dtx.is-unsupported .dtx-mark, .dtx.is-invalid .dtx-mark { background: var(--danger); }
.dtx-text { display: grid; gap: 4px; min-width: 0; }
.dtx-name { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; color: var(--fg); overflow-wrap: anywhere; }
.dtx-said { margin: 0; color: var(--fg-2); }
.dtx-why { margin: 0; font-size: 13.5px; color: var(--fg-3); }
.dtx-buy { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: flex-start; }
@media (min-width: 760px) { .dtx-buy { justify-content: flex-end; text-align: right; } }
.dtx-price { margin: 0; display: grid; gap: 2px; max-width: 30ch; }
.dtx-price small { font-size: 12.5px; color: var(--fg-3); }
.dtx-amount { font-size: 1.5rem; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.dtx-go { min-height: 48px; padding-inline: 26px; }
.dtx-go svg { width: 18px; height: 18px; }
.dtx-alt { margin: 0; }
.dtx-epp { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--fg-2); }
.dtx-epp svg { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--primary-text); }

/* ---- Bulk Mode's answer: a list ---- */
.dbl { display: grid; gap: 14px; }
.dbl-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.dbl-title { margin: 0; font-size: 1.3rem; }
.dbl-sum { margin: 4px 0 0; font-size: 14px; color: var(--fg-3); }
.dbl-all { min-height: 44px; }
.dbl-all[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.dbl-list { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.dbl-row { display: grid; grid-template-columns: minmax(0, 1fr) 13rem 8rem 12rem; gap: 8px 18px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.dbl-row:first-child { border-top: 0; }
.dbl-name { display: grid; gap: 2px; min-width: 0; }
.dbl-text { font-family: var(--font-mono); font-size: 15.5px; font-weight: 600; color: var(--fg); overflow-wrap: anywhere; }
.dbl-why { font-size: 12.5px; color: var(--fg-3); }
.dbl-tag { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; color: var(--fg-3); background: var(--surface-2); border: 1px solid var(--line); }
.dbl-row.is-available .dbl-tag, .dbl-row.is-transferable .dbl-tag { color: var(--success); background: var(--ok-bg); border-color: var(--ok-line); }
.dbl-row.is-unknown .dbl-tag { color: var(--warning); background: var(--renew-bg); border-color: var(--renew-line); }
.dbl-row.is-taken .dbl-text, .dbl-row.is-unavailable .dbl-text, .dbl-row.is-invalid .dbl-text, .dbl-row.is-unsupported .dbl-text { color: var(--fg-3); }
.dbl-price { display: grid; justify-items: end; gap: 1px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--fg); }
.dbl-price small { font-size: 12px; font-weight: 400; color: var(--fg-3); }
.dbl-act { display: flex; justify-content: flex-end; min-width: 0; }
.dbl-act .dtx-alt { display: flex; }
.dbl-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--primary); background: var(--primary); color: var(--primary-fg); font: 600 14px var(--font-sans); white-space: nowrap; text-decoration: none; cursor: pointer; }
.dbl-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.dbl-btn svg { width: 17px; height: 17px; flex: none; }
.dbl-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
button.dbl-btn { background: var(--surface-2); color: var(--fg); border-color: var(--line-strong); }
button.dbl-btn:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary-text); }
.dbl-btn.in-cart { background: var(--ok-bg); border-color: var(--ok-line); color: var(--success); }
.dtx-go.in-cart { background: var(--success); }
.dbl-note { margin: 0; }
@media (max-width: 640px) {
    .dbl-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
    .dbl-tag { grid-column: 1; grid-row: 2; }
    .dbl-price { grid-column: 2; grid-row: 1; }
    .dbl-act { grid-column: 2; grid-row: 2; }
    .dbl-all { width: 100%; }
}

/* A list while results show on a phone: still the list, the switch and
   Search under it (the phone's one-line bar above is for a single name). */
@media (max-width: 640px) {
    .dfind.is-searching .dsearch.dsx.is-bulk { height: auto; flex-wrap: wrap; padding: 8px 8px 8px 14px; }
    .dfind.is-searching .dsearch.dsx:has(.dsx-bulk input:checked) { height: auto; flex-wrap: wrap; padding: 8px 8px 8px 14px; }
}
