/* ShareToSocial — admin settings styles */

:root {
	--sts-brand-500: #3b82f6;
	--sts-brand-600: #2563eb;
	--sts-brand-700: #1d4ed8;
	--sts-brand-tint: #eef5fd;
	--sts-brand-tint-strong: #e3edfc;
}

/*
 * Single source of truth for "visually hidden" across the admin
 * screen. JS/PHP toggle this class instead of the native `hidden`
 * attribute, so visibility never depends on the browser's built-in
 * (easily-overridden) [hidden] UA style.
 */
.sts-is-hidden {
	display: none !important;
}

.sts-admin {
	margin-right: 20px;
	padding: 4px 4px 0;
	background: radial-gradient(1100px 260px at 8% 0%, var(--sts-brand-tint) 0%, transparent 62%);
}

.sts-admin__header {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 20px 0 24px;
	padding: 24px 28px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--sts-brand-700) 0%, var(--sts-brand-500) 100%);
	box-shadow: 0 10px 26px rgba(29, 78, 216, 0.3);
	color: #fff;
}

.sts-admin__header-icon {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(2px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.sts-admin__header-icon img {
	width: 50px;
	height: 50px;
	display: block;
	border-radius: 8px;
}

.sts-admin__header-text {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-width: 0;
}

.sts-admin__title {
	margin: 0 0 6px;
	color: #fff;
	font-size: 21px;
	line-height: 1.2;
}

.sts-admin__header-meta {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	align-self: center;
	gap: 10px;
}

.sts-admin__version {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	cursor: default;
}

.sts-admin__version .dashicons {
	width: 15px;
	height: 15px;
	font-size: 15px;
	line-height: 1;
	color: #00e676;
}

.sts-admin__tagline {
	max-width: 640px;
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}

@media (max-width: 600px) {
	.sts-admin {
		margin-right: 0;
	}

	.sts-admin__header {
		flex-wrap: wrap;
		row-gap: 12px;
		padding: 20px;
	}

	.sts-admin__header-text {
		order: 3;
		flex: 1 1 100%;
	}

	.sts-admin__header-meta {
		order: 2;
		margin-left: auto;
	}
}

.sts-admin__notice {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 6px;
	border-left: 4px solid var(--sts-brand-600);
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	font-size: 13px;
	transition: opacity 0.2s ease;
}

.sts-admin__notice--success {
	border-left-color: #00a32a;
}

.sts-admin__notice--error {
	border-left-color: #d63638;
}

.sts-admin__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin-bottom: 20px;
	padding: 10px 20px;
	background: #eef1f4;
	border: 1px solid #e0e4e8;
	border-radius: 10px;
	width: 100%;
	box-sizing: border-box;
}

.sts-admin__tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: #50575e;
	font-weight: 500;
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 8px !important;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

@media (max-width: 480px) {
	.sts-admin__tab {
		flex: 1 1 100%;
		justify-content: flex-start;
	}
}

.sts-admin__tab:visited {
	color: inherit;
}

.sts-admin__tab .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
}

.sts-admin__tab:hover {
	color: var(--sts-brand-600);
	background: rgba(37, 99, 235, 0.08);
}

.sts-admin__tab:focus-visible {
	outline: 2px solid var(--sts-brand-600);
	outline-offset: 2px;
}

.sts-admin__tab.is-active {
	background: var(--sts-brand-600);
	color: #fff;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.sts-admin__tab.is-active:hover {
	color: #fff;
	background: var(--sts-brand-600);
}

.sts-admin__save-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	padding: 14px 0;
}

