/*!
 * @Rank – Hreflang Generator & Validator: the tool's own rules.
 *
 * The palette, header, cards, buttons, notices and toast all come from
 * assets/css/atrank-core.css. Only what is specific to this tool is here, and
 * every rule is anchored on .atrank-hreflang.
 *
 * Two rules here are function rather than decoration:
 *   · each entry shows the code AND the names it resolves to, side by side —
 *     "en-GB · English · United Kingdom" is checkable at a glance in a way that
 *     "en-GB" is not, and a wrong code usually looks perfectly plausible until
 *     something spells it out;
 *   · the generated block is emphasised as going on EVERY page, because the one
 *     mistake this tool exists to prevent is a different block per page.
 */

.atrank-hreflang .atrank-hreflang-panes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	align-items: start;
}
@media (min-width: 940px) {
	.atrank-hreflang .atrank-hreflang-panes {
		grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
	}
}
.atrank-hreflang .atrank-hreflang-col {
	display: grid;
	gap: 10px;
	min-width: 0;
	align-content: start;
}

.atrank-hreflang .atrank-cardhead {
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}
.atrank-hreflang .atrank-cardhead h2 {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
}
.atrank-hreflang .atrank-cardhead h2 em {
	font-style: italic;
}

.atrank-hreflang .atrank-hreflang-input {
	display: block;
	width: 100%;
	min-width: 0;
	min-height: min(160px, max(110px, 18vh));
	max-height: 36vh;
	resize: vertical;
	padding: 9px 11px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--inset);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
}
.atrank-hreflang .atrank-hreflang-field {
	display: block;
	margin-top: 10px;
}
.atrank-hreflang .atrank-hreflang-label {
	display: block;
	margin-bottom: 3px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--dim);
}
.atrank-hreflang .atrank-hreflang-page {
	display: block;
	width: 100%;
	min-width: 0;
	padding: 6px 9px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--panel);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12.5px;
}
.atrank-hreflang .atrank-hreflang-input:focus,
.atrank-hreflang .atrank-hreflang-page:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: var(--ring);
}

.atrank-hreflang .atrank-hreflang-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}
.atrank-hreflang .atrank-hreflang-preset {
	padding: 3px 9px;
	border: 1px solid var(--line2);
	border-radius: 20px;
	background: var(--panel);
	color: var(--muted);
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
	transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.atrank-hreflang .atrank-hreflang-preset:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.atrank-hreflang .atrank-hreflang-preset:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── Each entry ───────────────────────────────────────────────────────── */
.atrank-hreflang .atrank-hreflang-rows {
	display: grid;
	gap: 5px;
}
.atrank-hreflang .atrank-hreflang-row {
	padding: 6px 9px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--panel2);
	min-width: 0;
}
.atrank-hreflang .atrank-hreflang-row.is-err {
	border-color: var(--err);
	background: var(--err-soft);
}
.atrank-hreflang .atrank-hreflang-row.is-warn {
	border-color: var(--warn);
	background: var(--warn-soft);
}
.atrank-hreflang .atrank-hreflang-row.is-ok {
	border-color: var(--ok);
}

.atrank-hreflang .atrank-hreflang-rowhead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}
.atrank-hreflang .atrank-hreflang-code {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
}
/* The names beside the code: a wrong code looks plausible until something
   spells it out. */
.atrank-hreflang .atrank-hreflang-named {
	font-size: 11.5px;
	color: var(--muted);
}
.atrank-hreflang .atrank-hreflang-url {
	margin-top: 2px;
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--dim);
	overflow-wrap: anywhere;
}
.atrank-hreflang .atrank-hreflang-problem {
	margin-top: 4px;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--muted);
}
.atrank-hreflang .atrank-hreflang-problem.is-err {
	color: var(--err);
	font-weight: 600;
}
.atrank-hreflang .atrank-hreflang-problem.is-warn {
	color: var(--warn);
}

/* ── The output ───────────────────────────────────────────────────────── */
.atrank-hreflang .atrank-hreflang-out {
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--inset);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
	min-height: 2.4em;
	max-height: 30vh;
	overflow-y: auto;
}
.atrank-hreflang .atrank-hreflang-out.is-small {
	font-size: 11px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	max-height: 16vh;
}
