/* Search Engine Rankings Checker */

/* Match the wide table tools (rank checker / keyword research). */
.svt-wrap[data-tool="domain-rankings"] {
	max-width: 1040px;
}

/* One row (same pattern as the traffic checker): domain grows, country +
   button hug it; everything bottom-aligned so the button lines up with
   the labelled inputs. The shared .svt-form is a flex row — this module
   stacks the input row above the inline validation message instead. */
.svt-wrap[data-tool="domain-rankings"] .svt-drk-form {
	display: block;
}

.svt-drk-inputrow {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-end;
	gap: 14px;
	width: 100%;
}

.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-domain {
	flex: 1 1 auto;
	min-width: 0;
}

.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-market {
	flex: 0 0 190px;
}

.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-market .svt-select {
	width: 100%;
	cursor: pointer;
}

.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-submit {
	flex: 0 0 auto;
}

.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-submit .svt-button {
	/* Match the 49px rendered height of the input and select beside it. */
	height: 49px;
	padding-top: 0;
	padding-bottom: 0;
	white-space: nowrap;
}

/* Summary cards — same design as the backlinks checker overview cards. */
.svt-drk-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin: 22px 0;
}

@media (max-width: 700px) {
	.svt-drk-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

.svt-drk-card {
	background: var(--svt-tile);
	border: 2px solid var(--svt-border);
	border-radius: var(--svt-radius-sm);
	padding: 16px 18px;
	text-align: center;
}

.svt-drk-cardnum {
	font-size: 26px;
	font-weight: 800;
	color: var(--svt-text);
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.svt-drk-cardlabel {
	margin-top: 5px;
	font-size: 12px;
	color: var(--svt-muted);
}

/* Toolbar: filter + export on one row. */
.svt-drk-toolbar {
	display: flex;
	gap: 12px;
	align-items: stretch;
	margin: 0 0 14px;
	flex-wrap: wrap;
}

.svt-drk-toolbar .svt-drk-filter {
	flex: 1 1 220px;
	height: 47px;
}

.svt-drk-toolbar .svt-drk-export {
	flex: 0 0 auto;
	height: 47px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

/* Table cells. */
.svt-drk-cell-kw {
	font-weight: 600;
	color: var(--svt-heading, #1a1a2e);
}

.svt-drk-cell-url {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.svt-drk-url {
	color: var(--svt-primary, #5a4ff3);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.svt-drk-url:hover {
	text-decoration: underline;
}

.svt-drk-url svg {
	flex: 0 0 auto;
}

/* Position / difficulty pills: text carries meaning, colour reinforces. */
.svt-drk-pill {
	display: inline-block;
	min-width: 44px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

.svt-drk-pill.is-top {
	background: #e2f7e9;
	color: #14683a;
}

.svt-drk-pill.is-good {
	background: #e8f0fe;
	color: #1d4fd7;
}

.svt-drk-pill.is-mid {
	background: #fff4dc;
	color: #8a5a00;
}

.svt-drk-pill.is-low {
	background: #fde8e8;
	color: #a12626;
}

.svt-drk-norows {
	text-align: center;
	color: var(--svt-muted, #6b6b80);
	padding: 22px 12px;
}

/* Data provenance footnote (same treatment as the keyword research tool). */
.svt-drk-datanote {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--svt-muted);
	line-height: 1.55;
}

/* Teaser + cross-links. */
.svt-drk-teaser {
	margin: 16px 0 6px;
	font-size: 14px;
	color: var(--svt-muted, #6b6b80);
	text-align: center;
}

.svt-drk-crossrow {
	display: flex;
	justify-content: center;
	gap: 26px;
	flex-wrap: wrap;
	margin: 4px 0 6px;
}

.svt-drk-crosslink {
	color: var(--svt-primary, #5a4ff3);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.svt-drk-crosslink:hover {
	text-decoration: underline;
}

/* Empty state. */
.svt-drk-empty {
	border: 1px dashed var(--svt-border, #e3e3ef);
	border-radius: var(--svt-radius, 10px);
	padding: 34px 22px;
	text-align: center;
	margin: 22px 0;
	color: var(--svt-muted, #6b6b80);
}

.svt-drk-emptytitle {
	font-size: 17px;
	font-weight: 700;
	color: var(--svt-heading, #1a1a2e);
	margin: 0 0 8px;
}

/* Mobile: form stacks, cards go 2×2, export goes full width. */
@media (max-width: 640px) {
	.svt-drk-inputrow {
		flex-wrap: wrap;
	}

	.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-domain {
		flex: 1 1 100%;
	}

	.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-market {
		flex: 1 1 auto;
	}

	.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-submit {
		flex: 1 1 100%;
	}

	.svt-wrap[data-tool="domain-rankings"] .svt-drk-field-submit .svt-button {
		width: 100%;
	}

	.svt-drk-toolbar .svt-drk-export {
		flex: 1 1 100%;
		justify-content: center;
	}
}