.sts-admin__save-bar .button-primary {
	border-color: var(--sts-brand-700);
	background: linear-gradient(135deg, var(--sts-brand-500) 0%, var(--sts-brand-700) 100%);
	box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.sts-admin__save-bar .button-primary:hover,
.sts-admin__save-bar .button-primary:focus {
	border-color: var(--sts-brand-700);
	background: linear-gradient(135deg, var(--sts-brand-600) 0%, var(--sts-brand-700) 100%);
}

.sts-admin__save-status {
	font-size: 13px;
	color: #646970;
}

.sts-admin__save-status.is-saved {
	color: #00a32a;
	font-weight: 600;
}

.sts-admin__save-status.is-error {
	color: #d63638;
	font-weight: 600;
}

.sts-admin__layout {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.sts-admin__main {
	flex: 1 1 0;
	min-width: 0;
}



.sts-card {
	background: #fff;
	border: 1px solid #e3e8f5;
	border-radius: 8px;
	padding: 20px 24px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(29, 78, 216, 0.05);
}

.sts-card h3 {
	margin-top: 0;
}

.sts-card .description {
	margin-bottom: 20px
}

.sts-card--notice {
	background: #f0f9f0;
	border-color: #b8e0b8;
	color: #1e5e1e;
}

.sts-card--danger {
	background: #fdf2f2;
	border-color: #f0b8b8;
}

.sts-card--danger h3 {
	color: #a52222;
}

.sts-field--range {
	max-width: 480px;
}

.sts-range-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sts-range {
	flex: 1;
}

.sts-range__value {
	min-width: 42px;
	font-weight: 600;
	color: var(--sts-brand-600);
}

p.sts-field--hidden {
	display: none;
}

.sts-card--notice .sts-icon-svg {
	width: 16px;
	height: 16px;
	vertical-align: -2px;
	margin-right: 4px;
}

.sts-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 14px 0;
}

.sts-media-picker {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sts-media-picker__preview {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #dcdcde;
	background: #f0f0f1;
}

.sts-field label {
	font-weight: 600;
}

.sts-field input:disabled,
.sts-field input[readonly],
.sts-field input.sts-is-readonly,
.sts-field button:disabled {
	background: #f0f0f1;
	color: #a7aaad;
	cursor: not-allowed;
	opacity: 1;
}

.sts-subheading {
	margin: 18px 0;
	font-weight: 600;
}

.sts-toggle-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 12px 0;
	cursor: pointer;
}

.sts-toggle-row--large {
	font-size: 15px;
	font-weight: 600;
}

/* ---------- Toggle switches (checkboxes restyled to match the brand color) ---------- */

.sts-toggle-row input[type="checkbox"],
.sts-label-list__item input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex-shrink: 0;
	width: 38px;
	height: 21px;
	margin: 0;
	padding: 0;
	border-radius: 999px;
	background: #c3c4c7;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* WordPress core's own checkbox CSS (forms.css) also styles ::before
   (a dashicon checkmark with its own margin/size) — every property it
   sets is re-declared here, in both states, so it can never leak in
   regardless of stylesheet load order. */
.sts-toggle-row input[type="checkbox"]::before,
.sts-label-list__item input[type="checkbox"]::before,
.sts-toggle-row input[type="checkbox"]:checked::before,
.sts-label-list__item input[type="checkbox"]:checked::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 17px;
	height: 17px;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transform: translateX(0);
	transition: transform 0.2s ease;
}

.sts-toggle-row input[type="checkbox"]:checked,
.sts-label-list__item input[type="checkbox"]:checked {
	background: var(--sts-brand-600);
	border-color: var(--sts-brand-600);
}

.sts-toggle-row input[type="checkbox"]:checked::before,
.sts-label-list__item input[type="checkbox"]:checked::before {
	transform: translateX(17px);
}

.sts-toggle-row input[type="checkbox"]:focus-visible,
.sts-label-list__item input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--sts-brand-600);
	outline-offset: 2px;
}

.sts-toggle-row--large input[type="checkbox"] {
	width: 44px;
	height: 24px;
}

.sts-toggle-row--large input[type="checkbox"]::before,
.sts-toggle-row--large input[type="checkbox"]:checked::before {
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	margin: 0;
}

.sts-toggle-row--large input[type="checkbox"]:checked::before {
	transform: translateX(20px);
}

.sts-label-list__item input[type="checkbox"] {
	width: 30px;
	height: 17px;
}

.sts-label-list__item input[type="checkbox"]::before,
.sts-label-list__item input[type="checkbox"]:checked::before {
	top: 2px;
	left: 2px;
	width: 13px;
	height: 13px;
	margin: 0;
}

.sts-label-list__item input[type="checkbox"]:checked::before {
	transform: translateX(13px);
}

/* ---------- Radio cards (placement, position) ---------- */

.sts-radio-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sts-radio-cards--compact .sts-radio-card {
	min-width: 120px;
}

.sts-radio-cards--vertical {
	display: flex;
}

.sts-radio-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	min-width: 160px;
	border: 2px solid #dcdcde;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sts-radio-card input {
	margin: 0;
}

.sts-radio-card:hover {
	border-color: #8c8f94;
}

