/**
 * Smart MFO Sync — Frontend styles
 * Mobile-first.
 */

:root {
	--smfo-green: #1db954;
	--smfo-green-hover: #17a349;
	--smfo-blue: #1a56db;
	--smfo-dark: #111827;
	--smfo-gray-1: #374151;
	--smfo-gray-2: #6b7280;
	--smfo-gray-3: #d1d5db;
	--smfo-gray-4: #f3f4f6;
	--smfo-radius: 14px;
	--smfo-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

/* ============ ARCHIVE / LISTING ============ */

.smfo-archive {
	max-width: 900px;
	margin: 0 auto;
	padding: 16px;
	color: var(--smfo-dark);
}

.smfo-hero {
	background: linear-gradient(135deg, #1a56db 0%, #1142a8 100%);
	color: #fff;
	text-align: center;
	padding: 36px 16px 40px;
	border-radius: var(--smfo-radius);
	margin-bottom: 16px;
}

.smfo-hero h1 {
	font-size: clamp(22px, 5vw, 32px);
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 10px;
}

.smfo-hero p {
	opacity: .85;
	max-width: 480px;
	margin: 0 auto 24px;
}

.smfo-hero-stats {
	display: flex;
	justify-content: center;
	gap: 24px;
	flex-wrap: wrap;
}

.smfo-stat strong {
	display: block;
	font-size: 22px;
	font-weight: 700;
}

.smfo-stat span {
	font-size: 12px;
	opacity: .75;
}

/* ============ FILTERS / SORT ============ */

.smfo-filters,
.smfo-sort {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	background: #fff;
	border: 1px solid var(--smfo-gray-3);
	border-radius: var(--smfo-radius);
	padding: 12px 14px;
	margin-bottom: 12px;
}

.smfo-filter-label,
.smfo-sort-label {
	font-size: 13px;
	color: var(--smfo-gray-2);
	font-weight: 500;
	margin-right: 4px;
}

.smfo-filter-btn,
.smfo-sort-btn {
	padding: 6px 14px;
	border: 1.5px solid var(--smfo-gray-3);
	border-radius: 20px;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: var(--smfo-gray-1);
	cursor: pointer;
	transition: all .15s;
}

.smfo-filter-btn:hover,
.smfo-sort-btn:hover {
	border-color: var(--smfo-blue);
	color: var(--smfo-blue);
}

.smfo-filter-btn.smfo-active,
.smfo-sort-btn.smfo-active {
	background: var(--smfo-blue);
	border-color: var(--smfo-blue);
	color: #fff;
}

/* ============ OFFERS LIST ============ */

.smfo-offers-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 24px;
}

.smfo-card {
	background: #fff;
	border: 1px solid var(--smfo-gray-3);
	border-radius: var(--smfo-radius);
	box-shadow: var(--smfo-shadow);
	display: grid;
	grid-template-columns: 100px 1fr auto;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}

.smfo-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, .13);
	transform: translateY(-1px);
}

.smfo-card-logo {
	padding: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-right: 1px solid var(--smfo-gray-4);
}

.smfo-card-logo img {
	width: 68px;
	height: 44px;
	object-fit: contain;
	border-radius: 6px;
}

.smfo-badge {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 10px;
	white-space: nowrap;
}

.smfo-badge-free {
	background: #dcfce7;
	color: #15803d;
}

.smfo-badge-paid {
	background: #fef9c3;
	color: #854d0e;
}

.smfo-card-info {
	padding: 14px 16px;
}

.smfo-card-name {
	font-size: 16px;
	font-weight: 700;
	color: var(--smfo-dark);
	text-decoration: none;
	display: block;
	margin-bottom: 4px;
}

.smfo-card-name:hover {
	color: var(--smfo-blue);
}

.smfo-card-subtitle {
	font-size: 13px;
	color: var(--smfo-gray-2);
	margin-bottom: 10px;
}

