.t1tg-feed {
	--t1tg-gap: 16px;
	--t1tg-radius: 12px;
	--t1tg-background: #fff;
	--t1tg-text-color: #222;
	--t1tg-muted-color: #68717a;
	--t1tg-button-background: #229ed9;
	--t1tg-button-color: #fff;
	--t1tg-button-border: #229ed9;
	--t1tg-card-padding: 16px;
	--t1tg-card-gap: 12px;
	--t1tg-card-border: #d9dde1;
	--t1tg-font-size: 16px;
	--t1tg-line-height: 1.5;
	--t1tg-button-radius: 8px;
	--t1tg-button-size: 16px;
	--t1tg-button-align: start;
	color: var(--t1tg-text-color);
	font-family: inherit;
}

.t1tg-feed__posts {
	display: grid;
	grid-template-columns: repeat(var(--t1tg-columns, 3), minmax(0, 1fr));
	gap: var(--t1tg-gap);
}

.t1tg-feed--list .t1tg-feed__posts {
	grid-template-columns: minmax(0, 1fr);
}

.t1tg-feed--masonry:not(.t1tg-feed--list) .t1tg-feed__posts {
	display: block;
	columns: var(--t1tg-columns, 3);
	column-gap: var(--t1tg-gap);
}

.t1tg-feed--masonry:not(.t1tg-feed--list) .t1tg-post {
	break-inside: avoid;
	margin-bottom: var(--t1tg-gap);
}

.t1tg-post {
	overflow: hidden;
	color: var(--t1tg-text-color);
	background: var(--t1tg-background);
	border: 1px solid var(--t1tg-card-border);
	border-radius: var(--t1tg-radius);
}

.t1tg-feed--shadow .t1tg-post {
	box-shadow: 0 10px 30px rgb(20 35 50 / 12%);
}

.t1tg-post__media {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px;
	background: #e9ecef;
}

.t1tg-post__media-item {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
	padding: 0;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #e9ecef;
	border: 0;
	cursor: zoom-in;
}

.t1tg-feed--ratio-1-1 .t1tg-post__media-item { aspect-ratio: 1 / 1; }
.t1tg-feed--ratio-4-3 .t1tg-post__media-item { aspect-ratio: 4 / 3; }
.t1tg-feed--ratio-3-2 .t1tg-post__media-item { aspect-ratio: 3 / 2; }
.t1tg-feed--ratio-16-9 .t1tg-post__media-item { aspect-ratio: 16 / 9; }
.t1tg-feed--ratio-16-10 .t1tg-post__media-item { aspect-ratio: 16 / 10; }

.t1tg-feed--ratio-original .t1tg-post__media-item {
	aspect-ratio: auto;
}

.t1tg-feed--ratio-original .t1tg-post__media-item img {
	height: auto;
	max-height: 70vh;
}

.t1tg-post__media--count-1 {
	grid-template-columns: minmax(0, 1fr);
}

.t1tg-post__media--count-3 .t1tg-post__media-item:first-child {
	grid-row: span 2;
}

.t1tg-post__media-item:nth-child(n+5) {
	display: none;
}

.t1tg-post__media-item img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.t1tg-post__play,
.t1tg-post__more-media {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	color: #fff;
	background: rgb(0 0 0 / 62%);
	border-radius: 999px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.t1tg-post__play {
	width: 3rem;
	height: 3rem;
}

.t1tg-post__more-media {
	inset: 0;
	border-radius: 0;
	transform: none;
	font-size: clamp(1.5rem, 5vw, 2.5rem);
	font-weight: 700;
}

.t1tg-post__content {
	display: grid;
	gap: var(--t1tg-card-gap);
	padding: var(--t1tg-card-padding);
}

.t1tg-post__text {
	overflow-wrap: anywhere;
	font-size: var(--t1tg-font-size);
	line-height: var(--t1tg-line-height);
}

.t1tg-feed--clamped .t1tg-post__text {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--t1tg-visible-lines);
}

.t1tg-post__text > :first-child { margin-top: 0; }
.t1tg-post__text > :last-child { margin-bottom: 0; }

.t1tg-post__date,
.t1tg-post__views {
	color: var(--t1tg-muted-color);
	font-size: 0.875em;
}

.t1tg-post__button,
.t1tg-feed__load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	padding: 0.65em 1em;
	color: var(--t1tg-button-color);
	background: var(--t1tg-button-background);
	border: 1px solid var(--t1tg-button-border);
	border-radius: var(--t1tg-button-radius);
	font: inherit;
	font-size: var(--t1tg-button-size);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.t1tg-post__button {
	justify-self: var(--t1tg-button-align);
}

.t1tg-feed__load-more { margin-top: var(--t1tg-gap); }
.t1tg-feed__load-more:disabled { cursor: wait; opacity: 0.65; }
.t1tg-feed__status { margin-inline-start: 0.75rem; color: var(--t1tg-muted-color); }
.t1tg-feed--error { padding: var(--t1tg-gap); background: var(--t1tg-background); border-radius: var(--t1tg-radius); }

body.t1tg-lightbox-open {
	overflow: hidden;
}

.t1tg-lightbox {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 36px);
	background: rgb(0 0 0 / 88%);
}

.t1tg-lightbox.t1tg-is-open {
	display: flex;
}

.t1tg-lightbox__dialog {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.t1tg-lightbox__content {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.t1tg-lightbox__content img,
.t1tg-lightbox__content video {
	display: block;
	max-width: min(100%, 1600px);
	max-height: calc(100vh - 90px);
	object-fit: contain;
}

.t1tg-lightbox__close,
.t1tg-lightbox__previous,
.t1tg-lightbox__next {
	position: absolute;
	z-index: 2;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	color: #fff;
	background: rgb(0 0 0 / 55%);
	border: 1px solid rgb(255 255 255 / 55%);
	border-radius: 50%;
	font-size: 25px;
	cursor: pointer;
}

.t1tg-lightbox__close { top: 0; right: 0; }
.t1tg-lightbox__previous { top: 50%; left: 0; transform: translateY(-50%); }
.t1tg-lightbox__next { top: 50%; right: 0; transform: translateY(-50%); }
.t1tg-lightbox__counter { position: absolute; bottom: 0; left: 50%; color: #fff; transform: translateX(-50%); }
.t1tg-lightbox__fallback { max-width: 540px; padding: 24px; color: #fff; text-align: center; }
.t1tg-lightbox__fallback img { margin: 0 auto 16px; }
.t1tg-lightbox__fallback a { display: inline-flex; padding: 0.7em 1em; color: #fff; background: #229ed9; border-radius: 8px; }

@media (max-width: 900px) {
	.t1tg-feed__posts {
		grid-template-columns: repeat(var(--t1tg-columns-tablet, 2), minmax(0, 1fr));
	}
	.t1tg-feed--masonry:not(.t1tg-feed--list) .t1tg-feed__posts {
		columns: var(--t1tg-columns-tablet, 2);
	}
}

@media (max-width: 580px) {
	.t1tg-feed__posts {
		grid-template-columns: repeat(var(--t1tg-columns-mobile, 1), minmax(0, 1fr));
	}
	.t1tg-feed--masonry:not(.t1tg-feed--list) .t1tg-feed__posts {
		columns: var(--t1tg-columns-mobile, 1);
	}
	.t1tg-lightbox__previous { left: 4px; }
	.t1tg-lightbox__next { right: 4px; }
}
