/**
 * Pro features shown locked in Lite: the "Upgrade To Pro" pill, locked controls, and the
 * "Unlock this feature with Pro" popup. Self-contained (no other stylesheet needed) and written with
 * logical properties, so right-to-left screens mirror on their own.
 *
 * @package contactsheets-lite
 */

/* --------------------------------------------------------------------------
   The "Pro" tag after a Pro feature's title: the blue label of WPSyncSheets For WooCommerce Lite.
   -------------------------------------------------------------------------- */
.wpsslc-pro-tag {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-inline-start: 10px;
	padding: 5px 12px;
	border-radius: 5px;
	background: #4169e1;
	color: #fff;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	white-space: nowrap;
	text-decoration: none;
	vertical-align: middle;
	cursor: pointer;
}

/* The little arrow pointing at the option. */
.wpsslc-pro-tag::before {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 100%;
	margin-block-start: -5px;
	border: 5px solid transparent;
	border-inline-end-color: #4169e1;
}

.wpsslc-pro-tag:hover,
.wpsslc-pro-tag:focus {
	background: #3557c8;
	color: #fff;
}

.wpsslc-pro-tag:hover::before,
.wpsslc-pro-tag:focus::before {
	border-inline-end-color: #3557c8;
}

.wpsslc-pro-tag:focus-visible {
	outline: 2px solid #1e3a8a;
	outline-offset: 2px;
}

.wpsslc-pro-tag .wpsslc-pro-tag__lock.dashicons {
	width: 13px;
	height: 13px;
	font-size: 13px;
	line-height: 13px;
}

/* A smaller pill without the arrow, for tight places (a header card). */
.wpsslc-pro-tag.wpsslc-pro-tag--compact {
	margin-inline-start: 0;
	padding: 3px 8px;
	font-size: 11px;
	line-height: 14px;
}

.wpsslc-pro-tag.wpsslc-pro-tag--compact::before {
	display: none;
}

/* The existing locked icons (edit and drag on each header) open the popup too. */
[data-wpsslc-pro][role="button"] {
	cursor: pointer;
}

[data-wpsslc-pro][role="button"]:focus-visible {
	outline: 2px solid #4169e1;
	outline-offset: 2px;
	border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Locked previews of Pro features (a section, a card, a list column).
   -------------------------------------------------------------------------- */
.wpsslc-pro-locked {
	position: relative;
}

.wpsslc-pro-locked .wpsslc-pro-locked__muted {
	opacity: 0.55;
	pointer-events: none;
	user-select: none;
}

.wpsslc-pro-card {
	box-sizing: border-box;
	margin-block: 0 20px;
	padding: 20px 24px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}

.wpsslc-pro-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	margin-block-end: 6px;
}

.wpsslc-pro-card__title {
	margin: 0;
	color: #0f172a;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

/* The settings screens give every paragraph and heading their own side margins (some through an ID),
   which pushed the text to the right of the title: inside a card, everything lines up on its left edge. */
.wpsslc-pro-card .wpsslc-pro-card__title,
.wpsslc-pro-card .wpsslc-pro-card__text {
	margin-inline: 0 !important;
	padding-inline: 0 !important;
}

.wpsslc-pro-card {
	max-width: 100%;
}

/* On API Integration the first card sits under the redirect URI, not against it. */
.wpsslwp-api-settings-panel + .wpsslc-pro-card {
	margin-block-start: 24px;
}

.wpsslc-pro-card .wpsslc-pro-card__text {
	margin: 0;
	color: #64748b;
	font-size: 14px;
	line-height: 1.6;
}

.wpsslc-pro-card__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin-block-start: 12px;
	color: #334155;
	font-size: 13px;
}

.wpsslc-pro-card__body strong {
	color: #0f172a;
}

.wpsslc-pro-card__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid #c7d2fe;
	border-radius: 6px;
	background: #fff;
	color: #4169e1;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.wpsslc-pro-card__button:hover,
.wpsslc-pro-card__button:focus {
	border-color: #4169e1;
	background: #f5f7ff;
	color: #3557c8;
}

/* A locked switch (off), with its label and a lock. */
.wpsslc-pro-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #64748b;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.wpsslc-pro-switch__track {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: #e2e8f0;
}

.wpsslc-pro-switch__track::after {
	content: "";
	position: absolute;
	inset-block-start: 3px;
	inset-inline-start: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.wpsslc-pro-switch .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 16px;
}

.wpsslc-pro-switch:hover,
.wpsslc-pro-switch:focus-visible {
	color: #4169e1;
	outline: none;
}

.wpsslc-pro-switch:focus-visible .wpsslc-pro-switch__track {
	box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.25);
}

