/* =======================================================================
   NudgeSells brand + shared admin-page design system
   Used by the Dashboard, Analytics, Settings and Tools pages, and by the
   offer edit screen's metaboxes below.
   ======================================================================= */
:root {
	--ns-accent: #1E5F46;
	--ns-accent-dark: #164734;
	--ns-accent-light: #e8efec;
	--ns-success: #2a7d2a;
	--ns-success-bg: #eaf6ea;
	--ns-warning: #8a6d1d;
	--ns-warning-bg: #fbf6ee;
	--ns-text: #1d2327;
	--ns-text-muted: #646970;
	--ns-border: #e2e2e6;
	--ns-surface: #fff;
	--ns-surface-alt: #F9F9F7;
	--ns-radius: 8px;
	--ns-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 8px rgba(0, 0, 0, .03);
}

.nudgesells-wrap,
.nudgesells-wrap + .wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding-right: 10px;
}

@media (min-width: 783px) {
	.nudgesells-wrap,
	.nudgesells-wrap + .wrap {
		padding-right: 20px;
	}
}

.nudgesells-wrap h1.wp-heading-inline {
	font-weight: 700;
}

body[class*='nudgesells'] {
	background-color: var(--ns-surface-alt);
}

#wpbody-content {
	max-width: 100%;
	overflow: hidden;
}

.nudgesells-header-top {
	padding: 12px 0 13px;
	margin-left: -9999px;
	margin-right: -9999px;
	padding-left: 9999px;
	padding-right: 9999px;
	background-color: var(--ns-surface);
	border-bottom: 1px solid var(--ns-border);
	margin-bottom: 20px;
}

.nudgesells-header-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.nudgesells-cpt-screen-header h1 {
	display: none;
}

.nudgesells-header-title h1 {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	font-size: 22px;
	line-height: 1.2;
	gap: 12px;
}

.nudgesells-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 9px;
	flex: 0 0 auto;
	background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-dark));
	color: #fff;
	font-size: 18px;
}

.nudgesells-logo .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.nudgesells-subtitle {
	color: var(--ns-text-muted);
	margin: 4px 0 22px;
	font-size: 14px;
	max-width: 640px;
}

.nudgesells-header-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Range/tab pills (used by Analytics' date range switcher) */
.nudgesells-pills {
	margin: 0 0 20px;
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	padding: 0;
}

.nudgesells-pills li {
	margin: 0;
}

.nudgesells-pills a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f0f0f1;
	color: var(--ns-text-muted);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	transition: background .12s ease, color .12s ease;
}

.nudgesells-pills a:hover {
	background: var(--ns-accent-light);
	color: var(--ns-accent-dark);
}

.nudgesells-pills a.current {
	background: var(--ns-accent);
	color: #fff;
}

.nudgesells-custom-range-form {
	display: inline-block;
	margin: 0;
}

.nudgesells-custom-range-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	color: var(--ns-text-muted);
	font-size: 13px;
	font-weight: 600;
}

.nudgesells-custom-range-pill.current {
	background: var(--ns-accent);
	color: #fff;
}

.nudgesells-custom-range-pill .nudgesells-datepicker {
	width: 110px;
	line-height: 1.6;
	min-height: 0;
	padding: 4px 10px;
	min-height: 20px;
	border-radius: 999px;
	border: 1px solid var(--ns-border);
}

.nudgesells-custom-range-pill button.button.button-small {
	line-height: 1.6;
	min-height: 0;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 999px !important;
	background: var(--ns-accent);
	border-color: var(--ns-accent);
	color: #fff;
	box-shadow: none;
	text-shadow: none;
	transition: background-color .12s ease, border-color .12s ease;
}

.nudgesells-custom-range-pill .button:hover,
.nudgesells-custom-range-pill .button:focus {
	background: var(--ns-accent-dark);
	border-color: var(--ns-accent-dark);
	color: #fff;
}

.nudgesells-pills .nudgesells-pill-disabled {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f0f0f1;
	color: var(--ns-text-muted);
	font-size: 13px;
	font-weight: 600;
	opacity: .6;
	cursor: not-allowed;
}

