/* Smart Download Redirector - admin screens */

.smartdr-admin .nav-tab-wrapper {
	margin-bottom: 20px;
}

/* Getting started */
.smartdr-start {
	max-width: 1180px;
	margin: 0 0 24px;
	padding: 18px 22px 6px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.smartdr-start h2 {
	margin: 0 0 12px;
	font-size: 15px;
}

.smartdr-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 8px 28px;
	margin: 0;
	list-style: none;
}

.smartdr-steps li {
	display: flex;
	gap: 12px;
	margin: 0 0 12px;
}

.smartdr-steps p {
	margin: 4px 0 8px;
	color: #50575e;
}

.smartdr-steps__mark {
	flex: none;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 2px solid #c3c4c7;
	border-radius: 50%;
	box-sizing: border-box;
}

.smartdr-steps .is-done .smartdr-steps__mark {
	border-color: #00a32a;
	background: #00a32a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.smartdr-steps .is-open .smartdr-steps__mark {
	border-color: #dba617;
}

.smartdr-steps .is-tool .smartdr-steps__mark {
	border-color: #2271b1;
	border-style: dashed;
}

.smartdr-tester__row,
.smartdr-tester__link {
	display: flex;
	gap: 8px;
	align-items: center;
	max-width: 520px;
}

.smartdr-tester__row input {
	flex: 1 1 auto;
	width: auto;
}

.smartdr-tester__result {
	min-height: 1.4em;
	margin: 8px 0;
}

.smartdr-tester__result p {
	margin: 0 0 6px;
	font-weight: 600;
}

.smartdr-tester__result.is-match p {
	color: #00a32a;
}

.smartdr-tester__result.is-direct p {
	color: #50575e;
}

/* Form left, live preview right (stacked on small screens) */
.smartdr-settings-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	max-width: 1180px;
}

@media (min-width: 1280px) {
	.smartdr-settings-layout {
		grid-template-columns: minmax(0, 1fr) 460px;
	}

	.smartdr-settings-preview {
		position: sticky;
		top: 46px;
		max-height: calc(100vh - 62px);
		overflow-y: auto;
	}
}

.smartdr-settings-form .form-table th {
	width: 180px;
}

.smartdr-sub {
	display: inline-block;
	margin: 6px 0 0 24px;
}

.smartdr-sub.is-off {
	opacity: 0.55;
	pointer-events: none;
}

.smartdr-inline-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 8px 0 4px;
}

.smartdr-range {
	width: 220px;
	vertical-align: middle;
}

.smartdr-range-value {
	display: inline-block;
	min-width: 2ch;
	font-weight: 600;
	text-align: right;
}

/* Layout choice */
.smartdr-layouts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	max-width: 560px;
}

.smartdr-layout {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px 12px 38px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

.smartdr-layout input {
	position: absolute;
	top: 14px;
	left: 12px;
	margin: 0;
}

.smartdr-layout:has(input:checked) {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.smartdr-layout__name {
	font-weight: 600;
}

.smartdr-layout__desc {
	color: #50575e;
	font-size: 12px;
	line-height: 1.4;
}

/* Live preview */
.smartdr-settings-preview {
	padding: 18px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.smartdr-settings-preview__head {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 14px;
}

.smartdr-settings-preview__head strong {
	font-size: 14px;
}

.smartdr-settings-preview__head span {
	color: #646970;
	font-size: 12px;
	line-height: 1.5;
}

.smartdr-kinds {
	display: inline-flex;
	margin-bottom: 10px;
}

.smartdr-kinds .button {
	border-radius: 0;
}

.smartdr-kinds .button:first-child {
	border-radius: 3px 0 0 3px;
}

.smartdr-kinds .button:last-child {
	margin-left: -1px;
	border-radius: 0 3px 3px 0;
}

.smartdr-kinds .button[aria-pressed="true"] {
	position: relative;
	border-color: #1d2327;
	background: #1d2327;
	color: #fff;
}

.smartdr-subtitle {
	margin: 1.5em 0 0;
	font-size: 14px;
}

.smartdr-stages {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.smartdr-stages .button[hidden],
.smartdr-preview-slot[hidden] {
	display: none;
}

.smartdr-stages .button[aria-pressed="true"] {
	border-color: #1d2327;
	background: #f0f0f1;
	color: #1d2327;
	box-shadow: inset 0 0 0 1px #1d2327;
}

.smartdr-preview-page {
	padding: 8px 16px;
	border: 1px solid #f0f0f1;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font-size: 15px;
}

.smartdr-preview-page .smartdr {
	margin-block: 1rem;
}

.smartdr-preview-page .smartdr h2 {
	font-family: inherit;
}

/* Statistics: one column, every block uses the same width */
.smartdr-stats {
	max-width: 1180px;
}

.smartdr-stats h2 {
	margin: 28px 0 10px;
}

.smartdr-periods {
	float: none;
	margin: 0 0 16px;
}

.smartdr-kpis {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 20px;
}

.smartdr-kpis--small {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: 12px;
}

.smartdr-kpi {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 16px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.smartdr-kpi__value {
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.smartdr-kpis--small .smartdr-kpi__value {
	font-size: 20px;
}

.smartdr-kpi__label {
	color: #50575e;
}

.smartdr-chart {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.smartdr-chart figcaption {
	margin-bottom: 10px;
	color: #50575e;
}

.smartdr-chart__bars {
	display: grid;
	align-items: end;
	gap: 2px;
	height: 120px;
	border-bottom: 1px solid #dcdcde;
}

.smartdr-chart__bar {
	display: block;
	border-radius: 2px 2px 0 0;
	background: #2271b1;
}

.smartdr-table {
	width: 100%;
	border-color: #dcdcde;
	border-radius: 8px;
	overflow: hidden;
}

.smartdr-stats .description {
	margin-top: 10px;
}

.smartdr-table .num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.smartdr-table__url {
	color: #646970;
	font-size: 12px;
	word-break: break-all;
}

.smartdr-reset {
	margin-top: 24px;
}

/* Dashboard widget */
.smartdr-widget__list {
	margin: 0 0 8px 1.4em;
}

.smartdr-widget__list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.smartdr-widget__url {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.smartdr-widget__more {
	margin: 0;
}
