/*
 * WondaHost Domains 1.2.0, front-end styles, drawn to the approved WondaHost designs.
 * Colours: Astra global colours only (var(--ast-global-color-N)), plus the approved border
 * rgba(120,144,170,0.35) and shadow rgba(10,38,71,0.28). Both work in the light and dark palettes,
 * so the Astra Color Switcher needs nothing extra here.
 */
.wh-domain-search,
.wh-domain-table,
.wh-whois {
	--wh-border: rgba(120, 144, 170, 0.35);
	--wh-shadow: 0 18px 40px -24px rgba(10, 38, 71, 0.28);
}

/* ---------- Prices ---------- */

/* Line height of the figure, so the wrapper's inherited body line height can't push the price down. */
.wh-plan-price { display: block; margin: 0; color: var(--ast-global-color-3); line-height: 1.05; }
.wh-plan-price__amount { color: var(--ast-global-color-2); }
/* line-height 1: the cycle text must not make the price line taller than the figure. */
.wh-plan-price__period { font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.wh-plan-price.has-text-color .wh-plan-price__amount,
.wh-plan-price.has-text-color .wh-plan-price__period { color: inherit; }

.wh-domain-price { display: inline; }
.wh-domain-price__amount { font-weight: 700; color: var(--ast-global-color-2); }
.wh-domain-price__period { color: var(--ast-global-color-3); }
.wh-domain-price.has-text-color .wh-domain-price__amount,
.wh-domain-price.has-text-color .wh-domain-price__period { color: inherit; }

/* ---------- Domain search: one pill with the button inside ---------- */

.wh-domain-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 640px;
	margin: 0;
	padding: 8px;
	background: var(--ast-global-color-4);
	border: 1px solid var(--wh-border);
	border-radius: 999px;
	box-shadow: var(--wh-shadow);
	box-sizing: border-box;
}
.wh-domain-search:focus-within {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}
.wh-domain-search.wh-domain-search input[type="text"],
.wh-domain-search.wh-domain-search input[type="search"] {
	flex: 1 1 200px;
	min-width: 0;
	width: auto;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--ast-global-color-2);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0;
}
.wh-domain-search.wh-domain-search input[type="text"]:focus,
.wh-domain-search.wh-domain-search input[type="search"]:focus {
	outline: none;
	border: 0;
	box-shadow: none;
	background: transparent;
	color: var(--ast-global-color-2);
}
/* Placeholder 14px, typed text 16px. Below 600px input.js shows the short placeholder, so it fits on one line. */
.wh-domain-search input::placeholder { color: var(--ast-global-color-3); opacity: 1; font-size: 14px; }
.wh-domain-search button[type="submit"] {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 12px 28px;
	border: 2px solid var(--ast-global-color-0);
	border-radius: 999px;
	background: var(--ast-global-color-0);
	box-shadow: none;
	color: var(--ast-global-color-5);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}
.wh-domain-search button[type="submit"]:hover,
.wh-domain-search button[type="submit"]:focus {
	background: var(--ast-global-color-0);
	border-color: var(--ast-global-color-0);
	color: var(--ast-global-color-5);
	filter: brightness(0.95);
}
.wh-domain-search button[type="submit"]:focus-visible {
	outline: 2px solid var(--ast-global-color-2);
	outline-offset: 2px;
}
.wh-domain-search__message {
	flex: 1 0 100%;
	margin: 0;
	padding: 0 16px 6px;
	color: var(--ast-global-color-2);
	font-size: 14.7px;
	line-height: 1.5;
}
.wh-domain-search__message:empty { display: none; }

/* Phones: a rounded rectangle, input on top, full-width button below. */
@media (max-width: 440px) {
	.wh-domain-search { border-radius: 20px; }
	.wh-domain-search.wh-domain-search input[type="text"],
	.wh-domain-search.wh-domain-search input[type="search"] { flex-basis: 100%; }
	.wh-domain-search button[type="submit"] { width: 100%; }
}

/* ---------- Domain price table ---------- */

.wh-domain-table__filter { display: block; max-width: 640px; margin: 0 0 16px; }
.wh-domain-table__filter input[type="search"] {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 22px;
	background: var(--ast-global-color-4);
	border: 1px solid var(--wh-border);
	border-radius: 999px;
	box-shadow: var(--wh-shadow);
	color: var(--ast-global-color-2);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0;
	box-sizing: border-box;
}
.wh-domain-table__filter input[type="search"]:focus {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
	border-color: var(--wh-border);
	background: var(--ast-global-color-4);
	color: var(--ast-global-color-2);
}
.wh-domain-table__filter input::placeholder { color: var(--ast-global-color-3); opacity: 1; }