.nudgesells-pills .nudgesells-pill-disabled .nudgesells-badge {
	padding: 1px 7px;
	font-size: 10px;
}

/* Stat cards */
.nudgesells-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin: 4px 0 30px;
}

.nudgesells-revenue-chart-wrap {
	position: relative;
	height: 300px;
	max-width: 100%;
}

.nudgesells-stat-card {
	background: var(--ns-surface);
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
	box-shadow: var(--ns-shadow);
	padding: 20px 22px;
	position: relative;
	overflow: hidden;
}
.nudgesells-stat-card--negative .nudgesells-stat-value { color: #b32d2e; }

.nudgesells-stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--ns-accent), #61b58c);
}

.nudgesells-stat-value {
	display: block;
	font-size: 27px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ns-text);
	letter-spacing: -0.01em;
}

.nudgesells-stat-label {
	display: block;
	font-size: 13px;
	color: var(--ns-text-muted);
	margin-top: 6px;
}

/* Content cards (wrap sections of a page in a card for visual grouping) */
.nudgesells-card {
	background: var(--ns-surface);
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
	box-shadow: var(--ns-shadow);
	padding: 24px 26px;
	margin-bottom: 24px;
}

.nudgesells-card h2 {
	margin-top: 0;
	font-size: 16px;
}

.nudgesells-card+.nudgesells-card {
	margin-top: 0;
}

.nudgesells-empty-state {
	background: var(--ns-surface);
	border: 1px dashed var(--ns-border);
	border-radius: var(--ns-radius);
	padding: 48px 40px;
	text-align: center;
}

.nudgesells-empty-state h2 {
	margin-top: 0;
}

.nudgesells-empty-state .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: var(--ns-accent);
	margin-bottom: 12px;
}

.nudgesells-quicklinks {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nudgesells-quicklinks li {
	padding: 12px 0;
	border-bottom: 1px solid var(--ns-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.nudgesells-quicklinks li:last-child {
	border-bottom: none;
}

.nudgesells-quicklinks a {
	font-weight: 600;
	text-decoration: none;
}

.nudgesells-quicklinks .description {
	color: var(--ns-text-muted);
	font-size: 13px;
}

.nudgesells-suggestion-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nudgesells-suggestion-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--ns-border);
}

.nudgesells-suggestion-row:last-child {
	border-bottom: none;
}

.nudgesells-suggestion-text {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}

.nudgesells-suggestion-plus {
	color: var(--ns-text-muted);
	font-weight: 600;
}

.nudgesells-suggestion-text .description {
	display: block;
	width: 100%;
	color: var(--ns-text-muted);
	font-size: 12px;
}

/* Tables on NudgeSells pages */
.nudgesells-wrap table.widefat {
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
	overflow: hidden;
	box-shadow: var(--ns-shadow);
}

.nudgesells-wrap table.widefat thead th {
	background: #fafafa;
	font-weight: 600;
	color: var(--ns-text);
}

.nudgesells-wrap table.widefat tbody tr:hover {
	background: var(--ns-accent-light);
}


/* Analytics: view toggle (By offer / By product).
   WP core's default .subsubsub is a float:right list meant to sit next
   to a list table's H1 -- here it's inside a card, not a list screen,
   so it's reset to a plain block on its own line instead. */
.nudgesells-card .subsubsub {
	float: none;
	clear: both;
	display: block;
	margin: 4px 0 16px;
	padding: 0;
}
.nudgesells-card .subsubsub li {
	font-size: 14px;
}
.nudgesells-card .subsubsub a {
	padding: 4px 2px;
}
.nudgesells-card .subsubsub a.current {
	font-weight: 600;
	color: var(--ns-accent-dark);
}

/* Analytics: filter form + sortable column headers */
.nudgesells-analytics-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 4px 0 20px;
}

.nudgesells-analytics-filters input[type="search"] {
	min-width: 220px;
}

.nudgesells-sortable {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	color: inherit;
	font-weight: inherit;
}

.nudgesells-sortable:hover {
	color: var(--ns-accent);
}

