.adzworld-admin,
.adzworld-desk {
	max-width: 1200px;
}

.adzworld-admin .nav-tab-wrapper {
	margin-bottom: 0;
}

.adzworld-admin .adzworld-settings-tabs {
	border-bottom: 1px solid #c3c4c7;
	margin-bottom: 12px;
	padding: 6px 0 0;
}

.adzworld-admin .adzworld-settings-tabs::after {
	clear: both;
	content: "";
	display: block;
}

.adzworld-admin .adzworld-settings-tabs .nav-tab {
	background-color: #e9edf1 !important;
	border: 1px solid #b9bfc6 !important;
	border-bottom-color: #9ea5ad !important;
	border-radius: 3px 3px 0 0;
	color: #1f2933 !important;
	display: block;
	float: left;
	line-height: 1.4;
	margin: 0 6px 6px 0;
	padding: 8px 14px;
	text-align: left;
	vertical-align: top;
}

.adzworld-admin .adzworld-settings-tabs .nav-tab:hover,
.adzworld-admin .adzworld-settings-tabs .nav-tab:focus {
	background-color: #dde4ea !important;
	border-color: #aab2bb !important;
	color: #1d2327 !important;
}

.adzworld-admin .adzworld-settings-tabs .nav-tab.nav-tab-active {
	background-color: #fff !important;
	border-bottom-color: #fff !important;
	border-color: #8c939a !important;
	color: #11161a !important;
	margin: 0 6px 6px 0;
}

.adzworld-settings-title {
	align-items: center;
	display: flex;
	gap: 10px;
}

.adzworld-settings-version {
	background: #f0f0f1;
	border-radius: 2px;
	color: #50575e;
	font-size: 12px;
	font-weight: 400;
	padding: 3px 10px;
}

.adzworld-desk-intro {
	max-width: 840px;
}

.adzworld-desk-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.adzworld-desk-card,
.adzworld-desk-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-sizing: border-box;
	padding: 20px;
}

.adzworld-desk-card h3 {
	margin-top: 0;
}

.adzworld-desk-card strong {
	display: block;
	font-size: 28px;
	line-height: 1.2;
}

.adzworld-earnings-grid .adzworld-desk-card strong {
	font-size: 18px;
}

.adzworld-desk-section {
	margin: 18px 0;
}

.adzworld-desk-section legend {
	font-size: 18px;
	font-weight: 600;
	padding: 0 6px;
}

.adzworld-support-card {
	max-width: 720px;
	margin-top: 20px;
}

.adzworld-support-card h2 {
	margin-top: 0;
}

.adzworld-connections {
	max-width: 1200px;
}

.adzworld-connections > hr {
	border: 0;
	border-top: 1px solid #c3c4c7;
	margin: 32px 0;
}

.adzworld-connections__lead {
	font-size: 15px;
	max-width: 880px;
}

.adzworld-connection-grid,
.adzworld-managed-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	margin: 18px 0;
}

.adzworld-connection-card,
.adzworld-managed-card,
.adzworld-provider-bridge {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	box-sizing: border-box;
	padding: 18px;
}

.adzworld-connection-card legend {
	font-size: 18px;
	font-weight: 600;
	padding: 0 6px;
}

.adzworld-connection-card input[type="text"],
.adzworld-connection-card select,
.adzworld-provider-fields input {
	max-width: 100%;
	width: 100%;
}

.adzworld-connection-status {
	background: #f0f0f1;
	border-radius: 2px;
	color: #50575e;
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
}

.adzworld-connection-status.is-enabled {
	background: #edfaef;
	color: #116329;
}

.adzworld-connection-steps {
	margin-left: 20px;
}

.adzworld-connection-steps li {
	margin-bottom: 10px;
}

.adzworld-connection-links {
	border-top: 1px solid #dcdcde;
	font-size: 12px;
	padding-top: 10px;
}

.adzworld-network-add {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0 18px;
}

.adzworld-network-add p {
	margin: 0;
}

.adzworld-network-add select {
	min-width: 280px;
}

.adzworld-network-param {
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(140px, 220px) minmax(180px, 1fr);
	margin: 0 0 8px;
}

.adzworld-network-param p {
	margin: 0;
}

.adzworld-managed-card h4 {
	font-size: 17px;
	margin: 0 0 8px;
}

.adzworld-managed-card > strong {
	color: #50575e;
	display: block;
	font-size: 12px;
}

.adzworld-connection-actions .button {
	margin: 0 5px 5px 0;
}

.adzworld-provider-bridge {
	margin: 24px 0;
}

.adzworld-provider-bridge h3 {
	margin-top: 0;
}

.adzworld-provider-fields {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) minmax(260px, 2fr);
}

.adzworld-provider-fields p {
	margin-bottom: 0;
}

.adzworld-connections-affiliates > h2 {
	margin-top: 0;
}

.adzworld-pay {
	background: #fff;
	border: 1px solid #c3c4c7;
	margin: 8px 0 28px;
	max-width: 1200px;
	padding: 4px 18px 18px;
}