/* min-width 0: inside a flex row the table must shrink to its column, so the frame scrolls instead of the page. */
.wh-domain-table { min-width: 0; max-width: 100%; }
.wh-domain-table__frame {
	overflow-x: auto;
	contain: paint; /* keeps the wide table's paint inside the frame; without it the page scrolls sideways at 320px */
	background: var(--ast-global-color-4);
	border: 1px solid var(--wh-border);
	border-radius: 20px;
}
.wh-domain-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 15.5px;
	letter-spacing: 0;
}
.wh-domain-table th,
.wh-domain-table td {
	padding: 14px 18px;
	text-align: left;
	vertical-align: top;
	line-height: 1.45;
	border: 0;
	border-bottom: 1px solid var(--wh-border);
	background: transparent;
	color: var(--ast-global-color-3);
}
.wh-domain-table thead th {
	background: var(--ast-global-color-7);
	color: var(--ast-global-color-2);
	font-weight: 600;
	white-space: nowrap;
}
.wh-domain-table tbody th { color: var(--ast-global-color-2); font-weight: 600; white-space: nowrap; }
.wh-domain-table tbody tr:nth-child(even) th,
.wh-domain-table tbody tr:nth-child(even) td { background: var(--ast-global-color-7); }
.wh-domain-table tbody tr:last-child th,
.wh-domain-table tbody tr:last-child td { border-bottom: 0; }
.wh-domain-table tbody th a { color: var(--ast-global-color-1); }
.wh-domain-table__order { color: var(--ast-global-color-1); font-weight: 600; white-space: nowrap; }
.wh-domain-table__order:hover { color: var(--ast-global-color-2); }
.wh-domain-table__note { margin: 12px 0 0; font-size: 14.7px; line-height: 1.7; color: var(--ast-global-color-3); }

@media (max-width: 600px) {
	.wh-domain-table th,
	.wh-domain-table td { padding: 11px 12px; font-size: 14.4px; }
}

/* Admin-only warning when a live price can't be loaded: one small line under the price. Visitors never see it. */
.wh-domains-note {
	display: block;
	max-width: 100%;
	margin: 4px 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--ast-global-color-1);
	font-family: inherit;
	font-size: 13px;
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.4;
}

/* ---------- Country notice (the Nigeria bar) ---------- */

.wh-geo-notice { position: relative; }
.wh-geo-notice__close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.wh-geo-notice__close:hover,
.wh-geo-notice__close:focus { background: transparent; color: inherit; }
.wh-geo-notice__close:focus-visible { outline: 2px solid var(--ast-global-color-0); outline-offset: 2px; }
.wh-geo-notice.is-editing { outline: 1px dashed rgba(120, 144, 170, 0.35); }
.wh-geo-notice__label { font-size: 0.75rem; opacity: 0.7; margin: 0 0 0.5rem; }

/* ---------- Live search results and WHOIS lookup (1.2.0) ---------- */

.wh-domain-search-wrap { width: 100%; }
.wh-domain-search-wrap,
.wh-whois { --wh-border: rgba(120, 144, 170, 0.35); }

/* a.wh-btn.wh-btn.wh-btn: outranks theme rules that underline links in page content (Astra: .ast-single-post .entry-content a). */
a.wh-btn.wh-btn.wh-btn,
.wh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 9px 20px;
	border: 2px solid var(--ast-global-color-0);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
}
a.wh-btn.wh-btn.wh-btn:hover,
a.wh-btn.wh-btn.wh-btn:focus { text-decoration: none; }
.wh-btn--primary,
.wh-btn--primary:hover,
.wh-btn--primary:focus { background: var(--ast-global-color-0); color: var(--ast-global-color-5); }
.wh-btn--outline,
.wh-btn--outline:hover,
.wh-btn--outline:focus { background: transparent; color: var(--ast-global-color-2); }
.wh-btn--outline:hover { border-color: var(--ast-global-color-1); }
.wh-btn:focus-visible { outline: 2px solid var(--ast-global-color-2); outline-offset: 2px; }

.wh-results { display: grid; gap: 10px; max-width: 640px; margin: 16px 0 0; text-align: left; }
.wh-results:empty { display: none; }
.wh-result {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	min-height: 64px;
	padding: 12px 12px 12px 20px;
	background: var(--ast-global-color-4);
	border: 1px solid var(--wh-border);
	border-radius: 16px;
	color: var(--ast-global-color-3);
}
.wh-result.is-exact { min-height: 76px; padding: 16px 16px 16px 24px; border-width: 2px; border-color: var(--ast-global-color-0); }
.wh-result.is-loading { opacity: 0.7; }
.wh-result p { margin: 0; }
.wh-result__title { color: var(--ast-global-color-2); font-size: 16px; line-height: 1.45; }
.wh-result.is-exact .wh-result__title { font-size: 18.9px; }
.wh-result__title strong { font-weight: 600; overflow-wrap: anywhere; }
.wh-result__price { margin-top: 2px; font-size: 14.7px; line-height: 1.5; color: var(--ast-global-color-3); }
.wh-result__checking { color: var(--ast-global-color-3); font-size: 14.7px; }
.wh-result__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wh-result__retry {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--ast-global-color-1);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
.wh-result__retry:hover,
.wh-result__retry:focus { background: none; color: var(--ast-global-color-2); }
.wh-result.is-message { min-height: 0; }
@media (max-width: 600px) {
	.wh-result,
	.wh-result.is-exact { padding: 14px 16px; }
	.wh-result__actions { width: 100%; }
	.wh-result__actions .wh-btn { flex: 1 1 0; }
}