.nudgesells-sortable--active {
	color: var(--ns-accent-dark);
	font-weight: 700;
}

.nudgesells-sort-arrow {
	font-size: 10px;
}

/* Analytics: responsive table - becomes a stack of labeled rows below
   the same breakpoint WP's own admin tables collapse at, using the same
   data-label technique as the offer-edit repeaters above. */
.nudgesells-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 900px) {
	.nudgesells-analytics-table thead {
		display: none;
	}

	.nudgesells-analytics-table,
	.nudgesells-analytics-table tbody,
	.nudgesells-analytics-table tr,
	.nudgesells-analytics-table td {
		display: block;
		width: 100% !important;
	}

	.nudgesells-analytics-table tr {
		border: 1px solid var(--ns-border);
		border-radius: var(--ns-radius);
		margin-bottom: 12px;
		padding: 10px 14px;
		background: var(--ns-surface);
		box-shadow: var(--ns-shadow);
	}

	.nudgesells-analytics-table td {
		border: none;
		padding: 8px 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		border-bottom: 1px solid #f0f0f1;
	}

	.nudgesells-analytics-table td:last-child {
		border-bottom: none;
	}

	.nudgesells-analytics-table td::before {
		content: attr(data-label);
		font-weight: 600;
		flex: 0 0 auto;
		padding-inline-end: 10px;
	}
}

/* Settings + Tools forms */
.nudgesells-wrap .form-table th {
	padding-inline-start: 0;
	font-weight: 600;
}

.nudgesells-wrap .form-table td {
	padding-top: 18px;
	padding-bottom: 18px;
}

.nudgesells-wrap .form-table tr:first-child td,
.nudgesells-wrap .form-table tr:first-child th {
	padding-top: 0;
}

.nudgesells-note-box {
	background: var(--ns-warning-bg);
	border: 1px solid #f0e2c8;
	color: var(--ns-warning);
	border-radius: var(--ns-radius);
	padding: 12px 16px;
	font-size: 13px;
	margin: 4px 0 20px;
}

.nudgesells-settings-tabs {
	margin-bottom: 0;
}

.nudgesells-cpt-screen-header {
	margin-bottom: 0;
}

.nudgesells-cpt-screen-header+.wrap>h1.wp-heading-inline {
	margin-top: 4px;
}

.nudgesells-two-col {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: 24px;
	align-items: start;
}

.nudgesells-two-col .nudgesells-card {
	margin-bottom: 0;
}

.nudgesells-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--ns-success-bg);
	color: var(--ns-success);
}

.nudgesells-export-offer-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	max-height: 260px;
	overflow-y: auto;
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
}

.nudgesells-export-offer-list li {
	border-bottom: 1px solid var(--ns-border);
	padding: 10px 14px;
}

.nudgesells-export-offer-list li:last-child {
	border-bottom: none;
}

.nudgesells-export-offer-list label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

/* ---- Offer edit screen: give the metaboxes a touch more polish ---- */
.nudgesells-admin-app {
	padding: 8px 0;
}

.nudgesells-tabs {
	margin: 12px 0 20px;
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--ns-border);
	padding-bottom: 0;
}

/* On the Settings page, the tabs are a direct child of .nudgesells-wrap
   (unlike the Offer edit screen's Add-ons/Upgrades tabs, which live
   inside a metabox) - remove the bottom margin there specifically so the
   tab row connects directly to the panel below instead of leaving a gap. */
.nudgesells-wrap>.nudgesells-tabs {
	margin-bottom: 0;
}

.nudgesells-tab-btn {
	background: #f0f0f1;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	padding: 10px 18px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	color: var(--ns-text-muted);
	position: relative;
	top: 1px;
	transition: background-color .12s ease, color .12s ease;
}

.nudgesells-tab-btn:hover {
	background: var(--ns-accent-light);
	color: var(--ns-accent-dark);
}

.nudgesells-tab-btn.active {
	background: #fff;
	color: var(--ns-accent-dark);
	border-color: var(--ns-border);
	border-bottom: 1px solid #fff;
	/* visually "cuts through" the tabs' own bottom border, reads as the active tab merging into the panel below */
}

