/* ==========================================================================
   License Manager Pro v5.0.0 — Public Pages (Apple iOS aesthetic)
   Used by [lmp_redeem] and [lmp_purchase] shortcodes
   ========================================================================== */

.lmp-page {
	--lmp-brand: #6366F1;
	--lmp-text: #1D1D1F;
	--lmp-text-light: #6E6E73;
	--lmp-bg: #F5F5F7;
	--lmp-card-bg: #FFFFFF;
	--lmp-border: #D2D2D7;
	--lmp-border-light: #E5E5EA;
	--lmp-success: #34C759;
	--lmp-danger: #FF3B30;
	--lmp-radius-sm: 8px;
	--lmp-radius: 14px;
	--lmp-radius-lg: 20px;
	--lmp-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
	--lmp-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);

	max-width: 1080px;
	margin: 40px auto;
	padding: 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
	color: var(--lmp-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.lmp-page * { box-sizing: border-box; }

/* ─── Shared typography ─────────────────────────────────────────────── */
.lmp-page .lmp-title {
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -0.022em;
	margin: 0 0 12px;
	color: var(--lmp-text);
}
.lmp-page .lmp-subtitle {
	font-size: 18px;
	color: var(--lmp-text-light);
	margin: 0 0 32px;
	line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════
   REDEEM PAGE
   ═══════════════════════════════════════════════════════════════════ */

.lmp-redeem-page {
	max-width: 560px;
	padding-top: 40px;
}
.lmp-redeem-page .lmp-title { font-size: 32px; text-align: center; }
.lmp-redeem-page .lmp-subtitle { text-align: center; font-size: 16px; }

.lmp-redeem-page .lmp-card {
	background: var(--lmp-card-bg);
	border-radius: var(--lmp-radius-lg);
	padding: 48px 40px 40px;
	box-shadow: var(--lmp-shadow);
	position: relative;
}
.lmp-logo-badge {
	width: 64px;
	height: 64px;
	margin: 0 auto 24px;
	display: grid;
	place-items: center;
}
.lmp-logo-badge svg { border-radius: 16px; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25); }

.lmp-footer-note {
	text-align: center;
	margin-top: 24px;
	color: var(--lmp-text-light);
	font-size: 14px;
}
.lmp-footer-note a {
	color: var(--lmp-brand);
	text-decoration: none;
}

/* ─── Forms ─────────────────────────────────────────────────────────── */
.lmp-form { margin: 24px 0 0; }
.lmp-field { margin-bottom: 16px; }
.lmp-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--lmp-text);
	margin-bottom: 6px;
	letter-spacing: -0.01em;
}
.lmp-field .lmp-optional {
	color: var(--lmp-text-light);
	font-weight: 400;
	font-size: 12px;
}
.lmp-field input[type="text"],
.lmp-field input[type="email"] {
	width: 100%;
	padding: 14px 16px;
	font-size: 16px;
	border: 1px solid var(--lmp-border);
	border-radius: var(--lmp-radius-sm);
	background: var(--lmp-card-bg);
	color: var(--lmp-text);
	transition: border-color 0.15s, box-shadow 0.15s;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.lmp-field input:focus {
	outline: none;
	border-color: var(--lmp-brand);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--lmp-brand) 15%, transparent);
}

/* ─── Buttons ───────────────────────────────────────────────────────── */
.lmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	transition: all 0.15s ease;
	font-family: inherit;
	letter-spacing: -0.01em;
}
.lmp-btn-primary {
	background: var(--lmp-brand);
	color: #fff;
}
.lmp-btn-primary:hover {
	background: color-mix(in srgb, var(--lmp-brand) 85%, #000);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--lmp-brand) 30%, transparent);
}
.lmp-btn-primary:active { transform: translateY(0); }
.lmp-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}
.lmp-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lmp-spin 0.6s linear infinite;
}
.lmp-btn.is-loading .lmp-btn-label { display: none; }
.lmp-btn.is-loading .lmp-spinner { display: inline-block; }

@keyframes lmp-spin { to { transform: rotate(360deg); } }

