.sand-ig-works {
	width: 100%;
}


.sand-ig-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.sand-ig-tab {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	color: #374151;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 9px 13px;
}

.sand-ig-tab:hover,
.sand-ig-tab:focus-visible,
.sand-ig-tab.is-active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

.sand-ig-tab:focus-visible {
	outline: 3px solid #0ea5e9;
	outline-offset: 2px;
}

.sand-ig-grid {
	display: grid;
	grid-template-columns: repeat(var(--sand-ig-columns, 4), minmax(0, 1fr));
	gap: var(--sand-ig-gap, 16px);
}

.sand-ig-card {
	min-width: 0;
}

.sand-ig-thumb {
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
	border-radius: var(--sand-ig-image-radius, 0);
	overflow: hidden;
	position: relative;
}

.sand-ig-modal-trigger,
.sand-ig-thumb-static {
	background: transparent;
	border: 0;
	border-radius: var(--sand-ig-image-radius, 0);
	color: inherit;
	cursor: zoom-in;
	display: block;
	height: 100%;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
	width: 100%;
}

.sand-ig-thumb-static {
	cursor: default;
}

.sand-ig-thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.sand-ig-modal-trigger img {
	transition: transform 180ms ease;
}

.sand-ig-modal-trigger:hover img,
.sand-ig-modal-trigger:focus-visible img {
	transform: scale(1.035);
}

.sand-ig-modal-trigger:focus-visible {
	outline: 3px solid #0ea5e9;
	outline-offset: -3px;
}


.sand-ig-play-indicator {
	align-items: center;
	background: rgba(17, 24, 39, 0.78);
	border: 2px solid rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	display: flex;
	height: 52px;
	inset: 50% auto auto 50%;
	justify-content: center;
	pointer-events: none;
	position: absolute;
	transform: translate(-50%, -50%);
	transition: transform 180ms ease, background 180ms ease;
	width: 52px;
	z-index: 2;
}

.sand-ig-play-indicator::before {
	border-bottom: 11px solid transparent;
	border-left: 17px solid #fff;
	border-top: 11px solid transparent;
	content: '';
	display: block;
	margin-left: 4px;
}

.sand-ig-modal-trigger:hover .sand-ig-play-indicator,
.sand-ig-modal-trigger:focus-visible .sand-ig-play-indicator {
	background: rgba(17, 24, 39, 0.9);
	transform: translate(-50%, -50%) scale(1.06);
}

.sand-ig-thumb-placeholder {
	align-items: center;
	color: #6b7280;
	display: flex;
	font-size: 12px;
	font-weight: 700;
	height: 100%;
	justify-content: center;
	letter-spacing: 0;
	text-transform: uppercase;
	width: 100%;
}


.sand-ig-meta {
	color: #374151;
	font-size: 14px;
	line-height: 1.45;
	margin-top: 8px;
}

.sand-ig-meta time {
	color: #6b7280;
	display: block;
	font-size: 12px;
	margin-bottom: 4px;
}

.sand-ig-meta p {
	margin: 0;
}

.sand-ig-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 24px;
	min-height: 32px;
}

.sand-ig-load-more {
	color: #6b7280;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	min-height: 18px;
}

.sand-ig-modal-open {
	overflow: hidden;
}

.sand-ig-modal {
	align-items: center;
	box-sizing: border-box;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 99999;
}

.sand-ig-modal * {
	box-sizing: border-box;
}

.sand-ig-modal.is-open {
	display: flex;
}

.sand-ig-modal-backdrop {
	background: rgba(17, 24, 39, 0.78);
	inset: 0;
	position: absolute;
}

.sand-ig-modal-dialog {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(17, 24, 39, 0.34);
	max-height: calc(100vh - 48px);
	max-width: min(1120px, calc(100vw - 48px));
	overflow: hidden;
	position: relative;
	width: min(1120px, calc(100vw - 48px));
	z-index: 1;
}

.sand-ig-modal-close {
	align-items: center;
	background: rgba(17, 24, 39, 0.82);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 40px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 12px;
	top: 12px;
	width: 40px;
	z-index: 2;
}