.nudgesells-repeater {
	margin-bottom: 10px;
}

.nudgesells-repeater td {
	vertical-align: middle;
	padding: 8px;
}

.nudgesells-remove {
	color: #b32d2e;
	font-size: 16px;
}

.nudgesells-tab-panel .description {
	margin-bottom: 12px;
}

.nudgesells-display-style-picker {
	margin: 4px 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #eee;
}

.nudgesells-section-heading-fields,
.nudgesells-upgrade-original-fields {
	margin: 4px 0 20px;
	padding: 16px 16px 4px;
	background: #fafafa;
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius, 8px);
}

/* Section heading fields - 3 columns mirroring the frontend widget's own
   header layout: icon | title with subline stacked underneath | read-more
   link, instead of four separately-labeled stacked fields. */
.nudgesells-heading-field-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding-bottom: 12px;
}

.nudgesells-heading-field-row>div {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nudgesells-heading-field-row label {
	font-size: 12px;
}

.nudgesells-heading-field-row input[type="text"],
.nudgesells-heading-field-row input[type="url"] {
	width: 100%;
}

.nudgesells-heading-field-row .description {
	font-size: 12px;
}

.nudgesells-heading-col-icon {
	flex: 0 0 auto;
	width: 110px;
}

.nudgesells-heading-col-icon .nudgesells-icon-preview {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	margin-bottom: 4px;
}

.nudgesells-heading-col-icon .nudgesells-select-icon {
	align-self: flex-start;
}

.nudgesells-heading-col-icon .nudgesells-remove-icon {
	color: #b32d2e;
	align-self: flex-start;
}

.nudgesells-heading-col-title {
	flex: 1 1 auto;
	min-width: 0;
}

.nudgesells-heading-col-link {
	flex: 0 0 auto;
	width: 240px;
}

/* Stack to full width on narrow screens, matching the breakpoint WP
   admin itself uses (782px) for its own responsive layout switches. */
@media screen and (max-width: 782px) {
	.nudgesells-heading-field-row {
		flex-wrap: wrap;
	}

	.nudgesells-heading-col-icon,
	.nudgesells-heading-col-title,
	.nudgesells-heading-col-link {
		width: 100%;
		flex: 1 1 100%;
	}

	.nudgesells-heading-col-icon {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}

	.nudgesells-heading-col-icon label {
		width: 100%;
	}
}

/* Responsive repeater tables (add-ons, upgrades, tiers) */
.nudgesells-repeater-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 20px;
}

.nudgesells-repeater-wrap .nudgesells-repeater {
	min-width: 640px;
}

@media screen and (max-width: 782px) {
	.nudgesells-repeater-wrap {
		overflow-x: visible;
	}

	.nudgesells-repeater-wrap .nudgesells-repeater {
		min-width: 0;
	}

	.nudgesells-repeater thead {
		display: none;
	}

	.nudgesells-repeater,
	.nudgesells-repeater tbody,
	.nudgesells-repeater tr,
	.nudgesells-repeater td {
		display: block;
		width: 100% !important;
	}

	.nudgesells-repeater tr {
		border: 1px solid #dcdcde;
		border-radius: 4px;
		margin-bottom: 12px;
		padding: 8px 10px;
		background: #fff;
	}

	.nudgesells-repeater td {
		border: none;
		padding: 8px 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
	}

	.nudgesells-repeater td::before {
		content: attr(data-label);
		font-weight: 600;
		flex: 0 0 auto;
		padding-inline-end: 10px;
		white-space: nowrap;
	}

	.nudgesells-repeater td:empty {
		display: none;
	}

	.nudgesells-repeater td>select,
	.nudgesells-repeater td>input,
	.nudgesells-repeater td .select2-container {
		flex: 1 1 auto;
		max-width: 65% !important;
	}

	/* The remove-row cell has no label, so let it sit flush right on its own line */
	.nudgesells-repeater td:last-child {
		justify-content: flex-end;
		padding-top: 0;
	}
}