/* ─── Result / Success ─────────────────────────────────────────────── */
.lmp-result {
	text-align: center;
	padding: 16px 0;
}
.lmp-success-icon {
	margin: 0 auto 16px;
	width: 64px;
	height: 64px;
}
.lmp-result h2 {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 8px;
	letter-spacing: -0.02em;
}
.lmp-result-subtitle {
	color: var(--lmp-text-light);
	margin: 0 0 24px;
	font-size: 15px;
}
.lmp-license-display {
	background: #F5F5F7;
	border: 2px dashed var(--lmp-brand);
	border-radius: var(--lmp-radius);
	padding: 20px 16px;
	margin: 16px 0;
	position: relative;
}
.lmp-license-display code {
	display: block;
	font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
	font-size: 18px;
	font-weight: 700;
	color: var(--lmp-brand);
	letter-spacing: 0.02em;
	word-break: break-all;
	margin-bottom: 12px;
}
.lmp-license-display .lmp-copy-btn {
	background: var(--lmp-brand);
	color: #fff;
	border: none;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	font-family: inherit;
}
.lmp-license-display .lmp-copy-btn:hover {
	background: color-mix(in srgb, var(--lmp-brand) 85%, #000);
}
.lmp-license-display .lmp-copy-btn.is-copied {
	background: var(--lmp-success);
}
.lmp-tier-info {
	display: flex;
	gap: 16px;
	justify-content: center;
	color: var(--lmp-text-light);
	font-size: 14px;
	margin: 16px 0;
}
.lmp-tier-info strong { color: var(--lmp-text); }
.lmp-instructions {
	color: var(--lmp-text-light);
	font-size: 14px;
	margin-top: 16px;
}

.lmp-error {
	background: #FFF5F5;
	border: 1px solid #FECACA;
	color: var(--lmp-danger);
	border-radius: var(--lmp-radius-sm);
	padding: 12px 16px;
	margin-top: 16px;
	font-size: 14px;
	text-align: center;
}
.lmp-error-inline {
	color: var(--lmp-danger);
	text-align: center;
	padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════════
   PURCHASE PAGE
   ═══════════════════════════════════════════════════════════════════ */

.lmp-purchase-page {
	max-width: 1080px;
	padding-top: 40px;
}
.lmp-pricing-header {
	text-align: center;
	margin-bottom: 40px;
}
.lmp-pricing-header .lmp-title {
	font-size: 48px;
	line-height: 1.1;
}
.lmp-pricing-header .lmp-subtitle {
	max-width: 640px;
	margin: 16px auto 0;
}

/* ─── Billing cycle toggle ───────────────────────────────────────── */
.lmp-billing-toggle {
	display: inline-flex;
	padding: 4px;
	background: #E5E5EA;
	border-radius: 999px;
	margin: 0 auto 32px;
	display: flex;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}
.lmp-toggle-btn {
	background: transparent;
	border: none;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	color: var(--lmp-text-light);
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.lmp-toggle-btn.is-active {
	background: #fff;
	color: var(--lmp-text);
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.lmp-save-badge {
	font-size: 10px;
	font-weight: 700;
	background: var(--lmp-success);
	color: #fff;
	padding: 2px 8px;
	border-radius: 999px;
	letter-spacing: 0.02em;
}

/* ─── Pricing grid ──────────────────────────────────────────────────── */
.lmp-pricing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
	align-items: stretch;
}
.lmp-pricing-card {
	background: var(--lmp-card-bg);
	border: 1px solid var(--lmp-border-light);
	border-radius: var(--lmp-radius-lg);
	padding: 32px 28px;
	position: relative;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
	display: flex;
	flex-direction: column;
}
.lmp-pricing-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--lmp-shadow-hover);
	border-color: var(--lmp-brand);
}
.lmp-pricing-card.lmp-popular {
	border: 2px solid var(--lmp-brand);
	box-shadow: 0 8px 28px color-mix(in srgb, var(--lmp-brand) 18%, transparent);
}
.lmp-badge {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--lmp-brand);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 14px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}
.lmp-tier-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--lmp-text-light);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 12px;
}
.lmp-price-wrap { margin-bottom: 24px; }
.lmp-price {
	font-size: 56px;
	font-weight: 700;
	color: var(--lmp-text);
	line-height: 1;
	letter-spacing: -0.03em;
}
.lmp-currency {
	font-size: 28px;
	font-weight: 500;
	vertical-align: top;
	margin-right: 2px;
}
.lmp-per {
	font-size: 18px;
	font-weight: 500;
	color: var(--lmp-text-light);
}
.lmp-price-period {
	font-size: 13px;
	color: var(--lmp-text-light);
	margin-top: 4px;
}

