/**
 * TTR Download Limiter — Styles
 * All classes prefixed with .ttr-dl- to avoid theme conflicts.
 */

/* ── Validation errors inside the modal ─────────────────────────── */

.ttr-dl-validation-error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	padding: 10px 15px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
	font-family: Arial, sans-serif;
}

.ttr-dl-validation-error.ttr-dl-typo-suggestion {
	background-color: #fff3cd;
	color: #856404;
	border-color: #ffeeba;
}

.ttr-dl-fix-typo {
	color: #623662;
	font-weight: bold;
	text-decoration: underline;
	cursor: pointer;
}

.ttr-dl-fix-typo:hover {
	color: #4a1a4a;
}

/* ── Hide theme's blue checkmark when plugin content is shown ──── */

/* CSS :has() — parent .pro_downloadModal checks if it contains our content */
.pro_downloadModal:has(.ttr-dl-popup-override) .pro_downloadHeader::before,
.pro_downloadModal:has(.ttr-dl-upsell) .pro_downloadHeader::before {
	display: none !important;
}

/* JS fallback class — added by MutationObserver for browsers without :has() */
.ttr-dl-hide-checkmark .pro_downloadHeader::before {
	display: none !important;
}

/* ── Error icon ───────────────────────────────────────────────────── */

.ttr-dl-error-icon {
	text-align: center;
	margin-bottom: 12px;
	line-height: 1;
}

.ttr-dl-error-icon svg {
	width: 48px;
	height: 48px;
}

.ttr-dl-popup-override {
	text-align: center;
	padding: 10px 0;
}

/* ── Backend error in popup ─────────────────────────────────────── */

.ttr-dl-error {
	color: #721c24;
	padding: 15px;
	font-family: Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
}

/* ── Upsell content inside #success_msg popup ───────────────────── */

.ttr-dl-upsell {
	padding: 20px 15px;
	text-align: center;
	font-family: Arial, sans-serif;
}

.ttr-dl-upsell-icon {
	margin-bottom: 12px;
	line-height: 1;
}

.ttr-dl-upsell-icon svg {
	width: 48px;
	height: 48px;
}

.ttr-dl-upsell-title {
	color: #623662;
	font-size: 20px;
	margin: 0 0 12px;
	font-weight: 700;
	text-align: center;
}

.ttr-dl-upsell p {
	font-size: 14px;
	color: #333;
	line-height: 1.6;
	margin: 8px 0;
}

/* ── Pricing cards ────────────────���─────────────────────────────── */

.ttr-dl-upsell-plans {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin: 20px 0;
	flex-wrap: wrap;
}

.ttr-dl-plan {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 18px 15px;
	flex: 1;
	min-width: 180px;
	max-width: 220px;
	text-align: center;
}

.ttr-dl-plan h4 {
	color: #623662;
	margin: 0 0 5px;
	font-size: 16px;
}

.ttr-dl-price {
	font-size: 28px;
	font-weight: 700;
	color: #623662;
	margin: 5px 0;
}

.ttr-dl-plan > p {
	font-size: 13px;
	color: #666;
	margin: 5px 0 10px;
}

.ttr-dl-plan-features {
	list-style: none;
	padding: 0;
	margin: 0 0 15px;
	text-align: left;
}

.ttr-dl-plan-features li {
	font-size: 13px;
	color: #333;
	padding: 3px 0 3px 18px;
	position: relative;
	line-height: 1.4;
}

.ttr-dl-plan-features li::before {
	content: '\2713';
	color: #623662;
	font-weight: bold;
	position: absolute;
	left: 0;
}

.ttr-dl-plan-featured {
	border-color: #623662;
	box-shadow: 0 0 0 2px #623662;
	position: relative;
}

