/* ==========================================================================
   WHOIS Lookup — page-specific bits only. The test card shell, note and
   error styles come from tool-shared.css (loaded alongside this file);
   nothing here duplicates it. This file adds the one component the shared
   sheet doesn't have yet: a domain search form, plus the result layout
   (info grid, status badges, name-server list, raw record) that follows.
   ========================================================================== */

/* ---------- Search form ---------- */

.pv-whois-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	max-width: 560px;
	margin: 0 auto;
	text-align: left;
}

.pv-whois-field {
	position: relative;
	flex: 1 1 280px;
}

.pv-whois-field__label {
	display: block;
	margin: 0 0 8px;
	color: var(--pv-ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -.005em;
}

.pv-whois-input {
	width: 100%;
	height: 52px;
	padding: 0 20px;
	border: 1px solid var(--pv-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pv-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.pv-whois-input::placeholder { color: var(--pv-muted); }
.pv-whois-input:focus {
	outline: none;
	border-color: var(--pv-cyan);
	box-shadow: 0 0 0 4px rgba(14, 165, 196, .14);
}
.pv-whois-input[aria-invalid="true"] {
	border-color: #d63c3c;
	box-shadow: 0 0 0 4px rgba(214, 60, 60, .1);
}

.pv-whois-form .pv-btn { flex: 0 0 auto; }

.pv-whois-field-error {
	margin: 8px 0 0 6px;
	color: #b02a2a;
	font-size: 12.5px;
	font-weight: 600;
	text-align: left;
}

@media (max-width: 480px) {
	.pv-whois-form { flex-direction: column; }
	.pv-whois-form .pv-btn { width: 100%; }
}

/* ---------- Result header ---------- */

.pv-whois-result { margin-top: 28px; text-align: left; }

.pv-whois-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--pv-line-2);
}
.pv-whois-head h3 {
	font-family: var(--pv-mono);
	font-size: clamp(17px, 3vw, 21px);
	font-weight: 700;
	overflow-wrap: anywhere;
}

.pv-whois-badge {
	display: inline-flex;
	align-items: center;
	flex: none;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
}
.pv-whois-badge--registered { background: rgba(14, 165, 196, .12); color: var(--pv-cyan); }
.pv-whois-badge--available { background: rgba(18, 183, 106, .12); color: var(--pv-green); }

/* ---------- Section blocks ---------- */

.pv-whois-section { margin-bottom: 24px; }
.pv-whois-section:last-child { margin-bottom: 0; }
.pv-whois-section h4 {
	margin: 0 0 12px;
	color: var(--pv-muted);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}

/* ---------- Info grid (label / value rows) ---------- */

.pv-whois-info {
	display: grid;
	gap: 0;
	margin: 0;
	border: 1px solid var(--pv-line);
	border-radius: var(--pv-r-sm);
	background: var(--pv-soft-2);
	overflow: hidden;
}
.pv-whois-info__row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 8px 16px;
	padding: 11px 16px;
	border-bottom: 1px solid var(--pv-line-2);
}
.pv-whois-info__row:last-child { border-bottom: 0; }
.pv-whois-info dt {
	color: var(--pv-muted);
	font-size: 13px;
	font-weight: 600;
}
.pv-whois-info dd {
	margin: 0;
	color: var(--pv-ink);
	font-size: 13.5px;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.pv-whois-info dd a { color: inherit; }

@media (max-width: 480px) {
	.pv-whois-info__row { grid-template-columns: 1fr; }
	.pv-whois-info dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
}

/* ---------- Status badges ---------- */

.pv-whois-statuses {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* ---------- Name servers ---------- */

.pv-whois-ns {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pv-whois-ns li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 10px 10px 16px;
	border: 1px solid var(--pv-line-2);
	border-radius: 12px;
	background: var(--pv-soft-2);
}
.pv-whois-ns code {
	overflow-wrap: anywhere;
	color: var(--pv-ink);
	font-family: var(--pv-mono);
	font-size: 13px;
}
.pv-whois-copy {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border: 1px solid var(--pv-line);
	border-radius: 10px;
	background: #fff;
	color: var(--pv-ink-2);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pv-whois-copy:hover { border-color: var(--pv-ink); color: var(--pv-ink); }
.pv-whois-copy.is-copied { border-color: var(--pv-green); background: rgba(18, 183, 106, .12); color: var(--pv-green); }
.pv-whois-copy .pv-ico { width: 15px; height: 15px; }

/* ---------- Callouts ---------- */

.pv-whois-note {
	padding: 13px 16px;
	border: 1px solid var(--pv-line-2);
	border-radius: 14px;
	background: var(--pv-soft-2);
	color: var(--pv-ink-2);
	font-size: 13.5px;
	line-height: 1.6;
}

.pv-whois-available {
	padding: 16px 18px;
	border: 1px solid rgba(18, 183, 106, .25);
	border-radius: 14px;
	background: rgba(18, 183, 106, .07);
	color: #0d7a4a;
	font-size: 14px;
	line-height: 1.6;
}
.pv-whois-available strong { color: #0a5c38; }

.pv-whois-disclaimer {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--pv-line-2);
	color: var(--pv-muted);
	font-size: 12px;
	line-height: 1.6;
}

/* ---------- Raw record disclosure ---------- */

.pv-whois-raw {
	margin-top: 18px;
	border: 1px solid var(--pv-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
}
.pv-whois-raw summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	cursor: pointer;
	list-style: none;
	color: var(--pv-ink-2);
	font-size: 13px;
	font-weight: 600;
}
.pv-whois-raw summary::-webkit-details-marker { display: none; }
.pv-whois-raw[open] summary { border-bottom: 1px solid var(--pv-line-2); }
.pv-whois-raw pre {
	max-height: 360px;
	margin: 0;
	padding: 14px 16px;
	overflow-y: auto;
	background: var(--pv-soft-2);
	color: var(--pv-ink-2);
	font-family: var(--pv-mono);
	font-size: 12px;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-word;
}

/* ---------- Loading state ---------- */

.pv-whois-form.is-loading .pv-whois-input { color: var(--pv-muted); }