.lmp-feature-list {
	list-style: none;
	padding: 0;
	margin: 0 0 28px;
	flex: 1;
}
.lmp-feature-list li {
	padding: 8px 0 8px 28px;
	position: relative;
	font-size: 14px;
	color: var(--lmp-text);
	line-height: 1.5;
	border-bottom: 1px solid var(--lmp-border-light);
}
.lmp-feature-list li:last-child { border-bottom: 0; }
.lmp-feature-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	width: 18px;
	height: 18px;
	background: color-mix(in srgb, var(--lmp-brand) 15%, transparent);
	border-radius: 50%;
}
.lmp-feature-list li::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 17px;
	width: 6px;
	height: 3px;
	border-left: 2px solid var(--lmp-brand);
	border-bottom: 2px solid var(--lmp-brand);
	transform: rotate(-45deg);
}

/* ─── Checkout modal (shared with admin pattern) ────────────────── */
.lmp-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.lmp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.lmp-modal-content {
	position: relative;
	background: var(--lmp-card-bg);
	border-radius: var(--lmp-radius-lg);
	max-width: 440px;
	width: 100%;
	padding: 40px 32px 32px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	animation: lmp-modal-in 0.22s ease;
}
.lmp-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--lmp-border-light);
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px;
	color: var(--lmp-text-light);
	display: grid;
	place-items: center;
}
.lmp-modal-close:hover { background: var(--lmp-border); color: var(--lmp-text); }
.lmp-modal-content h2 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.lmp-checkout-summary {
	color: var(--lmp-text-light);
	margin: 0 0 24px;
	font-size: 15px;
}
.lmp-secure-note {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
	color: var(--lmp-text-light);
	font-size: 13px;
	margin-top: 16px;
}
.lmp-secure-note svg { color: var(--lmp-success); }

@keyframes lmp-modal-in {
	from { opacity: 0; transform: translateY(20px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 720px) {
	.lmp-page .lmp-title { font-size: 32px; }
	.lmp-pricing-header .lmp-title { font-size: 36px; }
	.lmp-price { font-size: 44px; }
	.lmp-redeem-page .lmp-card { padding: 32px 24px; }
}

/* ==========================================================================
   v5.0.3 — Purchase Picker (landing view at /purchase)
   ========================================================================== */

.lmp-purchase-picker {
	max-width: 1100px;
	margin: 0 auto;
	padding: 60px 20px 80px;
}

.lmp-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
	margin: 40px 0 32px;
}

.lmp-picker-card {
	background: #fff;
	border: 1px solid #e5e5ea;
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.lmp-picker-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.lmp-picker-banner {
	height: 140px;
	background-color: var(--lmp-brand);
	background-size: cover;
	background-position: center;
}
.lmp-picker-banner-placeholder {
	background: linear-gradient(135deg, var(--lmp-brand) 0%, rgba(255,255,255,0.35) 100%);
}

.lmp-picker-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.lmp-picker-heading {
	display: flex;
	align-items: center;
	gap: 12px;
}
.lmp-picker-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
}
.lmp-picker-icon-placeholder {
	background: var(--lmp-brand);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 600;
}
.lmp-picker-heading h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1d1d1f;
	letter-spacing: -0.01em;
}
.lmp-picker-tag {
	display: inline-block;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	background: #EDE9FE;
	color: #5B21B6;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.lmp-picker-desc {
	color: #3a3a3c;
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
}

.lmp-picker-features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.lmp-picker-features li {
	font-size: 14px;
	color: #3a3a3c;
	padding-left: 22px;
	position: relative;
	line-height: 1.4;
}
.lmp-picker-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--lmp-brand);
	font-weight: 700;
}

.lmp-picker-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #f0f0f2;
	gap: 12px;
	flex-wrap: wrap;
}
.lmp-picker-price {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.lmp-picker-from {
	font-size: 11px;
	color: #8e8e93;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 500;
}
.lmp-picker-amount {
	font-size: 26px;
	font-weight: 700;
	color: #1d1d1f;
	line-height: 1;
}
.lmp-picker-cycle {
	font-size: 13px;
	color: #6e6e73;
}
.lmp-picker-btn {
	flex-shrink: 0;
}

.lmp-picker-redeem-hint {
	text-align: center;
	margin-top: 32px;
	padding: 20px;
	background: #f5f5f7;
	border-radius: 12px;
}
.lmp-picker-redeem-hint p {
	margin: 0;
	font-size: 14px;
	color: #6e6e73;
}
.lmp-picker-redeem-hint a {
	color: var(--lmp-brand, #6366F1);
	font-weight: 500;
	text-decoration: none;
}
.lmp-picker-redeem-hint a:hover {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.lmp-purchase-picker { padding: 40px 16px 60px; }
	.lmp-picker-card:hover { transform: none; }
	.lmp-picker-footer { flex-direction: column; align-items: stretch; }
	.lmp-picker-btn { width: 100%; text-align: center; }
}