.sts-radio-card.is-selected {
	border-color: var(--sts-brand-600);
	background: var(--sts-brand-tint-strong);
}

.sts-radio-card--stacked {
	align-items: flex-start;
	max-width: 260px;
}

.sts-radio-card--stacked .description {
	display: block;
	margin-top: 2px;
}

/* ---------- Draggable network pills (checkbox select/unselect + drag to reorder) ---------- */

.sts-network-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
	max-width: 800px;
	list-style: none;
}

.sts-network-pill {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px 8px 10px;
	border: 2px solid #dcdcde;
	border-radius: 999px;
	background: #fff;
	user-select: none;
	transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.sts-network-pill.is-selected {
	border-color: var(--sts-brand-600);
	background: var(--sts-brand-tint-strong);
}

.sts-network-pill__label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

/* Visually hidden but still focusable/clickable via its wrapping
   label — selection is shown by the pill's border/background instead
   of a checkbox square, matching the rest of the pill's chip look. */
.sts-network-pill__checkbox {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	margin: 0;
}

.sts-network-pill__text {
	font-weight: 600;
}

.sts-network-pill__grip {
	color: #a7aaad;
	cursor: grab;
	line-height: 1;
	font-size: 14px;
	letter-spacing: -1px;
}

.sts-network-pill__grip:focus-visible {
	outline: 2px solid var(--sts-brand-600);
	outline-offset: 2px;
	border-radius: 2px;
}

.sts-network-pill__icon .sts-icon-svg {
	width: 16px;
	height: 16px;
}


.sts-network-pill.sts-dragging {
	opacity: 0.4;
	border-style: dashed;
}

.sts-network-pill__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	color: #646970;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.sts-network-pill__remove:hover,
.sts-network-pill__remove:focus-visible {
	background: #d63638;
	color: #fff;
	outline: none;
}

/* ---------- Plain label list (no icon, no pill border) ---------- */

.sts-label-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 24px;
}

.sts-label-list__item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 120px;
	cursor: pointer;
}

.sts-label-list__item input:checked ~ span {
	font-weight: 600;
}

.sts-label-list__empty {
	margin: 0;
	font-style: italic;
}

.sts-labels-note {
	font-style: italic
}

/* ---------- Network picker (search-to-add) ---------- */

.sts-network-picker__label {
	margin: 0 0 10px;
	font-weight: 600;
}

.sts-network-picker__empty {
	margin: 16px 0 0;
	font-style: italic;
}

.sts-network-search {
	position: relative;
	width: 100%;
	max-width: 650px;
	margin-bottom: 20px;
}

.sts-network-search__icon {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	display: flex;
	color: #8c8f94;
	pointer-events: none;
}

.sts-network-search__icon .sts-icon-svg {
	width: 16px;
	height: 16px;
}

.sts-network-search .sts-network-search__input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px 12px 40px;
	border: 1px solid #dcdcde;
	border-radius: 20px;
	background: #fff;
	font-size: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sts-network-search .sts-network-search__input:focus {
	border-color: var(--sts-brand-600);
	outline: none;
	box-shadow: 0 0 0 3px var(--sts-brand-tint-strong);
}