.sand-ig-modal-close:hover,
.sand-ig-modal-close:focus-visible {
	background: #111827;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sand-ig-modal-close svg,
.sand-ig-modal-nav svg {
	display: block;
	fill: none;
	height: 22px;
	pointer-events: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.2;
	width: 22px;
}

.sand-ig-modal-nav {
	align-items: center;
	background: rgba(17, 24, 39, 0.82);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 46px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	z-index: 2;
}

.sand-ig-modal-prev {
	left: max(18px, calc((100vw - min(1120px, calc(100vw - 48px))) / 2 - 110px));
}

.sand-ig-modal-next {
	right: max(18px, calc((100vw - min(1120px, calc(100vw - 48px))) / 2 - 110px));
}

.sand-ig-modal-nav:hover,
.sand-ig-modal-nav:focus-visible {
	background: #111827;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sand-ig-modal-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
	max-height: calc(100vh - 48px);
}

.sand-ig-modal-media-list {
	background: #111827;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: calc(100vh - 48px);
	-ms-overflow-style: none;
	overflow-y: auto;
	padding: 12px;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.sand-ig-modal-media-list::-webkit-scrollbar {
	display: none;
}

.sand-ig-modal-media-item {
	background: #000;
	display: block !important;
	flex: 0 0 auto;
	line-height: 0;
	margin: 0;
	min-height: 0;
	overflow: hidden;
	position: relative !important;
	width: 100%;
}


.sand-ig-modal-media-item.is-video {
	align-items: center;
	display: flex !important;
	justify-content: center;
	min-height: calc(100vh - 72px);
}

.sand-ig-modal-video,
.sand-ig-modal-image {
	display: block !important;
	float: none !important;
	height: auto !important;
	margin: 0 !important;
	max-height: none !important;
	max-width: none !important;
	object-fit: contain;
	position: static !important;
	transform: none !important;
	width: 100% !important;
}

.sand-ig-modal-video {
	height: auto !important;
	margin: 0 auto !important;
	max-height: calc(100vh - 96px) !important;
	max-width: 100% !important;
	width: auto !important;
}


.sand-ig-modal-play {
	align-items: center;
	background: rgba(17, 24, 39, 0.78);
	border: 2px solid rgba(255, 255, 255, 0.94);
	border-radius: 50%;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 68px;
	inset: 50% auto auto 50%;
	justify-content: center;
	padding: 0;
	position: absolute;
	transform: translate(-50%, -50%);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease, background 160ms ease;
	width: 68px;
	z-index: 3;
}

.sand-ig-modal-play::before {
	border-bottom: 14px solid transparent;
	border-left: 22px solid currentColor;
	border-top: 14px solid transparent;
	content: '';
	display: block;
	margin-left: 6px;
}

.sand-ig-modal-play:hover,
.sand-ig-modal-play:focus-visible {
	background: rgba(17, 24, 39, 0.92);
	outline: 3px solid rgba(255, 255, 255, 0.9);
	outline-offset: 3px;
	transform: translate(-50%, -50%) scale(1.05);
}

.sand-ig-modal-play.is-hidden {
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(0.92);
	visibility: hidden;
}

.sand-ig-modal-caption {
	color: #374151;
	font-size: 14px;
	line-height: 1.45;
	max-height: calc(100vh - 48px);
	min-width: 0;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 64px 22px 22px;
	word-break: break-word;
}

.sand-ig-modal-kicker {
	color: #6b7280;
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 5px;
}

.sand-ig-modal-caption p {
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.sand-ig-modal-link {
	background: #111827;
	border-radius: 6px;
	color: #fff;
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	margin-top: 18px;
	padding: 11px 13px;
	text-decoration: none;
}

.sand-ig-modal-link:hover,
.sand-ig-modal-link:focus-visible {
	background: #374151;
	color: #fff;
	outline: 2px solid #9ca3af;
	outline-offset: 2px;
}

@media (max-width: 900px) {
	.sand-ig-grid {
		grid-template-columns: repeat(var(--sand-ig-tablet-columns, 3), minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.sand-ig-grid {
		gap: 10px;
		grid-template-columns: repeat(var(--sand-ig-mobile-columns, 2), minmax(0, 1fr));
	}

	.sand-ig-modal {
		padding: 12px;
	}

	.sand-ig-modal-nav {
		display: none;
	}

	.sand-ig-modal-dialog,
	.sand-ig-modal-layout {
		max-width: calc(100vw - 24px);
	}

	.sand-ig-modal-dialog {
		max-height: calc(100vh - 24px);
		width: calc(100vw - 24px);
	}

	.sand-ig-modal-layout {
		display: block;
		max-height: calc(100vh - 24px);
		overflow-y: auto;
	}

	.sand-ig-modal-media-list {
		gap: 10px;
		max-height: none;
		overflow: visible;
		padding: 10px;
	}

	.sand-ig-modal-media-item.is-video {
		min-height: auto;
	}

	.sand-ig-modal-video {
		max-height: calc(100vh - 180px) !important;
	}

	.sand-ig-modal-caption {
		border-top: 1px solid #e5e7eb;
		max-height: none;
		overflow: visible;
		padding: 18px 16px 20px;
	}
}


.sand-ig-infinity {
	background: var(--sand-ig-infinity-bg, #000);
	cursor: grab;
	height: var(--sand-ig-infinity-height, 680px);
	min-height: 360px;
	overflow: hidden;
	position: relative;
	touch-action: none;
	user-select: none;
}

.sand-ig-infinity.is-dragging {
	cursor: grabbing;
}

.sand-ig-infinity-scene {
	inset: 0;
	overflow: hidden;
	position: absolute;
}

.sand-ig-infinity-tile {
	left: 50%;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform-origin: 0 0;
	will-change: opacity, transform;
}

.sand-ig-infinity-tile img {
	display: block;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
	width: 100%;
}

.sand-ig-empty {
	align-items: center;
	color: #fff;
	display: flex;
	font-size: 14px;
	inset: 0;
	justify-content: center;
	line-height: 1.4;
	margin: 0;
	padding: 24px;
	position: absolute;
	text-align: center;
}