.wh-whois { width: 100%; }
.wh-whois__result { max-width: 760px; margin: 20px auto 0; text-align: left; }
.wh-whois__result:empty { display: none; }
.wh-whois__result.is-loading { opacity: 0.6; }
.wh-whois__card {
	padding: 32px;
	background: var(--ast-global-color-4);
	border: 1px solid var(--wh-border);
	border-radius: 20px;
	box-shadow: 0 18px 40px -24px rgba(10, 38, 71, 0.28);
	color: var(--ast-global-color-3);
}
.wh-whois__card p { margin: 0; }
.wh-whois__card.is-message { padding: 20px 24px; color: var(--ast-global-color-2); }
.wh-whois__good { color: var(--ast-global-color-2); font-size: 18.9px; line-height: 1.5; }
.wh-whois__price { margin-top: 4px !important; }
.wh-whois__fields { display: grid; gap: 0; margin: 0; }
.wh-whois__field { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--wh-border); }
.wh-whois__field:first-child { padding-top: 0; }
.wh-whois__field dt { margin: 0; color: var(--ast-global-color-2); font-weight: 600; }
.wh-whois__field dd { margin: 0; overflow-wrap: anywhere; }
.wh-whois__field ul { margin: 0; padding: 0; list-style: none; }
.wh-whois__field li { margin: 0 0 4px; }
.wh-whois__field code { padding: 1px 6px; border-radius: 6px; background: var(--ast-global-color-7); color: var(--ast-global-color-2); font-size: 0.9em; }
.wh-whois__when { color: var(--ast-global-color-3); }
.wh-whois__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px !important; }
.wh-whois__other { color: var(--ast-global-color-1); font-weight: 600; }
.wh-whois__raw { margin-top: 20px; }
.wh-whois__raw summary { color: var(--ast-global-color-1); font-weight: 600; cursor: pointer; }
.wh-whois__raw pre {
	max-height: 480px;
	margin: 12px 0 0;
	padding: 16px;
	overflow: auto;
	background: var(--ast-global-color-7);
	border-radius: 12px;
	color: var(--ast-global-color-2);
	font-size: 13px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
@media (max-width: 600px) {
	.wh-whois__card { padding: 24px; }
	.wh-whois__field { grid-template-columns: minmax(0, 1fr); }
	.wh-whois__actions .wh-btn { width: 100%; white-space: normal; }
}

/* Test mode (WH_DOMAINS_MOCK): shown to admins only. */
.wh-mock-notice {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	padding: 10px 16px;
	background: var(--ast-global-color-5);
	border-top: 2px solid var(--ast-global-color-0);
	color: var(--ast-global-color-6);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

/* The WHOIS box sits centred under its heading, as on the other domain pages. */
.wh-whois__form { margin-right: auto; margin-left: auto; }

/* Phones (440px and below, so 390, 360 and 320): each result row stacks. Domain and status, then the
   price, then the buttons at full width; two buttons share the line at equal width, or stack when they
   don't fit. Long domains wrap instead of being cut off. */
@media (max-width: 440px) {
	.wh-result,
	.wh-result.is-exact {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 14px 16px;
	}
	.wh-result.is-exact .wh-result__title { font-size: 17px; }
	.wh-result__actions { display: flex; flex-wrap: wrap; width: 100%; gap: 8px; }
	.wh-result__actions .wh-btn { flex: 1 1 110px; min-width: 0; }
	.wh-whois__card { padding: 20px; }
	.wh-whois__actions { flex-direction: column; align-items: stretch; }
	/* Same weight as the a.wh-btn.wh-btn.wh-btn base rule, so long labels wrap inside the button instead of spilling out. */
	.wh-whois__actions a.wh-btn.wh-btn.wh-btn,
	.wh-result__actions a.wh-btn.wh-btn.wh-btn { white-space: normal; text-align: center; }
	.wh-whois__actions a.wh-btn.wh-btn.wh-btn { width: 100%; }
}
.wh-result:focus-visible { outline: 2px solid var(--ast-global-color-0); outline-offset: 2px; }