.sts-network-search__dropdown {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sts-network-search__option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.sts-network-search__option:hover {
	background: var(--sts-brand-tint-strong);
}

.sts-network-search__option-icon .sts-icon-svg {
	width: 16px;
	height: 16px;
}

.sts-network-search__empty {
	padding: 8px 10px;
	color: #646970;
	font-style: italic;
}

/* ---------- Style variant cards ---------- */

.sts-style-cards {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.sts-style-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 16px;
	width: 140px;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Fixed widths above leave awkward dead space when only one card
   fits per row on narrow screens — let them fill the row instead. */
@media (max-width: 560px) {
	.sts-radio-card,
	.sts-style-card {
		width: auto;
		flex: 1 1 100%;
	}
}

.sts-style-card:hover {
	border-color: #8c8f94;
}

.sts-style-card.is-selected {
	border-color: var(--sts-brand-600);
	background: var(--sts-brand-tint-strong);
}

.sts-style-card__swatch {
	display: flex;
	gap: 8px;
}

.sts-style-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: #fff;
	background: #555;
	border-radius: 6px;
}

.sts-style-card__btn .sts-icon-svg {
	width: 15px;
	height: 15px;
}

.sts-style-square .sts-style-card__btn {
	border-radius: 0;
}

.sts-style-pill .sts-style-card__btn {
	border-radius: 999px;
}

.sts-style-icons .sts-style-card__btn {
	background: transparent;
	color: #555;
}

.sts-style-outline .sts-style-card__btn {
	background: transparent;
	color: #555;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1.5px #555;
}

.sts-style-official .sts-style-card__btn {
	border-radius: 4px;
}

.sts-style-text .sts-style-card__btn {
	background: #fff;
	color: #555;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px #555;
}

.sts-style-accent-border .sts-style-card__btn {
	background: #fff;
	color: #555;
	border-radius: 10px;
	box-shadow: 0 2px 0 0 #555, 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ---------- Live preview sidebar ---------- */

.sts-admin__preview {
	flex: 0 1 320px;
	min-width: 360px;
	position: sticky;
	top: 40px;
	background: linear-gradient(180deg, var(--sts-brand-tint) 0%, #ffffff 140px);
	border: 1px solid #e3e8f5;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(29, 78, 216, 0.05);
}

@media (max-width: 900px) {
	.sts-admin__preview {
		flex-basis: 100%;
		min-width: 0;
		position: static;
	}
}

.sts-admin__preview h3 {
	margin-top: 0;
}

.sts-admin__preview-subheading {
	padding-top: 16px;
	border-top: 1px solid #e3e8f5;
}

.sts-admin__preview-surface {
	padding: 20px;
	background: #f7faff;
	border-radius: 6px;
	overflow-x: auto;
}

.sts-admin__preview-hint {
	font-size: 12px;
	color: #787c82;
}

.sts-admin__about-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.sts-admin__about-links li {
	margin: 0;
	padding: 0;
}

.sts-admin__about-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid #e3e8f5;
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sts-admin__about-link:hover,
.sts-admin__about-link:focus-visible {
	border-color: var(--sts-brand-600);
	background: var(--sts-brand-tint-strong);
	box-shadow: 0 4px 10px rgba(29, 78, 216, 0.12);
	transform: translateY(-1px);
	outline: none;
}

.sts-admin__about-link-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.sts-admin__about-link-icon .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: #a7aaad;
	transition: color 0.15s ease;
}

.sts-admin__about-link:hover .sts-admin__about-link-icon .dashicons {
	color: var(--sts-brand-600);
}

.sts-admin__about-link-stars {
	gap: 1px;
}

.sts-admin__about-link-stars .dashicons {
	width: 15px;
	height: 15px;
	font-size: 15px;
	color: #f0b849;
}

.sts-admin__about-link:hover .sts-admin__about-link-stars .dashicons {
	color: #f0b849;
}

.sts-admin__about-link-text {
	flex: 1 1 auto;
	font-weight: 600;
	color: #1d2327;
}

.sts-admin__about-link-arrow {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	font-size: 16px;
	color: #c3c4c7;
	transition: transform 0.15s ease, color 0.15s ease;
}

.sts-admin__about-link:hover .sts-admin__about-link-arrow {
	color: var(--sts-brand-600);
	transform: translateX(3px);
}

/* admin.js always renders Share as supported in the preview (unlike
   the frontend, frontend.js never runs here); keep it visible from the
   first paint so it doesn't pop in after DOMContentLoaded. */
.sts-admin__preview-surface .sts-share__item--native {
	display: block;
}

.sts-admin__preview-surface .sts-share--inline .sts-share__item--native {
	display: inline-flex;
}

/* Neutralizes the frontend's position: fixed so the bar renders
   inline inside this boxed preview panel. */
.sts-admin__preview-surface--floating {
	display: flex;
	min-height: 90px;
	overflow: visible;
}

.sts-admin__preview-surface--floating .sts-share--floating {
	position: static;
	top: auto;
	left: auto;
	right: auto;
}

.sts-admin__preview-surface--floating .sts-share--floating.sts-position-left {
	margin-right: auto;
}

.sts-admin__preview-surface--floating .sts-share--floating.sts-position-right {
	margin-left: auto;
}

.sts-admin__preview-empty {
	margin: 0;
	font-size: 13px;
	color: #787c82;
	font-style: italic;
}

.sts-admin__help {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e3e8f5;
}

.sts-admin__help h3 {
	margin-top: 0;
}

.sts-admin__help code {
	display: block;
	margin: 6px 0 12px;
	padding: 8px 10px;
	background: #f0f0f1;
	border-radius: 4px;
	font-size: 12px;
	word-break: break-all;
}