/* A locked list cell: a quiet link with a lock. */
.wpsslc-pro-cell {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: #64748b;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.wpsslc-pro-cell:hover,
.wpsslc-pro-cell:focus {
	color: #4169e1;
}

.wpsslc-pro-cell .dashicons {
	width: 14px;
	height: 14px;
	font-size: 14px;
	line-height: 14px;
}

/* The locked "User Agent" header card. */
.wpsslc-pro-header .contacttextfield {
	color: #94a3b8;
}

.wpsslc-pro-header .wpsslc-pro-header__switch {
	display: inline-block;
	width: 32px;
	height: 18px;
	border-radius: 999px;
	background: #e2e8f0;
	vertical-align: middle;
}

/* Pro controls shown as they are in Pro, dimmed (as WooCommerce Lite's disabled-pro-version);
   clicking one opens the popup. */
.wpsslc-pro-disabled,
.wpsslc-pro-disabled * {
	cursor: pointer !important;
}

.wpsslc-pro-disabled {
	opacity: 0.5;
}

.wpsslc-pro-disabled select,
.wpsslc-pro-disabled input {
	pointer-events: none;
}

/* A dimmed list fits its column (the settings give lists a fixed 400px width). */
.generalSetting-right.wpsslc-pro-disabled select {
	width: auto !important;
	min-width: 150px;
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   The popup, in the design of WPSyncSheets For WooCommerce Lite's Pro popup: the sync symbol of
   the WPSyncSheets logo at the top, the plugin's colour (#4169E1) and font (Inter).
   -------------------------------------------------------------------------- */
html.wpsslc-pro-modal-open {
	overflow: hidden;
}

.wpsslc-pro-modal {
	position: fixed;
	inset: 0;
	z-index: 100200;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.wpsslc-pro-modal[hidden] {
	display: none !important;
}

.wpsslc-pro-modal.is-open {
	opacity: 1;
}

.wpsslc-pro-modal *,
.wpsslc-pro-modal *::before,
.wpsslc-pro-modal *::after {
	box-sizing: border-box;
}

.wpsslc-pro-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	/* No visible scrollbar: the popup fits; only a very short window scrolls it. */
	scrollbar-width: none;
	padding: 32px 32px 24px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
	color: #1e293b;
	text-align: start;
	transform: translateY(8px) scale(0.98);
	transition: transform 0.18s ease;
}

.wpsslc-pro-modal__dialog::-webkit-scrollbar {
	display: none;
}

.wpsslc-pro-modal__dialog:focus {
	outline: none;
}

.wpsslc-pro-modal.is-open .wpsslc-pro-modal__dialog {
	transform: none;
}

.wpsslc-pro-modal__svg {
	display: inline-flex;
	line-height: 0;
}

.wpsslc-pro-modal__close {
	position: absolute;
	inset-block-start: 14px;
	inset-inline-end: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.wpsslc-pro-modal__close:hover {
	background: #f1f5f9;
	color: #1e293b;
}

.wpsslc-pro-modal__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
}

/* The sync symbol of the WPSyncSheets logo. */
.wpsslc-pro-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border: 1px solid #dbe3fb;
	border-radius: 50%;
	background: linear-gradient(135deg, #f5f7ff 0%, #e6ecfd 100%);
	box-shadow: 0 0 0 6px #f5f7ff;
}

.wpsslc-pro-modal__icon svg {
	display: block;
	width: 44px;
	height: 44px;
}

.wpsslc-pro-modal__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: #4169e1;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.5;
}

.wpsslc-pro-modal .wpsslc-pro-modal__title {
	margin: 0 0 8px;
	padding: 0;
	color: #0f172a;
	font-family: inherit;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
}

.wpsslc-pro-modal .wpsslc-pro-modal__text {
	margin: 0 0 20px;
	padding: 0;
	color: #475569;
	font-size: 14px;
	line-height: 1.6;
	text-align: center;
}

.wpsslc-pro-modal .wpsslc-pro-modal__product {
	color: #4169e1;
	font-weight: 600;
	white-space: nowrap;
}

.wpsslc-pro-modal .wpsslc-pro-modal__list-title {
	margin: 0 0 10px;
	padding: 0;
	color: #0f172a;
	font-size: 13px;
	font-weight: 600;
}

.wpsslc-pro-modal .wpsslc-pro-modal__list {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
	list-style: none;
}

.wpsslc-pro-modal .wpsslc-pro-modal__list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 4px 0;
	color: #334155;
	font-size: 13px;
	line-height: 1.5;
}

.wpsslc-pro-modal .wpsslc-pro-modal__list li .wpsslc-pro-modal__svg {
	flex: none;
	margin-block-start: 2px;
	color: #4169e1;
}

.wpsslc-pro-modal__actions {
	display: flex;
	gap: 12px;
}

.wpsslc-pro-modal__button {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpsslc-pro-modal__button--primary,
.wpsslc-pro-modal__button--primary:visited {
	background: #4169e1;
	box-shadow: 0 1px 2px rgba(65, 105, 225, 0.35);
	color: #fff;
}

.wpsslc-pro-modal__button--primary:hover,
.wpsslc-pro-modal__button--primary:focus {
	background: #547cf4;
	color: #fff;
}

.wpsslc-pro-modal__button--ghost {
	border-color: #e2e8f0;
	background: #fff;
	color: #334155;
}

.wpsslc-pro-modal__button--ghost:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
	color: #1e293b;
}

.wpsslc-pro-modal__button:focus-visible,
.wpsslc-pro-modal__close:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.3);
}

[dir="rtl"] .wpsslc-pro-modal__button--primary .wpsslc-pro-modal__svg {
	transform: scaleX(-1);
}

.wpsslc-pro-modal .wpsslc-pro-modal__note {
	margin: 14px 0 0;
	padding: 0;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

@media (max-width: 480px) {

	.wpsslc-pro-modal__dialog {
		padding: 28px 20px 20px;
	}

	.wpsslc-pro-modal__actions {
		flex-direction: column-reverse;
	}
}

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

	.wpsslc-pro-modal,
	.wpsslc-pro-modal__dialog {
		transition: none;
	}
}
