/* 2Fifty Proof */

.tfsp-scope {
	--tfsp-bg: var(--tfsp-g-bg, #ffffff);
	--tfsp-text: var(--tfsp-g-text, #1f2937);
	--tfsp-accent: var(--tfsp-g-accent, #2563eb);
	--tfsp-star: var(--tfsp-g-star, #f59e0b);
	--tfsp-radius: var(--tfsp-g-radius, 12px);
}

/* ---------- Card (shared) ---------- */

.tfsp-card {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: center;
	box-sizing: border-box;
	padding: 12px 14px;
	background: var(--tfsp-bg);
	color: var(--tfsp-text);
	border-radius: var(--tfsp-radius);
	border: 1px solid color-mix(in srgb, var(--tfsp-text) 10%, transparent);
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
	text-align: left;
}

a.tfsp-card,
a.tfsp-card:hover,
a.tfsp-card:focus {
	color: var(--tfsp-text);
	text-decoration: none;
}

a.tfsp-card:focus-visible,
.tfsp-close:focus-visible {
	outline: 2px solid var(--tfsp-accent);
	outline-offset: 2px;
}

.tfsp-media {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: calc(var(--tfsp-radius) * 0.7);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--tfsp-accent) 12%, var(--tfsp-bg));
	color: var(--tfsp-accent);
}

.tfsp-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.tfsp-icon svg {
	width: 24px;
	height: 24px;
	display: block;
}

.tfsp-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tfsp-title {
	font-weight: 600;
	overflow-wrap: break-word;
}

.tfsp-message {
	opacity: 0.85;
	overflow-wrap: break-word;
}

.tfsp-stars {
	color: var(--tfsp-star);
	letter-spacing: 1px;
	font-size: 13px;
	line-height: 1;
}

.tfsp-stars-off {
	opacity: 0.25;
}

.tfsp-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	font-size: 12px;
	opacity: 0.7;
	margin-top: 2px;
}

.tfsp-meta:empty {
	display: none;
}

.tfsp-verified {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--tfsp-accent);
	font-weight: 600;
	opacity: 1;
}

.tfsp-verified svg {
	width: 13px;
	height: 13px;
}

/* ---------- Popups ---------- */

.tfsp-region {
	position: fixed;
	z-index: 99990;
	width: 360px;
	max-width: calc(100vw - 32px);
	pointer-events: none;
}

.tfsp-region.tfsp-bottom-left { left: 16px; bottom: 16px; }
.tfsp-region.tfsp-bottom-right { right: 16px; bottom: 16px; }
.tfsp-region.tfsp-top-left { left: 16px; top: 16px; }
.tfsp-region.tfsp-top-right { right: 16px; top: 16px; }

body.admin-bar .tfsp-region.tfsp-top-left,
body.admin-bar .tfsp-region.tfsp-top-right { top: 48px; }

.tfsp-toast-wrap {
	position: relative;
	pointer-events: auto;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
	border-radius: var(--tfsp-radius);
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tfsp-top-left .tfsp-toast-wrap,
.tfsp-top-right .tfsp-toast-wrap {
	transform: translateY(-16px) scale(0.98);
}

.tfsp-toast-wrap.is-visible {
	opacity: 1;
	transform: none;
}

.tfsp-toast-wrap .tfsp-card {
	padding-right: 34px;
}

.tfsp-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tfsp-text);
	opacity: 0.55;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	min-height: 0;
	box-shadow: none;
}

.tfsp-close:hover {
	opacity: 1;
	background: color-mix(in srgb, var(--tfsp-text) 8%, transparent);
	color: var(--tfsp-text);
}

.tfsp-close svg {
	width: 14px;
	height: 14px;
}

@media (max-width: 600px) {
	.tfsp-region {
		width: auto;
		max-width: none;
		left: 12px !important;
		right: 12px !important;
	}
	.tfsp-region.tfsp-bottom-left,
	.tfsp-region.tfsp-bottom-right { bottom: 12px; }
	.tfsp-region.tfsp-hide-mobile { display: none; }
	.tfsp-card { font-size: 13px; }
	.tfsp-media { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.tfsp-toast-wrap,
	.tfsp-top-left .tfsp-toast-wrap,
	.tfsp-top-right .tfsp-toast-wrap {
		transform: none;
		transition: opacity 0.2s linear;
	}
}

@media print {
	.tfsp-region { display: none !important; }
}

/* ---------- Inline feed ---------- */

.tfsp-feed {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.tfsp-feed .tfsp-card {
	align-items: flex-start;
	height: 100%;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tfsp-feed a.tfsp-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

@media (max-width: 1024px) {
	.tfsp-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.tfsp-feed { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Editor ---------- */

.tfsp-editor-preview {
	max-width: 360px;
}

.tfsp-editor-preview .tfsp-toast {
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.tfsp-editor-note,
.tfsp-empty {
	margin: 8px 0 0;
	font-size: 12px;
	color: #6b7280;
	font-style: italic;
}

.tfsp-empty {
	padding: 16px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
}