.smfo-card-params {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.smfo-param {
	display: flex;
	flex-direction: column;
}

.smfo-param-val {
	font-size: 15px;
	font-weight: 600;
}

.smfo-param-key {
	font-size: 11px;
	color: var(--smfo-gray-2);
	margin-top: 1px;
}

.smfo-card-action {
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-left: 1px solid var(--smfo-gray-4);
	min-width: 130px;
}

.smfo-cta {
	display: inline-block;
	background: var(--smfo-green);
	color: #fff !important;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 10px;
	white-space: nowrap;
	transition: background .15s;
}

.smfo-cta:hover {
	background: var(--smfo-green-hover);
}

.smfo-already-clicked {
	opacity: 0.7;
	position: relative;
}

.smfo-already-clicked::before {
	content: 'Ви вже бачили';
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 11px;
	color: var(--smfo-gray-2);
	background: var(--smfo-gray-4);
	padding: 2px 8px;
	border-radius: 10px;
}

/* ============ MOBILE ============ */

@media (max-width: 600px) {
	.smfo-card {
		grid-template-columns: 1fr;
	}

	.smfo-card-logo {
		flex-direction: row;
		justify-content: flex-start;
		border-right: none;
		border-bottom: 1px solid var(--smfo-gray-4);
		padding: 12px 14px;
	}

	.smfo-card-action {
		border-left: none;
		border-top: 1px solid var(--smfo-gray-4);
		padding: 12px 14px;
		justify-content: stretch;
	}

	.smfo-cta {
		width: 100%;
		text-align: center;
	}

	.smfo-hero-stats {
		gap: 16px;
	}
}

/* ============ SKELETON ============ */

.smfo-skeleton {
	background: linear-gradient(90deg, var(--smfo-gray-4) 0%, #fff 50%, var(--smfo-gray-4) 100%);
	background-size: 200% 100%;
	height: 100px;
	border-radius: var(--smfo-radius);
	animation: smfo-shimmer 1.4s infinite;
}

@keyframes smfo-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ============ SINGLE ============ */

.smfo-single {
	max-width: 800px;
	margin: 0 auto;
	padding: 16px;
}

.smfo-single-header {
	background: #fff;
	border: 1px solid var(--smfo-gray-3);
	border-radius: var(--smfo-radius);
	padding: 24px;
	margin-bottom: 24px;
	text-align: center;
}

.smfo-single-header h1 {
	font-size: clamp(22px, 4vw, 28px);
	margin: 12px 0;
}

.smfo-logo img {
	max-width: 120px;
	height: auto;
}

.smfo-free-badge,
.smfo-paused-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 16px;
}

.smfo-free-badge {
	background: #dcfce7;
	color: #15803d;
}

.smfo-paused-badge {
	background: #fef3c7;
	color: #92400e;
}

.smfo-cta-wrap .smfo-cta {
	font-size: 16px;
	padding: 14px 32px;
}

.smfo-content h2 {
	font-size: 22px;
	margin: 28px 0 12px;
	color: var(--smfo-dark);
}

.smfo-content h3 {
	font-size: 17px;
	margin: 20px 0 8px;
}

.smfo-content p {
	line-height: 1.6;
	margin-bottom: 12px;
}

.smfo-content ul,
.smfo-content ol {
	padding-left: 24px;
	margin-bottom: 16px;
}

.smfo-content li {
	margin-bottom: 6px;
	line-height: 1.5;
}

.smfo-conditions-table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.smfo-conditions-table th,
.smfo-conditions-table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--smfo-gray-4);
	text-align: left;
}

.smfo-conditions-table th {
	background: var(--smfo-gray-4);
	font-weight: 600;
	width: 50%;
}

/* ============ ALTERNATIVES ============ */

.smfo-alternatives-wrap {
	margin: 32px 0;
}

.smfo-alternatives-cta {
	background: #fef9c3;
	border: 1px solid #facc15;
	border-radius: var(--smfo-radius);
	padding: 16px;
	margin: 16px 0;
}

.smfo-paused-notice {
	font-weight: 600;
	color: #854d0e;
	margin-bottom: 8px;
}

.smfo-alternatives-list {
	list-style: none;
	padding: 0;
}

.smfo-alternatives-list li {
	padding: 8px 0;
	border-bottom: 1px solid #fde68a;
}

.smfo-alternatives-list a {
	color: #854d0e;
	text-decoration: none;
	font-weight: 500;
}

/* ============ REPR EXAMPLE ============ */

.smfo-repr-example {
	background: #fff8e1;
	border-left: 4px solid #f59e0b;
	border-radius: 6px;
	padding: 14px 18px;
	margin: 24px 0;
	font-size: 13px;
}

.smfo-repr-example h3 {
	font-size: 13px;
	margin: 0 0 8px;
	color: #92400e;
	text-transform: uppercase;
	letter-spacing: .05em;
}

/* ============ LEGAL DISCLOSURE ============ */

.smfo-legal {
	background: #fff8e1;
	border-top: 3px solid #f59e0b;
	padding: 24px;
	border-radius: var(--smfo-radius);
	margin: 32px 0;
}

.smfo-legal h3 {
	font-size: 13px;
	font-weight: 700;
	color: #92400e;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 14px;
}

.smfo-warning {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 12px;
	color: #7f1d1d;
	line-height: 1.6;
	margin-bottom: 14px;
}

.smfo-legal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}

.smfo-legal-item {
	font-size: 12px;
	color: var(--smfo-gray-1);
	line-height: 1.6;
}

.smfo-legal-item strong {
	display: block;
	font-weight: 600;
	color: var(--smfo-dark);
	margin-bottom: 3px;
}

.smfo-legal-links {
	font-size: 12px;
	color: var(--smfo-gray-2);
}

.smfo-legal-links a {
	color: var(--smfo-blue);
}