/* =======================================================================
   Offers + A/B Tests list and edit screens - these are native WordPress
   post-type screens (list table, postboxes), so instead of controlling
   their markup ourselves, this re-skins WP's own elements to match the
   rounded-card look of the Dashboard/Analytics/Settings/Tools pages.
   Scoped to body.post-type-nudgesells_offer and body.post-type-nudgesells_ab_test,
   which WordPress already adds automatically on every screen for these
   post types, so none of this leaks onto other post types' screens.
   ======================================================================= */

/* Offers list table */
body.post-type-nudgesells_offer .wp-list-table,
body.post-type-nudgesells_ab_test .wp-list-table {
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	box-shadow: var(--ns-shadow);
}

body.post-type-nudgesells_offer .wp-list-table thead tr:first-child th:first-child,
body.post-type-nudgesells_offer .wp-list-table thead tr:first-child td:first-child,
body.post-type-nudgesells_ab_test .wp-list-table thead tr:first-child th:first-child,
body.post-type-nudgesells_ab_test .wp-list-table thead tr:first-child td:first-child {
	border-top-left-radius: var(--ns-radius);
}

body.post-type-nudgesells_offer .wp-list-table thead tr:first-child th:last-child,
body.post-type-nudgesells_offer .wp-list-table thead tr:first-child td:last-child,
body.post-type-nudgesells_ab_test .wp-list-table thead tr:first-child th:last-child,
body.post-type-nudgesells_ab_test .wp-list-table thead tr:first-child td:last-child {
	border-top-right-radius: var(--ns-radius);
}

body.post-type-nudgesells_offer .wp-list-table thead th,
body.post-type-nudgesells_offer .wp-list-table thead td,
body.post-type-nudgesells_ab_test .wp-list-table thead th,
body.post-type-nudgesells_ab_test .wp-list-table thead td {
	background: #fafafa;
}

body.post-type-nudgesells_offer .subsubsub,
body.post-type-nudgesells_ab_test .subsubsub {
	margin: 8px 0 12px;
}

/* Offer edit screen: metaboxes styled as cards */
body.post-type-nudgesells_offer #poststuff .postbox,
body.post-type-nudgesells_ab_test #poststuff .postbox {
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius);
	box-shadow: var(--ns-shadow);
	overflow: hidden;
}

body.post-type-nudgesells_offer #poststuff .postbox-header,
body.post-type-nudgesells_offer #poststuff .postbox>h2.hndle,
body.post-type-nudgesells_offer #poststuff .postbox .hndle,
body.post-type-nudgesells_ab_test #poststuff .postbox-header,
body.post-type-nudgesells_ab_test #poststuff .postbox>h2.hndle,
body.post-type-nudgesells_ab_test #poststuff .postbox .hndle {
	background: #fafafa;
	border-bottom: 1px solid var(--ns-border);
	border-radius: 0;
	/* the .postbox's own overflow:hidden clips this to the rounded corners already */
}

body.post-type-nudgesells_offer #poststuff .postbox .inside,
body.post-type-nudgesells_ab_test #poststuff .postbox .inside {
	padding: 16px;
	margin: 0;
}

body.post-type-nudgesells_offer #poststuff .postbox .handlediv,
body.post-type-nudgesells_ab_test #poststuff .postbox .handlediv {
	margin-top: 4px;
}

/* Title field */
body.post-type-nudgesells_offer #titlediv #title,
body.post-type-nudgesells_ab_test #titlediv #title {
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius-sm, 6px);
	box-shadow: none;
}

body.post-type-nudgesells_offer #titlediv #title:focus,
body.post-type-nudgesells_ab_test #titlediv #title:focus {
	border-color: var(--ns-accent);
	box-shadow: 0 0 0 1px var(--ns-accent);
}

/* =======================================================================
   Datepicker (jQuery UI) - styled to match wp-admin's own look instead of
   the generic external jquery-ui.css theme (blue header, drop shadow,
   dated appearance). No external stylesheet is loaded for this anymore;
   these rules are the entire visual theme for the widget.
   ======================================================================= */