.adzworld-pay-progress {
	font-weight: 600;
	margin: 0 0 8px;
}

.adzworld-pay-list {
	display: grid;
	gap: 10px;
}

.adzworld-pay-account {
	border: 1px solid #dcdcde;
	border-radius: 3px;
	padding: 12px 14px;
	scroll-margin-top: 48px;
}

.adzworld-pay-account.is-ready {
	background: #f6fbf7;
	border-color: #b8e0c2;
}

.adzworld-pay-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.adzworld-pay-head h3 {
	flex: 1 1 180px;
	font-size: 15px;
	margin: 0;
}

.adzworld-pay-pays {
	color: #50575e;
	flex: 1 1 240px;
	margin: 0;
}

.adzworld-pay-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0;
}

.adzworld-pay-actions .button {
	margin: 0;
}

.adzworld-pay-account summary {
	color: #2271b1;
	cursor: pointer;
	font-weight: 600;
	width: fit-content;
}

.adzworld-pay-account summary:focus {
	box-shadow: 0 0 0 1px #2271b1;
	outline: 2px solid transparent;
}

.adzworld-pay-steps {
	margin: 8px 0 0 20px;
}

.adzworld-pay-steps li {
	margin: 0 0 8px;
}

#adzworld-add-preset,
.adzworld-connection-card {
	scroll-margin-top: 48px;
}

@media screen and (max-width: 782px) {
	.adzworld-connection-grid,
	.adzworld-managed-grid,
	.adzworld-provider-fields,
	.adzworld-network-param {
		grid-template-columns: 1fr;
	}

	.adzworld-network-add {
		display: block;
	}

	.adzworld-network-add select,
	.adzworld-network-param input {
		max-width: 100%;
		width: 100%;
	}

	.adzworld-pay-head {
		align-items: flex-start;
	}
}

.adzworld-rotation-admin {
	max-width: 1100px;
}

.adzworld-rotation-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 18px 0;
}

.adzworld-rotation-meta {
	align-items: end;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(280px, 1.3fr);
	margin-bottom: 18px;
	padding: 18px;
}

.adzworld-rotation-meta p {
	margin: 0;
}

.adzworld-rotation-meta input {
	max-width: 100%;
	width: 100%;
}

.adzworld-rotation-shortcode span {
	font-weight: 600;
}

.adzworld-rotation-shortcode code {
	display: inline-block;
	max-width: 100%;
	overflow-wrap: anywhere;
	padding: 6px 8px;
}

.adzworld-admin-slots {
	display: grid;
	gap: 14px;
}

.adzworld-admin-slot {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	box-sizing: border-box;
	padding: 16px;
}

.adzworld-admin-slot > header {
	align-items: center;
	border-bottom: 1px solid #dcdcde;
	display: flex;
	justify-content: space-between;
	margin: -2px 0 14px;
	padding-bottom: 10px;
}

.adzworld-admin-slot > header > strong {
	font-size: 16px;
}

.adzworld-admin-slot__actions {
	display: flex;
	gap: 5px;
}

.adzworld-admin-slot > label {
	display: block;
	font-weight: 600;
}

.adzworld-admin-slot > label select {
	display: block;
	font-weight: 400;
	margin-top: 5px;
	max-width: 720px;
	width: 100%;
}

.adzworld-admin-slot__preview {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	margin-top: 14px;
	padding: 14px;
}

.adzworld-admin-slot-preview {
	margin-bottom: 12px;
}

.adzworld-admin-slot-preview .adz-panel,
.adzworld-admin-slot-preview .adzworld-creative,
.adzworld-admin-slot-preview .adzworld-caption,
.adzworld-admin-slot-preview .adzworld-provider {
	max-width: 820px;
}

.adzworld-rotation-controls {
	margin: 18px 0;
}

@media screen and (max-width: 782px) {
	.adzworld-rotation-meta {
		grid-template-columns: 1fr;
	}

	.adzworld-admin-slot > header {
		align-items: flex-start;
		gap: 10px;
	}
}

/* ==========================================================================
   Display format reference (Rotation tab)
   ==========================================================================
   Generated from adzworld_rotation_display_formats() and
   adzworld_rotation_size_presets(), so this section cannot drift out of step
   with what the shortcode accepts.

   Each entry carries a small swatch drawn in CSS rather than an image: the
   shape of the swatch is the shape of the frame, so the list can be read at a
   glance without loading anything.
   ========================================================================== */

.adzworld-format-gallery {
	--adzf-line: #c3c4c7;
	--adzf-ink: #1f2933;
	--adzf-muted: #646970;
	--adzf-accent: #3e6d86;
	--adzf-surface: #fff;
	--adzf-sunken: #f4f7f9;

	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--adzf-line);
}

.adzworld-format-gallery h2 {
	margin: 0 0 4px;
	font-size: 16px;
}

.adzworld-format-intro {
	max-width: 70ch;
	margin: 0 0 16px;
	color: var(--adzf-muted);
}