.ttr-dl-plan-featured::before {
	content: 'BEST VALUE';
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	background: #623662;
	color: #fff;
	font-size: 10px;
	padding: 2px 10px;
	border-radius: 3px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

/* ── Buy button ────────────────────────��────────────────────────── */

.ttr-dl-btn-primary {
	display: inline-block;
	background: #623662 !important;
	color: #fff !important;
	padding: 9px 22px;
	border-radius: 4px;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background 0.2s;
}

.ttr-dl-btn-primary:hover {
	background: #4a1a4a !important;
	color: #fff !important;
}

/* ── Trial and info links ───────────────────────────────────────── */

.ttr-dl-trial-link {
	margin-top: 10px;
}

.ttr-dl-trial-link a {
	color: #623662;
	text-decoration: underline;
	font-size: 14px;
}

.ttr-dl-trial-link a:hover {
	color: #4a1a4a;
}

.ttr-dl-check-email {
	font-size: 12px !important;
	color: #888 !important;
	font-style: italic;
	margin-top: 8px;
}

/* ── Success popup ──────────────────────────────────────────────── */

.ttr-dl-success {
	padding: 20px 15px;
	text-align: center;
	font-family: Arial, sans-serif;
}

.ttr-dl-success-icon {
	margin-bottom: 12px;
	line-height: 1;
}

.ttr-dl-success-icon svg {
	width: 48px;
	height: 48px;
}

.ttr-dl-success-title {
	color: #27ae60;
	font-size: 20px;
	margin: 0 0 12px;
	font-weight: 700;
	text-align: center;
}

.ttr-dl-success p {
	font-size: 15px;
	color: #333;
	line-height: 1.6;
	margin: 8px 0;
}

/* Hide theme checkmark on custom success popup too */
.pro_downloadModal:has(.ttr-dl-success) .pro_downloadHeader::before {
	display: none !important;
}

/* ── DefiniteSEO pitch inside success popup ─────────────────────── */

.ttr-dl-dseo-pitch {
	text-align: center;
	font-family: Arial, sans-serif;
	margin-top: 5px;
}

.ttr-dl-dseo-divider {
	height: 1px;
	background: linear-gradient(to right, transparent, #D4960E, transparent);
	margin: 0 20px 18px;
}

.ttr-dl-dseo-badge {
	display: block;
	background: #8a588a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	padding: 8px 14px;
	margin: 0 0 18px;
	text-align: center;
}

.ttr-dl-dseo-content {
	background: linear-gradient(135deg, #FFFDF7 0%, #FFF8E8 100%);
	border: 1px solid #f0d48a;
	border-radius: 8px;
	padding: 22px 20px;
	margin: 0 10px;
}

.ttr-dl-dseo-header {
	margin-bottom: 8px;
}

.ttr-dl-dseo-logo {
	height: 30px;
	width: auto;
}

.ttr-dl-dseo-title {
	color: #1E1E1E;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
}

.ttr-dl-dseo-desc {
	color: #4a4a4a;
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 14px;
}

.ttr-dl-dseo-features {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 16px;
	margin-bottom: 16px;
}

.ttr-dl-dseo-features span {
	font-size: 12px;
	color: #333;
	font-weight: 600;
	white-space: nowrap;
}

.ttr-dl-dseo-features span::first-letter {
	color: #D4960E;
}

.ttr-dl-dseo-btn {
	display: inline-block;
	background: #D4960E !important;
	color: #fff !important;
	padding: 10px 28px;
	border-radius: 5px;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: background 0.2s;
	box-shadow: 0 2px 8px rgba(212, 150, 14, 0.3);
}

.ttr-dl-dseo-btn:hover {
	background: #B07B08 !important;
	color: #fff !important;
}

.ttr-dl-dseo-sub {
	font-size: 11px !important;
	color: #999 !important;
	margin-top: 8px !important;
	margin-bottom: 0 !important;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media only screen and (max-width: 480px) {
	.ttr-dl-upsell-plans {
		flex-direction: column;
		align-items: center;
	}

	.ttr-dl-plan {
		max-width: 100%;
		width: 100%;
	}

	.ttr-dl-upsell-title {
		font-size: 18px;
	}

	.ttr-dl-price {
		font-size: 24px;
	}
}