#ui-datepicker-div.ui-datepicker {
	display: none;
	background: #fff;
	border: 1px solid var(--ns-border);
	border-radius: var(--ns-radius, 6px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
	padding: 14px;
	width: 280px !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	z-index: 100100 !important;
	/* above WP admin's own chrome */
}

.ui-datepicker .ui-datepicker-header {
	background: #f6f7f7;
	border: 1px solid var(--ns-border);
	border-radius: 4px;
	padding: 10px 0;
	position: relative;
}

.ui-datepicker .ui-datepicker-title {
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	color: var(--ns-text, #1d2327);
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	position: absolute;
	top: 6px;
	width: 32px;
	height: 32px;
	cursor: pointer;
	border-radius: 4px;
	text-indent: -9999px;
}

.ui-datepicker .ui-datepicker-prev {
	left: 6px;
}

.ui-datepicker .ui-datepicker-next {
	right: 6px;
}

.ui-datepicker .ui-datepicker-prev:before,
.ui-datepicker .ui-datepicker-next:before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--ns-text-muted, #646970);
	border-right: 2px solid var(--ns-text-muted, #646970);
	text-indent: 0;
}

.ui-datepicker .ui-datepicker-prev:before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.ui-datepicker .ui-datepicker-next:before {
	transform: translate(-70%, -50%) rotate(45deg);
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
	background: #e9eaeb;
}

.ui-datepicker table.ui-datepicker-calendar {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 0;
}

.ui-datepicker th {
	font-size: 12px;
	font-weight: 600;
	color: var(--ns-text-muted, #646970);
	padding: 8px 0;
	text-align: center;
}

.ui-datepicker td {
	padding: 2px;
	text-align: center;
}

.ui-datepicker td a,
.ui-datepicker td span {
	display: block;
	padding: 10px 0;
	border-radius: 4px;
	text-decoration: none;
	font-size: 14px;
	color: var(--ns-text, #1d2327);
}

.ui-datepicker td a:hover {
	background: var(--ns-accent-light, #f0f0f1);
	color: var(--ns-accent-dark, var(--ns-accent));
}

.ui-datepicker td.ui-datepicker-today a {
	border: 1px solid var(--ns-accent);
}

.ui-datepicker td .ui-state-active {
	background: var(--ns-accent);
	color: #fff;
}

.ui-datepicker td.ui-datepicker-unselectable span {
	color: #c3c4c7;
}

/* Range input (e.g. the A/B Test traffic-split slider) - cross-browser
   thumb/track styling using the same accent color as everything else,
   instead of each browser's own default slider appearance. */
.nudgesells-wrap input[type="range"],
#poststuff input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 200px;
	height: 4px;
	border-radius: 999px;
	background: var(--ns-border);
	outline: none;
	vertical-align: middle;
}

.nudgesells-wrap input[type="range"]::-webkit-slider-thumb,
#poststuff input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ns-accent);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--ns-accent);
	cursor: pointer;
}

.nudgesells-wrap input[type="range"]::-moz-range-thumb,
#poststuff input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ns-accent);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--ns-accent);
	cursor: pointer;
}

.nudgesells-wrap input[type="range"]::-moz-range-progress,
#poststuff input[type="range"]::-moz-range-progress {
	background: var(--ns-accent);
	height: 4px;
	border-radius: 999px;
}

.nudgesells-wrap input[type="range"]:focus-visible,
#poststuff input[type="range"]:focus-visible {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--ns-accent) 30%, transparent);
}

/* Welcome notice (shown once, on whichever admin page loads next after
   activation) - can appear on any admin screen, not just our own pages,
   so this can't assume any of the surrounding .nudgesells-wrap context. */
.nudgesells-welcome-notice {
	padding: 16px 20px;
	border-left-color: var(--ns-accent);
}

.nudgesells-welcome-notice-inner {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.nudgesells-welcome-notice-text p {
	margin: 0 0 8px;
}

.nudgesells-welcome-notice-text p:first-child {
	font-size: 15px;
}

.nudgesells-welcome-notice-actions {
	margin-top: 12px !important;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}