.adzworld-format-group {
	margin: 20px 0 8px;
	color: var(--adzf-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.adzworld-format-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.adzworld-format {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px;
	background: var(--adzf-surface);
	border: 1px solid var(--adzf-line);
	border-radius: 6px;
}

.adzworld-format-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.adzworld-format-name {
	color: var(--adzf-ink);
	font-size: 13px;
}

.adzworld-format-note {
	color: var(--adzf-muted);
	font-size: 12px;
	line-height: 1.45;
}

.adzworld-format-code {
	margin-top: 4px;
	padding: 4px 6px;
	overflow-wrap: anywhere;
	color: var(--adzf-ink);
	font-size: 11px;
	background: var(--adzf-sunken);
	border-radius: 3px;
}

/* ------------------------------------------------------- swatch geometry */

/*
 * Every swatch is the same box. What differs is where the filled block sits
 * inside it, which is what distinguishes the formats from each other.
 */
.adzworld-format-swatch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 36px;
	overflow: hidden;
	background: var(--adzf-sunken);
	border: 1px solid var(--adzf-line);
	border-radius: 3px;
}

.adzworld-format-swatch::before,
.adzworld-format-swatch::after {
	content: "";
	position: absolute;
	background: var(--adzf-accent);
}

/* Carousel: one centred block, with neighbours peeking for the wider ones. */
.adzworld-format-swatch--single::before {
	inset: 7px 11px;
	border-radius: 2px;
}

.adzworld-format-swatch--flat::before {
	inset: 9px 4px 9px 14px;
	border-radius: 2px;
}

.adzworld-format-swatch--flat::after {
	inset: 9px 36px 9px 2px;
	opacity: 0.35;
	border-radius: 2px;
}

.adzworld-format-swatch--3d::before {
	inset: 6px 13px;
	border-radius: 2px;
}

.adzworld-format-swatch--3d::after {
	inset: 11px 2px 11px 36px;
	opacity: 0.3;
	border-radius: 2px;
}

.adzworld-format-swatch--coverflow::before {
	inset: 6px 14px;
	border-radius: 2px;
}

.adzworld-format-swatch--coverflow::after {
	inset: 11px 2px 11px 2px;
	opacity: 0.28;
	border-radius: 2px;
}

.adzworld-format-swatch--fade::before {
	inset: 7px 9px;
	opacity: 0.45;
	border-radius: 2px;
}

.adzworld-format-swatch--fade::after {
	inset: 11px 13px;
	border-radius: 2px;
}

.adzworld-format-swatch--stack::before {
	inset: 4px 8px 12px;
	opacity: 0.3;
	border-radius: 2px;
}

.adzworld-format-swatch--stack::after {
	inset: 10px 6px 6px;
	border-radius: 2px;
}

/* Multiple: repeated blocks. */
/*
 * Repeated blocks are drawn with offset box-shadow copies of one element. A
 * blend mode over transparent gradient stops does not render reliably across
 * browsers, and these swatches have to be legible rather than clever.
 */
.adzworld-format-swatch--filmstrip::before {
	top: 10px;
	left: 3px;
	width: 11px;
	height: 16px;
	border-radius: 2px;
	box-shadow:
		15px 0 0 var(--adzf-accent),
		30px 0 0 var(--adzf-accent);
}

.adzworld-format-swatch--grid::before {
	top: 5px;
	left: 5px;
	width: 16px;
	height: 11px;
	border-radius: 2px;
	box-shadow:
		20px 0 0 var(--adzf-accent),
		0 15px 0 var(--adzf-accent),
		20px 15px 0 var(--adzf-accent);
}

/* Banner: wide and short, billboard taller. */
.adzworld-format-swatch--banner::before {
	inset: 14px 4px;
	border-radius: 2px;
}

.adzworld-format-swatch--billboard::before {
	inset: 8px 4px;
	border-radius: 2px;
}

/* Widget: a bordered card. */
.adzworld-format-swatch--inline-card::before {
	inset: 6px 8px;
	border-radius: 3px;
}

.adzworld-format-swatch--sidebar::before {
	inset: 5px 26px 5px 5px;
	border-radius: 3px;
}

/* Vertical: a tall block on one side. */
.adzworld-format-swatch--rail-left::before {
	inset: 4px 34px 4px 3px;
	border-radius: 2px;
}

.adzworld-format-swatch--rail-right::before {
	inset: 4px 3px 4px 34px;
	border-radius: 2px;
}

.adzworld-format-swatch--skyscraper::before {
	inset: 3px 15px;
	border-radius: 2px;
}

/* Anchored: pinned to an edge or a corner. */
.adzworld-format-swatch--dock-bottom::before {
	inset: auto 2px 2px;
	height: 10px;
	border-radius: 2px;
}

.adzworld-format-swatch--dock-top::before {
	inset: 2px 2px auto;
	height: 10px;
	border-radius: 2px;
}

.adzworld-format-swatch--corner::before {
	inset: auto 3px 3px auto;
	width: 20px;
	height: 14px;
	border-radius: 2px;
}

/* ----------------------------------------------------------- sizes table */

.adzworld-format-sizes {
	width: 100%;
	max-width: 620px;
	border-collapse: collapse;
}

.adzworld-format-sizes th,
.adzworld-format-sizes td {
	padding: 7px 10px;
	text-align: left;
	border-bottom: 1px solid var(--adzf-line);
}

.adzworld-format-sizes th {
	color: var(--adzf-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.adzworld-format-sizes tbody tr:hover {
	background: var(--adzf-sunken);
}

.adzworld-format-sizes code {
	font-size: 11px;
	background: var(--adzf-sunken);
}

/* ==========================================================================
   Design pass: hierarchy, spacing, focus
   ==========================================================================
   Added rather than rewritten, so the existing six-tab structure, the slot
   previews and the per-slot refresh controls keep their behaviour.
   ========================================================================== */

/*
 * A visible focus ring on every interactive control in the desk. The WordPress
 * default is easy to lose against the light panels this plugin uses, and
 * keyboard operation of the rotation editor depends on being able to see where
 * focus is.
 */
.adzworld-admin :is(a, button, input, select, textarea, summary):focus-visible,
.adzworld-desk :is(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid #3e6d86;
	outline-offset: 1px;
	box-shadow: none;
}

/* Breathing room between the stacked sections of each tab. */
.adzworld-desk-section + .adzworld-desk-section {
	margin-top: 24px;
}

/*
 * The rotation editor's slot rows. Each row is a unit, so it reads as one
 * thing rather than a run of loose controls, and the populated preview sits
 * with the row it belongs to.
 */
.adzworld-admin-slots {
	display: grid;
	gap: 10px;
}

.adzworld-admin-slot {
	padding: 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
}

.adzworld-admin-slot:focus-within {
	border-color: #3e6d86;
}

.adzworld-admin-slot-preview {
	margin-top: 8px;
	padding: 10px;
	background: #f4f7f9;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

/* Long shortcode strings must wrap rather than widen the page. */
.adzworld-rotation-shortcode code,
.adzworld-admin code {
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {

	.adzworld-admin *,
	.adzworld-desk * {
		transition: none !important;
		animation: none !important;
	}
}

@media (max-width: 782px) {

	/* WordPress' own mobile admin breakpoint. */
	.adzworld-format-list {
		grid-template-columns: 1fr;
	}

	.adzworld-format-sizes {
		max-width: none;
	}
}

/* ==========================================================================
   Starter packs tab
   ==========================================================================
   One card per pack. Each states what it will create, what state it is in, and
   what happens to what it created, because a control that generates content on
   someone's site should say so before it is pressed rather than after.
   ========================================================================== */

.adzworld-starter-intro {
	max-width: 70ch;
	margin: 0 0 20px;
	color: #646970;
}

.adzworld-starter-packs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: 14px;
	align-items: start;
}

.adzworld-starter-pack {
	min-width: 0;
	padding: 18px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left: 3px solid #3e6d86;
	border-radius: 6px;
}

.adzworld-starter-pack__name {
	margin: 0 0 6px;
	font-size: 15px;
}

.adzworld-starter-pack__note {
	max-width: 62ch;
	margin: 0 0 14px;
	color: #50575e;
}

.adzworld-starter-state {
	margin: 0 0 12px;
	padding: 8px 12px;
	background: #f4f7f9;
	border-radius: 4px;
	font-size: 13px;
}

.adzworld-starter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.adzworld-starter-note {
	margin: 12px 0 0;
	color: #646970;
	font-size: 12px;
}

@media (max-width: 782px) {

	.adzworld-starter-packs {
		grid-template-columns: 1fr;
	}
}

/* Placements inside a starter pack card: where it goes, and what to paste. */
.adzworld-starter-placements {
	display: grid;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}

.adzworld-starter-placement {
	display: grid;
	gap: 3px;
	min-width: 0;
	padding: 9px 11px;
	background: #f4f7f9;
	border-radius: 4px;
}

.adzworld-starter-placement__where {
	color: #50575e;
	font-size: 12px;
	font-weight: 600;
}

.adzworld-starter-placement__code {
	overflow-wrap: anywhere;
	font-size: 11.5px;
	background: transparent;
}

.adzworld-starter-state--blocked {
	background: #fdf6e3;
	border-left: 3px solid #dba617;
}

.adzworld-manual-step {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	margin: 0 0 12px;
	padding: 14px 16px;
}

.adzworld-manual-step h3 {
	margin: 0 0 8px;
}

.adzworld-manual-state {
	font-size: 12px;
	font-weight: 600;
	margin: 0 0 8px;
}

.adzworld-manual-step.is-done {
	border-color: #68de7c;
}

.adzworld-manual-step.is-waiting {
	background: #f6f7f7;
}

.adzworld-manual-step code {
	display: inline-block;
	overflow-wrap: anywhere;
}

.adzworld-manual-table {
	background: #fff;
	border-collapse: collapse;
	margin: 12px 0 18px;
	width: 100%;
}

.adzworld-manual-table th,
.adzworld-manual-table td {
	border-bottom: 1px solid #dcdcde;
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.adzworld-manual-builder {
	background: #fff;
	border: 1px solid #c3c4c7;
	margin: 0 0 20px;
	padding: 16px;
}

.adzworld-manual-shortcode {
	display: block;
	margin: 8px 0 16px;
	overflow-wrap: anywhere;
}

.adzworld-manual-chapters {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.adzworld-provider-placeholder {
	background: #f6f7f7;
	border: 1px dashed #8c939a;
	min-height: 120px;
	padding: 16px;
}

/* ==========================================================================
   Get Paid
   ==========================================================================
   One card per provider. The card is the connection: registration, the
   identifiers, and the switch that turns it on, in one place. Built from
   core's own postbox and form-table so the screen reads as part of
   WordPress rather than as something bolted onto it. */

.adzworld-paid-summary {
	max-width: 70ch;
	margin: 0 0 1.5em;
	font-size: 14px;
}

.adzworld-paid-group {
	margin: 2.2em 0 0.2em;
	padding-top: 1.2em;
	border-top: 1px solid #dcdcde;
	font-size: 1.15em;
}

.adzworld-paid-group + .description {
	max-width: 70ch;
	margin-bottom: 1.2em;
}

/*
 * Two columns is the layout. One column when the form is narrower than two
 * cards. There is no third column. The query is on the form because the
 * admin menu already uses part of the window.
 */
form:has(> .adzworld-paid-grid) {
	container-name: adzworld-paid;
	container-type: inline-size;
}

.adzworld-paid-actions .submit {
	margin: 0 0 16px;
	padding: 0;
}

.adzworld-paid-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	width: 100%;
	min-width: 0;
}

@container adzworld-paid (max-width: 759px) {
	.adzworld-paid-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media screen and (max-width: 782px) {
	.adzworld-paid-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.adzworld-paid-card {
	margin: 0;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.adzworld-paid-card > .postbox-header .hndle {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: baseline;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	padding: 12px 16px;
}

.adzworld-paid-card > .inside {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	padding: 4px 16px 16px;
}

.adzworld-paid-name {
	font-size: 14px;
}

.adzworld-paid-serves {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

/*
 * The one place on this screen where colour carries meaning: whether the
 * reader's own words reach the provider. Both tones clear 4.5:1 on the card.
 */
.adzworld-paid-serves--adz { color: #0a6848; }
.adzworld-paid-serves--sads { color: #8a6116; }

.adzworld-paid-state {
	margin: 0 0 10px;
}

.adzworld-paid-state .notice {
	margin: 0;
	padding: 2px 10px;
}

.adzworld-paid-pays {
	font-style: italic;
}

.adzworld-paid-steps {
	margin: 10px 0;
	padding: 8px 12px;
	background: #f6f7f7;
	border-radius: 3px;
}

.adzworld-paid-steps summary {
	font-weight: 600;
	cursor: pointer;
}

.adzworld-paid-steps ol {
	margin: 10px 0 2px 1.4em;
	font-size: 13px;
}

.adzworld-paid-steps li {
	margin-bottom: 6px;
}

/*
 * Core keeps a form-table as label beside field, and .regular-text is 25em.
 * Inside a card that pair is wider than the card, so the controls paint
 * outside the border. Stack the label over the field and lock the control
 * to the card's content box. body.wp-admin raises the selector above forms.css.
 */
body.wp-admin .adzworld-paid-card table.form-table,
body.wp-admin .adzworld-paid-card table.form-table > tbody,
body.wp-admin .adzworld-paid-card table.form-table tr,
body.wp-admin .adzworld-paid-card table.form-table > tbody > tr > th,
body.wp-admin .adzworld-paid-card table.form-table > tbody > tr > td {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	float: none;
}

body.wp-admin .adzworld-paid-card table.form-table > tbody > tr > th {
	padding: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
}

body.wp-admin .adzworld-paid-card table.form-table > tbody > tr > td {
	padding: 4px 0 12px;
}

body.wp-admin .adzworld-paid-card table.form-table input.regular-text,
body.wp-admin .adzworld-paid-card table.form-table input.code,
body.wp-admin .adzworld-paid-card table.form-table input[type="text"],
body.wp-admin .adzworld-paid-card table.form-table select,
body.wp-admin .adzworld-paid-card .adzworld-connection-card input[type="text"],
body.wp-admin .adzworld-paid-card .adzworld-connection-card select {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	box-sizing: border-box;
}

.adzworld-paid-card .description,
.adzworld-paid-card code,
.adzworld-paid-card label {
	overflow-wrap: break-word;
}

.adzworld-paid-card .adzworld-connection-card {
	min-width: 0;
	max-width: 100%;
	margin: 12px 0 0;
	background: transparent;
	border: 0;
	border-top: 1px solid #dcdcde;
	border-radius: 0;
	padding: 12px 0 0;
}

.adzworld-paid-card .adzworld-connection-card legend {
	padding: 0;
	font-size: 13px;
}

/* ==========================================================================
   Internal Adz
   ==========================================================================
   One horizontal row per category. A row scrolls sideways rather than
   wrapping, so a category stays one readable line however many adz it holds
   and the rows stay comparable down the page.

   A preview is the adz itself, not a thumbnail: its own markup, in a box of
   its declared dimensions, scaled to the card width. What is on screen is the
   adz at its true proportions. */

.adz-int-intro,
.adz-int-summary {
	max-width: 72ch;
}

.adz-int-summary {
	margin: 0 0 1.5em;
	font-size: 14px;
}

.adz-int-row {
	margin: 0 0 2em;
}

.adz-int-row__head {
	display: flex;
	gap: 10px;
	align-items: baseline;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #dcdcde;
	font-size: 14px;
}

.adz-int-row__count {
	padding: 1px 8px;
	color: #50575e;
	font-size: 11px;
	font-weight: 600;
	background: #f0f0f1;
	border-radius: 999px;
}

/*
 * A strip, not a grid. Scroll snapping makes a sideways row land on a card
 * instead of between two, which is the difference between a strip that reads
 * and one that feels broken.
 */
.adz-int-strip {
	display: flex;
	gap: 16px;

	/*
	 * Cards size to their own content. Without this a 728x90 card stretches
	 * to match a 300x250 beside it and carries the difference as dead space.
	 */
	align-items: flex-start;
	margin: 0;
	padding: 2px 2px 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	list-style: none;
	overscroll-behavior-x: contain;
}

.adz-int-card {
	--adz-int-card-w: 260;
	--adz-int-w: 260;
	--adz-int-h: 160;

	flex: 0 0 calc(var(--adz-int-card-w) * 1px);
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.adz-int-card--300x250 { --adz-int-w: 300; --adz-int-h: 250; }
.adz-int-card--336x280 { --adz-int-w: 336; --adz-int-h: 280; }
.adz-int-card--250x250 { --adz-int-w: 250; --adz-int-h: 250; }
.adz-int-card--200x200 { --adz-int-w: 200; --adz-int-h: 200; }
.adz-int-card--180x150 { --adz-int-w: 180; --adz-int-h: 150; }
.adz-int-card--728x90 { --adz-int-w: 728; --adz-int-h: 90; }
.adz-int-card--970x90 { --adz-int-w: 970; --adz-int-h: 90; }
.adz-int-card--970x250 { --adz-int-w: 970; --adz-int-h: 250; }
.adz-int-card--468x60 { --adz-int-w: 468; --adz-int-h: 60; }
.adz-int-card--234x60 { --adz-int-w: 234; --adz-int-h: 60; }
.adz-int-card--300x600 { --adz-int-w: 300; --adz-int-h: 600; }
.adz-int-card--160x600 { --adz-int-w: 160; --adz-int-h: 600; }
.adz-int-card--120x600 { --adz-int-w: 120; --adz-int-h: 600; }
.adz-int-card--320x50 { --adz-int-w: 320; --adz-int-h: 50; }
.adz-int-card--320x100 { --adz-int-w: 320; --adz-int-h: 100; }

/*
 * The preview box takes the adz's aspect ratio, and the adz is drawn inside
 * it at its real pixel size then scaled down to the card width. Scaling the
 * element rather than resizing it keeps type, spacing and image crops in the
 * proportions the adz will actually serve at.
 */
.adz-int-preview {
	position: relative;
	aspect-ratio: var(--adz-int-w) / var(--adz-int-h);
	overflow: hidden;
	background:
		repeating-conic-gradient(#f6f7f7 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
	border-bottom: 1px solid #dcdcde;
	border-radius: 3px 3px 0 0;
}

.adz-int-preview__inner {
	position: absolute;
	top: 0;
	left: 0;
	width: calc(var(--adz-int-w) * 1px);
	height: calc(var(--adz-int-h) * 1px);
	transform: scale(calc(var(--adz-int-card-w) / var(--adz-int-w)));
	transform-origin: top left;
}

/* A preview is a picture of the adz, not a working copy of it. */
.adz-int-preview__inner a {
	pointer-events: none;
}

.adz-int-preview__inner img,
.adz-int-preview__inner video {
	max-width: 100%;
	height: auto;
}

.adz-int-preview__empty {
	display: flex;
	align-items: center;
	height: 100%;
	margin: 0;
	padding: 0 14px;
	color: #646970;
	font-size: 12px;
	font-style: italic;
	text-align: center;
}

.adz-int-meta {
	padding: 10px 12px 12px;
}

.adz-int-title {
	margin: 0 0 6px;
	overflow: hidden;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.adz-int-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0 0 10px;
}

.adz-int-size {
	padding: 1px 7px;
	color: #3c434a;
	font-family: Menlo, Consolas, monospace;
	font-size: 11px;
	background: #f0f0f1;
	border-radius: 3px;
}

.adz-int-flag {
	padding: 1px 7px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 3px;
}

.adz-int-flag--ready { color: #00543a; background: #e4f5ee; }
.adz-int-flag--draft { color: #674a00; background: #fcf3dc; }
.adz-int-flag--nolink { color: #8a2424; background: #fbeaea; }
.adz-int-flag--stripped { color: #8a2424; background: #fbeaea; cursor: help; }

.adz-int-actions {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.adz-int-strip { scroll-behavior: auto; }
}

/* A short note under a field, where a paragraph would be too loud. */
.adzworld-paid-hint {
	display: block;
	margin-top: 4px;
	color: #646970;
	font-size: 12px;
	line-height: 1.4;
}

/* Keep a save control beside the card that was edited. */
.adzworld-paid-save {
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid #dcdcde;
	text-align: right;
}

.adzworld-paid-checklist {
	margin-top: 16px;
	padding: 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
}

.adzworld-paid-checklist h3 {
	margin: 0 0 10px;
}

.adzworld-paid-requirements {
	margin: 0 0 12px;
}

.adzworld-paid-requirement {
	margin: 6px 0;
}

.adzworld-paid-requirement-state {
	display: inline-block;
	min-width: 58px;
	margin-right: 6px;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	border-radius: 2px;
}

.adzworld-paid-requirement--complete .adzworld-paid-requirement-state {
	color: #00543a;
	background: #e4f5ee;
}

.adzworld-paid-requirement--missing .adzworld-paid-requirement-state {
	color: #674a00;
	background: #fcf3dc;
}

/*
 * AdzLogs: one expandable card per journey, laid out like FLOSC Chat Logs.
 * Adz speak on the left, the reader on the right, and a thin labelled rule
 * marks each move to a different rotation slot.
 */
.adzworld-logs__toolbar {
	align-items: baseline;
	display: flex;
	gap: 12px;
}

.adzworld-logs__count {
	color: #646970;
	font-size: 13px;
}

.adzworld-logs__empty {
	background: #fff;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	color: #646970;
	padding: 16px;
}

.adzworld-logs__list {
	margin-top: 12px;
}

.adzworld-journey-row {
	align-items: flex-start;
	display: flex;
	gap: 10px;
	margin: 0 0 10px;
}

.adzworld-journey-row__select {
	margin-top: 14px !important;
}

.adzworld-journey {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	flex: 1 1 auto;
	min-width: 0;
}

.adzworld-journey[open] {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.adzworld-journey__head {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 10px;
	list-style: none;
	padding: 11px 14px;
}

.adzworld-journey__head::-webkit-details-marker {
	display: none;
}

.adzworld-journey__head:hover {
	background: #f6f7f7;
}

.adzworld-journey__chevron {
	color: #2271b1;
	font-size: 12px;
	transition: transform 0.2s ease;
}

.adzworld-journey[open] .adzworld-journey__chevron {
	transform: rotate(90deg);
}

.adzworld-journey__title {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.adzworld-journey__id {
	background: #f0f0f1;
	border-radius: 3px;
	font-size: 11px;
	padding: 1px 6px;
}

.adzworld-journey__meta {
	color: #50575e;
	font-size: 12px;
	white-space: nowrap;
}

.adzworld-journey__preview {
	color: #646970;
	font-size: 12px;
	margin-left: auto;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.adzworld-journey__body {
	background: #fcfcfc;
	border-top: 1px solid #f0f0f1;
	padding: 12px 16px 16px;
}

.adzworld-msg {
	margin: 10px 0;
}

.adzworld-msg__meta {
	color: #999;
	font-size: 11px;
	margin-bottom: 2px;
}

.adzworld-msg__who {
	color: #444;
	font-weight: 600;
}

.adzworld-msg__body {
	border-radius: 8px;
	display: inline-block;
	max-width: 80%;
	padding: 7px 11px;
	text-align: left;
	white-space: pre-wrap;
	word-break: break-word;
}

.adzworld-msg--adz .adzworld-msg__body {
	background: #eef6fb;
}

.adzworld-msg--response .adzworld-msg__body {
	background: #fdf7e3;
	font-style: italic;
}

.adzworld-msg--reader {
	text-align: right;
}

.adzworld-msg--reader .adzworld-msg__body {
	background: #f0f0f1;
}

.adzworld-msg__label {
	color: #50575e;
}

.adzworld-msg__id {
	background: transparent;
	font-size: 12px;
	padding: 0;
}

.adzworld-msg-state {
	align-items: center;
	display: flex;
	gap: 8px;
	margin: 16px 0 10px;
}

.adzworld-msg-state__rule {
	background: #dcdcde;
	flex: 1 1 auto;
	height: 1px;
}

.adzworld-msg-state__label {
	background: #eef6fb;
	border: 1px solid #c5d9ed;
	border-radius: 10px;
	color: #1d4f7a;
	flex: 0 0 auto;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 2px 10px;
}

.adzworld-logs__actions {
	margin: 12px 0 0 28px;
}

.adzworld-logs__pages {
	margin: 12px 0 0 28px;
}

.adzworld-logs__pages .page-numbers {
	margin-right: 6px;
}

.adzworld-logs__settings {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	margin-top: 24px;
	padding: 4px 16px 12px;
}

/* Ratings bands editor on the Templates tab. */
.adzworld-bands__themes {
	border: 0;
	margin: 0 0 16px;
	padding: 0;
}

.adzworld-bands__themes legend {
	font-weight: 600;
	margin-bottom: 4px;
}

.adzworld-bands__theme {
	align-items: center;
	display: inline-flex;
	gap: 8px;
	margin: 0 18px 8px 0;
}

.adzworld-bands__swatch {
	border-radius: 999px;
	display: inline-block;
	height: 0.55rem;
	width: 7rem;
}

.adzworld-bands__swatch--adz-ratings-default-slider-theme {
	background: linear-gradient(
		90deg,
		#c92a2a 0%,
		#de6012 20%,
		hsl(46 97% 51%) 38%,
		hsl(46 97% 51%) 62%,
		#bbcd13 80%,
		#16803a 100%
	);
}

.adzworld-bands__swatch--adz-ratings-tide-slider-theme {
	background: linear-gradient(
		90deg,
		hsl(222 62% 40%) 0%,
		hsl(200 70% 46%) 20%,
		hsl(188 35% 72%) 38%,
		hsl(188 35% 72%) 62%,
		hsl(168 50% 42%) 80%,
		hsl(152 58% 32%) 100%
	);
}

.adzworld-bands__swatch--adz-ratings-ember-slider-theme {
	background: linear-gradient(
		90deg,
		#A3A7AD 0%,
		#2E2F30 20%,
		#000 38%,
		#000 62%,
		#B84C00 80%,
		#FF6A00 100%
	);
}

.adzworld-template-lines {
	max-width: 52rem;
}

.adzworld-template-lines h3 {
	margin: 1.2em 0 0.4em;
}

.adzworld-template-lines__panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-sizing: border-box;
	margin: 12px 0 16px;
	padding: 4px 16px 12px;
}

.adzworld-template-lines__now th[scope="row"] {
	width: 11rem;
}

.adzworld-template-lines__now code {
	color: #646970;
	display: block;
	font-size: 12px;
	font-weight: 400;
}

.adzworld-template-lines__group th {
	background: #f6f7f7;
}

.adzworld-template-lines__field-note {
	color: #646970;
	margin: 0.15em 0 0.8em;
}

.adzworld-template-lines__empty {
	color: #646970;
	font-style: italic;
}

.adzworld-template-lines textarea {
	box-sizing: border-box;
	max-width: 40rem;
	width: 100%;
}

.adzworld-template-lines__preview {
	background: #fff;
	border: 1px solid #c3c4c7;
	margin: 12px 0 16px;
	max-width: 40rem;
	padding: 0 16px;
}

.adzworld-template-lines__sample {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em 0.75em;
	margin: 0;
	padding: 10px 0;
}

.adzworld-template-lines__sample.adzworld-align-left {
	justify-content: flex-start;
}

.adzworld-template-lines__sample.adzworld-align-center {
	justify-content: center;
}

.adzworld-template-lines__sample.adzworld-align-right {
	justify-content: flex-end;
}

.adzworld-template-lines__count-num {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.adzworld-template-lines__sample[data-adzworld-template-header-row] {
	border-bottom: 1px solid #dcdcde;
}

.adzworld-template-lines__sample[data-adzworld-template-footer-row] {
	border-top: 1px solid #dcdcde;
}

.adzworld-template-lines__ad {
	background: #f6f7f7;
	margin: 8px 0;
	padding: 16px;
	text-align: center;
}

.adzworld-template-lines__sample.adzworld-align-left {
	text-align: left;
}

.adzworld-template-lines__sample.adzworld-align-center {
	text-align: center;
}

.adzworld-template-lines__sample.adzworld-align-right {
	text-align: right;
}

.adzworld-template-lines__align label {
	margin-right: 12px;
}

.adzworld-bands__table {
	max-width: 36rem;
}

.adzworld-bands__table th,
.adzworld-bands__table td {
	vertical-align: middle;
}

.adzworld-bands__table th:nth-child(1),
.adzworld-bands__table th:nth-child(2),
.adzworld-bands__table td:nth-child(1),
.adzworld-bands__table td:nth-child(2) {
	width: 6rem;
}

.adzworld-bands__table input.adzworld-bands__number {
	font-variant-numeric: tabular-nums;
	text-align: right;
	width: 5rem;
}

.adzworld-bands__table input.adzworld-bands__words {
	max-width: 16rem;
	width: 100%;
}

.adzworld-bands__message {
	box-sizing: border-box;
	display: block;
	max-width: 40rem;
	width: 100%;
}

/* Response setting inside each rotation slot. */
.adzworld-admin-slot__response {
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr);
	margin: 8px 0;
}

.adzworld-admin-slot__response label {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	gap: 2px;
}

@media (max-width: 782px) {

	.adzworld-journey__head {
		flex-wrap: wrap;
	}

	.adzworld-journey__preview {
		margin-left: 0;
		max-width: 100%;
	}

	.adzworld-admin-slot__response {
		grid-template-columns: 1fr;
	}
}
