/* Social Media Share Buttons — admin settings styles */

.smsb-admin {
	margin-right: 20px;
}

.smsb-admin__header {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 20px 0 24px;
	padding: 24px 28px;
	border-radius: 12px;
	background: linear-gradient(135deg, #1d4ed8 0%, #2271b1 55%, #0a66c2 100%);
	box-shadow: 0 4px 14px rgba(21, 60, 117, 0.25);
	color: #fff;
}

.smsb-admin__header-icon {
	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);
}

.smsb-admin__header-icon .smsb-icon-svg {
	width: 26px;
	height: 26px;
	color: #fff;
	fill: #fff;
}

.smsb-admin__header-text {
	flex: 1 1 auto;
	min-width: 0;
}

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

.smsb-admin__header-meta {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	align-self: center;
	gap: 10px;
}

.smsb-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;
}

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

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

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

.smsb-admin__notice[hidden] {
	display: none;
}

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

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

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

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

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

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

.smsb-admin__tab:hover {
	color: #2271b1;
	background: rgba(34, 113, 177, 0.08);
}

.smsb-admin__tab:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.smsb-admin__tab.is-active {
	background: #2271b1;
	color: #fff;
	box-shadow: 0 2px 6px rgba(34, 113, 177, 0.35);
}

.smsb-admin__tab.is-active:hover {
	color: #fff;
	background: #2271b1;
}

.smsb-admin__panel[hidden] {
	display: none;
}

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

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

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

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

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

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

@media (max-width: 900px) {
	.smsb-admin__preview {
		flex-basis: 100%;
	}
}

.smsb-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 20px 24px;
	margin-bottom: 20px;
}

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

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

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

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

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

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

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

.smsb-range {
	flex: 1;
}

.smsb-range__value {
	min-width: 42px;
	font-weight: 600;
	color: #2271b1;
}

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

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

.smsb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 420px;
	margin: 14px 0;
}

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

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

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

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

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

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

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

.smsb-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;
}

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

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

.smsb-radio-card.is-selected {
	border-color: #2271b1;
	background: #f0f6fc;
}

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

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

/* ---------- Network chip checkboxes ---------- */

.smsb-network-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.smsb-network-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 2px solid #dcdcde;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.smsb-network-chip:hover {
	border-color: #8c8f94;
}

.smsb-network-chip input:checked ~ * {
	font-weight: 600;
}

.smsb-network-chip:has(input:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.smsb-network-chip__icon .smsb-icon-svg {
	width: 16px;
	height: 16px;
}

/* ---------- Draggable network pills (no checkbox, drag to reorder) ---------- */

.smsb-network-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.smsb-network-pill {
	position: relative;
	user-select: none;
}

.smsb-network-pill__label {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 2px solid #dcdcde;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.smsb-network-pill:hover .smsb-network-pill__label {
	border-color: #8c8f94;
}

.smsb-network-pill.is-selected .smsb-network-pill__label {
	border-color: #2271b1;
	background: #f0f6fc;
}

.smsb-network-pill.is-selected .smsb-network-pill__text {
	font-weight: 600;
}

/* Visually hidden but not display:none, so it stays focusable. */
.smsb-network-pill__checkbox {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.smsb-network-pill__checkbox:focus-visible ~ .smsb-network-pill__grip {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
	border-radius: 2px;
}

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

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

.smsb-network-pill.smsb-dragging {
	opacity: 0.4;
}

.smsb-network-pill.smsb-dragging .smsb-network-pill__label {
	border-style: dashed;
}

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

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

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

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

/* Applied (checkbox disabled) by admin.js when a network's pill is
   unchecked in the Networks list above. */
.smsb-label-list__item--disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

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

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

.smsb-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;
}

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

.smsb-style-card.is-selected {
	border-color: #2271b1;
	background: #f0f6fc;
}

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

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

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

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

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

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

.smsb-admin__preview {
	flex: 0 1 320px;
	min-width: 360px;
	position: sticky;
	top: 40px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 20px;
}

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

[data-smsb-preview-block][hidden] {
	display: none;
}

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

.smsb-admin__preview-subheading[hidden],
.smsb-admin__preview-surface[hidden] {
	display: none;
}

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

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

.smsb-admin__about-links {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.smsb-admin__about-links li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid #f0f0f1;
}

.smsb-admin__about-links li:first-child {
	border-top: 0;
}

.smsb-admin__about-links .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: #a7aaad;
}

.smsb-admin__about-links a {
	text-decoration: none;
	font-weight: 500;
}

.smsb-admin__about-links a:hover {
	text-decoration: underline;
}

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

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

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

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

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

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

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

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

.smsb-admin__help h4 {
	margin-top: 0;
}

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