/*
 * /mon-ip/: loaded by inc/assets.php on that page alone, after checker.css,
 * which brings the panel, the trap of the newsletter form and the FAQ. The
 * page carries sp-reading (inc/setup.php): every colour comes from the
 * theme.css variables, which follow the system dark scheme. No red: the page
 * has no contact button.
 */

/* The Copier button ships hidden; copy.js shows it where the clipboard can be written. */
.sp-ip [hidden] {
	display: none !important;
}

/* Read by screen readers only: "Copié" of copy.js, next to the Copier button. */
.sp-ip .sp-copy-status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

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

.sp-ip-panel {
	display: grid;
	gap: var(--wp--preset--spacing--md);
}

.sp-ip-panel p {
	margin: 0;
}

.sp-ip-label {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
}

.sp-ip-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
}

/* The address large, in mono, selectable, never wider than the panel (an IPv6 wraps). */
.sp-ip-address {
	min-width: 0;
	max-width: 100%;
	font-size: clamp(1.6rem, 5vw, 2.6rem);
	font-weight: 650;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

/* An IPv6 holds up to 39 characters: smaller, so that it keeps to one or two lines on a phone. */
.sp-ip-address--v6 {
	font-size: clamp(1.1rem, 4.2vw, 2rem);
}

.sp-ip-address code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1em;
	background: none;
	padding: 0;
	color: inherit;
}

.sp-ip-line .wp-element-button {
	cursor: pointer;
}

.sp-ip-line .wp-element-button:focus-visible {
	outline: 3px solid var(--sp-focus);
	outline-offset: 2px;
}

.sp-ip-rows {
	margin: 0;
}

.sp-ip-rows > div {
	display: grid;
	grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--md);
	padding-block: var(--wp--preset--spacing--sm);
	border-top: 1px solid var(--wp--preset--color--line);
}

.sp-ip-rows dt {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sp-ip-rows dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

/* Values sit in <code> against wptexturize(): the name in mono, the operator and the country in the text face. */
.sp-ip-rows code {
	padding: 0;
	background: none;
	color: inherit;
	font-size: 1em;
}

.sp-ip-host {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9375em;
}

.sp-ip-rows .sp-ip-text {
	font-family: var(--wp--preset--font-family--text);
}

.sp-ip-v4,
.sp-ip-kept,
.sp-ip-note {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sp-ip-none {
	font-size: var(--wp--preset--font-size--title);
	font-weight: 650;
}

@media (max-width: 480px) {
	.sp-ip-rows > div {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Sections ---------- */

.sp-ip-body > * + * {
	margin-top: var(--wp--preset--spacing--md);
}

.sp-ip-body p,
.sp-ip-steps {
	margin-bottom: 0;
}

.sp-ip-steps {
	padding-left: 1.25em;
}

.sp-ip-steps li + li {
	margin-top: var(--wp--preset--spacing--sm);
}
