/* Portfolio Shorts viewer — YouTube Shorts-style layout */

.loopin-portfolio-shorts {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: stretch;
	justify-content: center;
}

.loopin-portfolio-shorts[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts.is-open {
	display: flex;
}

.loopin-portfolio-shorts-backdrop {
	position: absolute;
	inset: 0;
	background: #f9f9f9;
}

.loopin-portfolio-shorts-shell {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.loopin-portfolio-shorts-close {
	position: absolute;
	top: max(12px, env(safe-area-inset-top));
	inset-inline-start: max(12px, env(safe-area-inset-left));
	z-index: 6;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(15, 15, 15, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #0f0f0f;
	line-height: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.loopin-portfolio-shorts-close-icon {
	width: 20px;
	height: 20px;
	display: block;
}

.loopin-portfolio-shorts-close-icon path {
	stroke: currentColor;
	stroke-width: 2.3;
	stroke-linecap: round;
}

.loopin-portfolio-shorts-close:hover {
	transform: translateY(-1px);
	background: #fff;
	border-color: rgba(15, 15, 15, 0.24);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.loopin-portfolio-shorts-close:active {
	transform: scale(0.96);
}

.loopin-portfolio-shorts-close:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.loopin-portfolio-shorts-layout {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: max(12px, env(safe-area-inset-top)) 12px 12px;
	box-sizing: border-box;
	direction: ltr;
}

/* Only the card column scrolls vertically between posts */
.loopin-portfolio-shorts-track {
	flex: 0 0 auto;
	width: min(420px, calc((100vh - 96px) * 9 / 16));
	max-width: 420px;
	height: min(calc(100vh - 96px), calc(420px * 16 / 9));
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	border-radius: 16px;
	background: #000;
	scrollbar-width: none;
}

.loopin-portfolio-shorts-track::-webkit-scrollbar {
	display: none;
}

.loopin-portfolio-shorts-slide {
	min-height: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	align-items: stretch;
	justify-content: center;
	position: relative;
	box-sizing: border-box;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.loopin-portfolio-shorts-card {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
}

.loopin-portfolio-shorts-media-wrap {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.loopin-portfolio-shorts-media-track {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.loopin-portfolio-shorts-media-track::-webkit-scrollbar {
	display: none;
}

.loopin-portfolio-shorts-media-item {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	box-sizing: border-box;
	/* Keep media clear of bottom author/actions overlay */
	padding-bottom: 7.5rem;
}

.loopin-portfolio-shorts-media-item img,
.loopin-portfolio-shorts-media-item video {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	background: #000;
}

.loopin-portfolio-shorts-overlay {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 48px 14px 16px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.88) 100%);
	color: #fff;
	pointer-events: none;
	direction: rtl;
	text-align: start;
}

.loopin-portfolio-shorts-overlay a,
.loopin-portfolio-shorts-overlay button,
.loopin-portfolio-shorts-overlay .loopin-follow-button {
	pointer-events: auto;
}

.loopin-portfolio-shorts-media-dots {
	position: relative;
	left: auto;
	bottom: auto;
	transform: none;
	display: flex;
	justify-content: center;
	align-self: center;
	gap: 6px;
	z-index: 4;
	width: max-content;
	margin: 0 0 10px;
	pointer-events: none;
}

.loopin-portfolio-shorts-media-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
}

.loopin-portfolio-shorts-media-dot.is-active {
	background: #fff;
}

.loopin-portfolio-shorts-author {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	margin-bottom: 8px;
	flex-wrap: nowrap;
	width: 100%;
}

.loopin-portfolio-shorts-author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	object-fit: cover;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	border: 2px solid rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	background: #222;
}

.loopin-portfolio-shorts-author-name {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 160px;
}

.loopin-portfolio-shorts-follow {
	flex-shrink: 0;
}

.loopin-portfolio-shorts-follow .loopin-follow-control {
	flex-wrap: nowrap;
	align-items: center;
}

.loopin-portfolio-shorts-follow .loopin-follow-feedback {
	display: none !important;
}

.loopin-portfolio-shorts-follow .loopin-follow-button,
.loopin-portfolio-shorts-follow .loopin-follow-button--guest {
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	text-align: center;
	min-width: 6.75rem;
	white-space: nowrap;
	box-sizing: border-box;
}

.loopin-portfolio-shorts-follow .loopin-follow-button:not(.is-following),
.loopin-portfolio-shorts-follow .loopin-follow-button--guest {
	background: #0095f6;
	background-color: #0095f6;
	border-color: transparent;
	color: #fff;
}

.loopin-portfolio-shorts-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-align: start;
	width: 100%;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

button.loopin-portfolio-shorts-title {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	font-family: inherit;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.loopin-portfolio-shorts-description {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	opacity: 0.9;
	text-align: start;
	width: 100%;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.loopin-portfolio-shorts-description-trigger {
	margin: 0;
	font-family: inherit;
	font-weight: inherit;
	font-size: 13px;
	line-height: 1.45;
	opacity: 0.9;
	text-align: start;
	width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	color: #fff;
	padding: 0;
	box-shadow: none;
}

.loopin-portfolio-shorts-description-more {
	display: none;
}

/* Fixed rail — stays in place while cards scroll */
.loopin-portfolio-shorts-rail {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
	align-self: center;
}

.loopin-portfolio-shorts-rail-nav {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.loopin-portfolio-shorts-rail-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.loopin-portfolio-shorts-rail-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 48px;
	min-width: 48px;
}

.loopin-portfolio-shorts-rail-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 999px;
	background: rgba(15, 15, 15, 0.06);
	color: #0f0f0f;
	cursor: pointer;
	text-decoration: none;
	padding: 0;
	flex-shrink: 0;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.loopin-portfolio-shorts-rail-btn--nav {
	background: rgba(15, 15, 15, 0.06);
}

.loopin-portfolio-shorts-rail-btn.is-liked {
	color: #e62117;
}

.loopin-portfolio-shorts-rail-label {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 14px;
	font-size: 12px;
	font-weight: 500;
	color: #0f0f0f;
	text-align: center;
	line-height: 14px;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.loopin-portfolio-shorts-rail-label.is-empty,
.loopin-portfolio-shorts-rail-label--spacer {
	visibility: hidden;
}

.loopin-portfolio-shorts-rail-action--share .loopin-share-btn {
	font-size: 0;
	line-height: 0;
}

.loopin-portfolio-shorts-rail-icon {
	display: block;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	pointer-events: none;
}

.loopin-portfolio-shorts-rail-action .loopin-like-btn.is-liked .loopin-portfolio-shorts-rail-icon--like {
	color: #ef4444;
}

.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button {
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: rgba(15, 15, 15, 0.06);
	border: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0f0f0f;
	flex-shrink: 0;
}

.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button.is-saved {
	color: #0f0f0f;
}

.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button .loopin-save-post-icon {
	width: 22px;
	height: 22px;
	display: block;
}

/* Saved: white fill with dark outline (readable on light desktop rail). */
.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button.is-saved .loopin-save-post-icon--filled path {
	fill: #fff;
	stroke: #0f0f0f;
	stroke-width: 1.6;
	stroke-linejoin: round;
	paint-order: stroke fill;
}

.loopin-portfolio-shorts-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(249, 249, 249, 0.75);
	z-index: 4;
}

.loopin-portfolio-shorts-loading[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: #0f0f0f;
	border-radius: 50%;
	animation: loopin-shorts-spin 0.8s linear infinite;
}

@keyframes loopin-shorts-spin {
	to { transform: rotate(360deg); }
}

html.loopin-portfolio-shorts-open,
body.loopin-portfolio-shorts-open {
	overflow: hidden;
	overscroll-behavior: none;
}

/* Immersive shorts: hide site chrome so the viewer can own the viewport */
html.loopin-portfolio-shorts-open .loopin-mobile-bottom-nav,
html.loopin-portfolio-shorts-open .loopin-bottom-nav-submenu,
body.loopin-portfolio-shorts-open .loopin-mobile-bottom-nav,
body.loopin-portfolio-shorts-open .loopin-bottom-nav-submenu {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Mobile: full-height card column, rail overlaid on right */
@media (max-width: 767px) {
	.loopin-portfolio-shorts {
		inset: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
	}

	.loopin-portfolio-shorts-layout {
		position: relative;
		width: 100%;
		height: 100%;
		min-height: 0;
		padding: 0;
		gap: 0;
		align-items: stretch;
		overflow: hidden;
	}

	.loopin-portfolio-shorts-track {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		height: 100%;
		flex: 1;
		min-height: 0;
		border-radius: 0;
		background: #000;
		scroll-snap-type: y mandatory;
		overscroll-behavior-y: contain;
	}

	.loopin-portfolio-shorts-slide {
		flex: 0 0 var(--loopin-shorts-slide-height, 100%);
		height: var(--loopin-shorts-slide-height, 100%);
		min-height: var(--loopin-shorts-slide-height, 100%);
		max-height: var(--loopin-shorts-slide-height, 100%);
		overflow: hidden;
		flex-shrink: 0;
	}

	.loopin-portfolio-shorts-card {
		border-radius: 0;
		box-shadow: none;
		height: 100%;
		overflow: hidden;
	}

	.loopin-portfolio-shorts-rail {
		position: absolute;
		right: 8px;
		left: auto;
		top: 50%;
		transform: translateY(-50%);
		z-index: 5;
		gap: 10px;
	}

	.loopin-portfolio-shorts-rail-nav {
		display: none;
	}

	.loopin-portfolio-shorts-rail-action {
		width: 44px;
		min-width: 44px;
	}

	.loopin-portfolio-shorts-rail-btn {
		background: rgba(0, 0, 0, 0.45);
		color: #fff;
		width: 44px;
		height: 44px;
	}

	.loopin-portfolio-shorts-rail-btn--nav {
		background: rgba(0, 0, 0, 0.45);
	}

	.loopin-portfolio-shorts-rail-label {
		color: #fff;
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
		font-size: 11px;
		min-height: 13px;
		line-height: 13px;
	}

	.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button {
		background: rgba(0, 0, 0, 0.45);
		color: #fff;
		width: 44px;
		height: 44px;
	}

	.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button.is-saved {
		color: #fff;
	}

	.loopin-portfolio-shorts-rail-action--save .loopin-save-post-button.is-saved .loopin-save-post-icon--filled path {
		fill: #fff;
		stroke: none;
	}

	.loopin-portfolio-shorts-overlay {
		padding-inline-start: 14px;
		padding-inline-end: 72px;
		padding-bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px)));
		background: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0) 0%,
			rgba(0, 0, 0, 0.35) 42%,
			rgba(0, 0, 0, 0.78) 100%
		);
	}

	/* Keep full portfolio media visible (landscape images must not crop). */
	.loopin-portfolio-shorts-media-item {
		padding-bottom: 6.75rem;
	}

	.loopin-portfolio-shorts-media-item img {
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
		object-position: center;
	}

	.loopin-portfolio-shorts-media-item video {
		object-fit: contain;
		object-position: center;
	}

	/*
	 * Native mute sits under the author overlay on mobile. Hide it and use the
	 * rail mute control (z-index above the overlay) instead.
	 */
	.loopin-portfolio-shorts-media-item video::-webkit-media-controls-mute-button,
	.loopin-portfolio-shorts-media-item video::-webkit-media-controls-volume-slider,
	.loopin-portfolio-shorts-media-item video::-webkit-media-controls-volume-control-container {
		display: none !important;
	}

	.loopin-portfolio-shorts-rail-action--mute {
		order: -1;
	}

	.loopin-portfolio-shorts-close {
		top: max(10px, env(safe-area-inset-top));
		inset-inline-start: max(10px, env(safe-area-inset-left));
		width: 46px;
		height: 46px;
		border-color: rgba(255, 255, 255, 0.28);
		background: rgba(0, 0, 0, 0.5);
		color: #fff;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
	}

	.loopin-portfolio-shorts-description-trigger,
	button.loopin-portfolio-shorts-title {
		pointer-events: auto;
		border: 0;
		background: transparent;
		color: #fff;
		font: inherit;
		padding: 0;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.loopin-portfolio-shorts-description-more {
		display: inline;
		font-weight: 700;
		opacity: 0.95;
	}

	.loopin-portfolio-shorts-description-more::before {
		content: '… ';
	}
}

@media (min-width: 768px) {
	.loopin-portfolio-shorts-layout {
		align-items: center;
		justify-content: center;
		direction: ltr;
		gap: 12px;
		padding-top: 24px;
		padding-bottom: 24px;
	}

	.loopin-portfolio-shorts-track {
		display: flex;
		flex-direction: column;
		flex: 0 0 auto;
		width: min(420px, calc((100vh - 96px) * 9 / 16));
		min-width: 0;
		height: min(calc(100vh - 96px), calc(420px * 16 / 9));
		overflow-y: auto;
		overflow-x: hidden;
		/* JS advances one slide per wheel gesture; snap is backup for keyboard/programmatic scroll. */
		scroll-snap-type: y mandatory;
		scroll-snap-stop: always;
		overscroll-behavior-y: contain;
		overscroll-behavior-x: none;
	}

	.loopin-portfolio-shorts-slide {
		flex: 0 0 100%;
		min-height: 100%;
		height: 100%;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	.loopin-portfolio-shorts-rail {
		flex-shrink: 0;
		align-self: center;
	}

	.loopin-portfolio-shorts-description-trigger {
		pointer-events: none;
		cursor: default;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	.loopin-portfolio-shorts-description-more {
		display: none !important;
	}
}

body.loopin-rtl .loopin-portfolio-shorts-layout {
	direction: ltr;
}

/* Mobile description bottom sheet */
.loopin-portfolio-shorts-desc-sheet {
	position: fixed;
	inset: 0;
	z-index: 12;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
}

.loopin-portfolio-shorts-desc-sheet[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts-desc-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.42);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: loopin-shorts-desc-backdrop-in 0.22s ease;
}

.loopin-portfolio-shorts-desc-sheet-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-height: min(72vh, 560px);
	display: flex;
	flex-direction: column;
	padding: 6px 14px calc(14px + env(safe-area-inset-bottom, 0px));
	border-radius: 20px 20px 0 0;
	background: #fff;
	box-shadow: 0 -4px 28px rgba(15, 23, 42, 0.1);
	box-sizing: border-box;
	direction: rtl;
	text-align: start;
	animation: loopin-shorts-desc-sheet-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.loopin-portfolio-shorts-desc-sheet-handle {
	width: 32px;
	height: 3px;
	margin: 0 auto 10px;
	border-radius: 999px;
	background: #e5e7eb;
	flex-shrink: 0;
}

.loopin-portfolio-shorts-desc-sheet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
	flex-shrink: 0;
}

.loopin-portfolio-shorts-desc-sheet-heading {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	color: #6b7280;
	letter-spacing: 0.01em;
}

.loopin-portfolio-shorts-desc-sheet-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #9ca3af;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: color 0.15s ease, background 0.15s ease;
}

.loopin-portfolio-shorts-desc-sheet-close:hover,
.loopin-portfolio-shorts-desc-sheet-close:focus-visible {
	color: #374151;
	background: #f3f4f6;
}

.loopin-portfolio-shorts-desc-sheet-post-title {
	margin: 0 0 10px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.55;
	color: var(--loopin-text, #111);
	flex-shrink: 0;
}

.loopin-portfolio-shorts-desc-sheet-stats {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin-bottom: 12px;
	flex-shrink: 0;
	border: 1px solid #eef0f3;
	border-radius: 12px;
	overflow: hidden;
	background: #fafbfc;
}

.loopin-portfolio-shorts-desc-sheet-stats[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts-desc-stat {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	padding: 9px 6px;
	border-inline-end: 1px solid #eef0f3;
}

.loopin-portfolio-shorts-desc-stat:last-child {
	border-inline-end: 0;
}

.loopin-portfolio-shorts-desc-stat-value {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--loopin-text, #111);
}

.loopin-portfolio-shorts-desc-stat-value--date {
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.loopin-portfolio-shorts-desc-stat-label {
	font-size: 0.6875rem;
	line-height: 1.2;
	color: #9ca3af;
	font-weight: 500;
}

.loopin-portfolio-shorts-desc-sheet-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 2px 2px 4px;
	color: #4b5563;
	font-size: 0.8125rem;
	line-height: 1.75;
	white-space: pre-wrap;
	word-break: break-word;
}

@keyframes loopin-shorts-desc-backdrop-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes loopin-shorts-desc-sheet-in {
	from {
		opacity: 0;
		transform: translateY(100%);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (min-width: 768px) {
	.loopin-portfolio-shorts-desc-sheet {
		display: none !important;
	}
}

/* Comments sheet (mobile + desktop) */
.loopin-portfolio-shorts-comment-sheet {
	position: fixed;
	inset: 0;
	z-index: 13;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
}

.loopin-portfolio-shorts-comment-sheet[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts-comment-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.42);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.loopin-portfolio-shorts-comment-sheet-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: min(78vh, 620px);
	display: flex;
	flex-direction: column;
	padding: 6px 14px calc(14px + env(safe-area-inset-bottom, 0px));
	border-radius: 20px 20px 0 0;
	background: #fff;
	color: #0f172a;
	box-shadow: 0 -4px 28px rgba(15, 23, 42, 0.1);
	box-sizing: border-box;
	direction: rtl;
	text-align: start;
}

.loopin-portfolio-shorts-comment-sheet-handle {
	width: 32px;
	height: 3px;
	margin: 4px auto 10px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.14);
}

.loopin-portfolio-shorts-comment-sheet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.loopin-portfolio-shorts-comment-sheet-heading {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.loopin-portfolio-shorts-comment-sheet-close {
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.loopin-portfolio-shorts-comment-sheet-list {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 120px;
	max-height: min(48vh, 420px);
	padding: 4px 0 12px;
	color: #0f172a;
}

.loopin-portfolio-shorts-comment-sheet-list > .loopin-portfolio-shorts-comment + .loopin-portfolio-shorts-comment {
	margin-top: 12px;
}

.loopin-portfolio-shorts-comment {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	color: #0f172a;
}

.loopin-portfolio-shorts-comment .loopin-pin-comment-replies {
	border-inline-start-color: #e2e8f0;
}

.loopin-portfolio-shorts-comment-form .loopin-pin-comment-reply-hint {
	flex: 1 0 100%;
	background: #f1f5f9;
	color: #475569;
}

.loopin-portfolio-shorts-comment .loopin-pin-comment-author,
.loopin-portfolio-shorts-comment a.loopin-pin-comment-author-link {
	color: #0f172a;
}

.loopin-portfolio-shorts-comment .loopin-pin-comment-text {
	color: #0f172a;
}

.loopin-portfolio-shorts-comment .loopin-pin-comment-time {
	color: #64748b;
}

.loopin-portfolio-shorts-comment-sheet-empty {
	margin: 0 0 12px;
	font-size: 13px;
	color: #64748b;
	text-align: center;
}

.loopin-portfolio-shorts-comment-sheet-status {
	margin: 0 0 12px;
	font-size: 13px;
	color: #64748b;
	text-align: center;
}

.loopin-portfolio-shorts-comment-sheet-status.is-error {
	color: #b91c1c;
}

.loopin-portfolio-shorts-comment-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
	padding-top: 10px;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	flex-shrink: 0;
	width: 100%;
	box-sizing: border-box;
}

.loopin-portfolio-shorts-comment-form[hidden] {
	display: none !important;
}

.loopin-portfolio-shorts-comment-input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 42px;
	max-height: 120px;
	resize: none;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 14px;
	padding: 10px 12px;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
	background: #f8fafc;
	color: #0f172a;
}

.loopin-portfolio-shorts-comment-input:focus {
	outline: none;
	border-color: rgba(15, 23, 42, 0.28);
	background: #fff;
}

.loopin-portfolio-shorts-comment-submit {
	flex: 0 0 auto;
	flex-shrink: 0;
	border: 0;
	border-radius: 999px;
	background: #0f172a;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 16px;
	cursor: pointer;
	white-space: nowrap;
	min-width: 4.5rem;
}

.loopin-portfolio-shorts-comment-login {
	width: 100%;
	border: 0;
	border-radius: 12px;
	background: #f1f5f9;
	color: #0f172a;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 12px 14px;
	cursor: pointer;
	margin-top: 10px;
}

@media (min-width: 768px) {
	.loopin-portfolio-shorts-comment-sheet {
		align-items: center;
		padding: 24px;
	}

	.loopin-portfolio-shorts-comment-sheet-panel {
		border-radius: 20px;
		max-height: min(82vh, 680px);
	}
}

.loopin-portfolio-shorts-doubletap-heart {
	position: absolute;
	z-index: 6;
	width: 88px;
	height: 88px;
	margin: -44px 0 0 -44px;
	color: #fff;
	pointer-events: none;
	filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
	animation: loopin-shorts-doubletap-heart 0.85s ease-out forwards;
}

.loopin-portfolio-shorts-doubletap-heart svg {
	display: block;
	width: 100%;
	height: 100%;
}

@keyframes loopin-shorts-doubletap-heart {
	0% {
		opacity: 0;
		transform: scale(0.35);
	}
	18% {
		opacity: 1;
		transform: scale(1.15);
	}
	42% {
		opacity: 1;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		transform: scale(1.35) translateY(-18px);
	}
}
