/* Reel Post Mode — front-end styles */

:root {
	--plustag-accent: #E8622C;
}

.plustag-reel-float-btn {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999997;
	width: 56px !important;
	height: 56px !important;
	min-width: 56px !important;
	min-height: 56px !important;
	max-width: 56px !important;
	max-height: 56px !important;
	line-height: 56px !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	border: none !important;
	background: var(--plustag-accent) !important;
	background-image: none !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
	color: #fff !important;
	cursor: pointer;
	box-sizing: border-box !important;
	overflow: hidden;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.plustag-reel-float-btn .plustag-reel-tap-icon {
	width: 28px !important;
	height: 28px !important;
}

.plustag-reel-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.plustag-reel-modal {
	position: relative;
	background: #14161a;
	color: #fff;
	border-radius: 16px;
	padding: 28px 24px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	font-family: var(--plustag-reel-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.plustag-reel-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: none !important;
	border-radius: 50%;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
}

.plustag-reel-modal-close:hover,
.plustag-reel-modal-close:focus {
	background: rgba(255, 255, 255, 0.12) !important;
	box-shadow: none !important;
	outline: none;
}

.plustag-reel-logo img,
.plustag-logo-circle img,
img.plustag-logo-circle {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--plustag-accent);
	object-fit: contain;
	background: #fff;
	padding: 0;
	box-sizing: border-box;
}

.plustag-reel-modal-logo {
	display: block;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	border: 2px solid var(--plustag-accent);
	object-fit: contain;
	background: transparent;
	box-sizing: border-box;
	margin: 0 auto 12px;
}

.plustag-reel-modal h2 {
	font-size: 19px;
	margin: 0 0 8px;
}

.plustag-reel-modal p {
	font-size: 14px;
	opacity: 0.8;
	margin: 0 0 20px;
}

.plustag-reel-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.plustag-reel-btn {
	border: none;
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
}

.plustag-reel-btn-primary {
	background: var(--plustag-accent) !important;
	background-image: none !important;
	color: #fff !important;
	border: none !important;
}

.plustag-reel-btn-secondary {
	background: transparent !important;
	background-image: none !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.4) !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.plustag-reel-btn-secondary:hover,
.plustag-reel-btn-secondary:focus {
	background: rgba(255, 255, 255, 0.08) !important;
	box-shadow: none !important;
	outline: none;
}

.plustag-reel-modal-actions .plustag-reel-btn {
	width: 100%;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px 18px;
	border-radius: 14px;
	font-size: 15px;
	text-align: center;
}

.plustag-reel-modal-actions .plustag-reel-btn-primary {
	box-shadow: none !important;
}

.plustag-reel-modal-actions .plustag-reel-btn-secondary {
	font-size: 14px;
	font-weight: 500;
}

.plustag-reel-modal-actions .plustag-reel-tap-icon {
	width: 50px !important;
	height: 50px !important;
}

.plustag-reel-tap-icon {
	flex: none;
	width: 26px;
	height: 26px;
}

.plustag-reel-btn-text {
	background: transparent !important;
	background-image: none !important;
	color: var(--plustag-reel-button-border, #fff) !important;
	border: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
	padding: 6px 14px;
}

body.plustag-reel-overlay-open {
	overflow: hidden;
}

.plustag-reel-root {
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: #000;
	color: var(--plustag-reel-text-color, #fff);
	font-family: var(--plustag-reel-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.plustag-reel-modal {
	font-family: var(--plustag-reel-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.plustag-reel-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 5;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
	pointer-events: none;
}

.plustag-reel-topbar > * {
	pointer-events: auto;
}

.plustag-reel-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.plustag-reel-brand-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: var(--plustag-reel-text-color, #fff);
}

.plustag-reel-site-name {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.plustag-reel-active-meta {
	font-size: var(--plustag-reel-meta-size, 13px);
	opacity: 0.75;
	line-height: 1.3;
}

.plustag-reel-top-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	position: relative;
}

.plustag-reel-icon-btn {
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--plustag-reel-icon-color, #fff) !important;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px;
	appearance: none;
	-webkit-appearance: none;
}

.plustag-reel-icon-btn:hover,
.plustag-reel-icon-btn:focus {
	outline: none;
	box-shadow: none !important;
}

.plustag-reel-autoplay-menu {
	position: absolute;
	top: 40px;
	right: 40px;
	background: rgba(20, 22, 26, 0.95);
	border-radius: 10px;
	padding: 6px;
	display: flex;
	flex-direction: column;
	min-width: 80px;
}

.plustag-reel-autoplay-menu button {
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	color: #fff !important;
	padding: 8px 10px;
	text-align: left;
	cursor: pointer;
	font-size: 13px;
	border-radius: 6px;
}

.plustag-reel-autoplay-menu button:hover {
	background: rgba(255, 255, 255, 0.1) !important;
}

.plustag-reel-scroller {
	height: 100%;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	scrollbar-width: none;
}

.plustag-reel-scroller::-webkit-scrollbar {
	display: none;
}

.plustag-reel-card {
	position: relative;
	height: 100%;
	width: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.plustag-reel-media {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.plustag-reel-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1);
}

.plustag-reel-card.is-active .plustag-reel-movement-zoom {
	animation: plustagReelZoom 5s ease-in-out infinite alternate;
}

.plustag-reel-card.is-active .plustag-reel-movement-lateral {
	animation: plustagReelLateral 5s ease-in-out infinite alternate;
}

@keyframes plustagReelZoom {
	from { transform: scale(1); }
	to { transform: scale(1.08); }
}

@keyframes plustagReelLateral {
	from { background-position: 38% center; }
	to { background-position: 62% center; }
}

.plustag-reel-overlay {
	position: absolute;
	inset: 0;
	background: #000;
}

.plustag-reel-double-tap-heart {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0);
	font-size: 100px;
	color: #fff;
	opacity: 0;
	pointer-events: none;
	z-index: 3;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.plustag-reel-double-tap-heart.animate {
	animation: plustagReelHeart 550ms ease-out;
}

@keyframes plustagReelHeart {
	0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
	30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
	50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
	100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.plustag-reel-info {
	position: relative;
	flex: 0 0 auto;
	max-height: 70%;
	background: #0b0c0e;
	padding: 12px 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.plustag-reel-category-badge {
	display: inline-block;
	align-self: flex-start;
	border: 1px solid var(--plustag-reel-text-color, #fff);
	background: transparent;
	color: var(--plustag-reel-text-color, #fff);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 10px;
	border-radius: 999px;
}

.plustag-reel-title {
	color: var(--plustag-reel-text-color, #fff);
	font-size: var(--plustag-reel-title-size, 24px);
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.plustag-reel-action-row {
	display: flex;
	align-items: center;
	gap: 22px;
}

.plustag-reel-action-row .plustag-reel-icon-btn {
	flex-direction: row;
	gap: 6px;
	padding: 2px 0;
}

.plustag-reel-count {
	font-size: 12px;
}

.plustag-reel-like-btn.is-liked {
	color: #ff3b5c !important;
}

.plustag-reel-excerpt {
	position: relative;
}

.plustag-reel-excerpt-line {
	color: var(--plustag-reel-text-color, #fff);
	font-size: var(--plustag-reel-excerpt-size, 14px);
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	padding-right: 44px;
}

.plustag-reel-excerpt-more {
	position: absolute;
	right: 0;
	bottom: 0;
	font-weight: 600;
	font-size: var(--plustag-reel-excerpt-size, 14px);
	color: var(--plustag-reel-text-color, #fff);
	background: linear-gradient(to right, transparent, #0b0c0e 40%);
	padding-left: 24px;
}

.plustag-reel-excerpt-panel {
	display: none;
}

.plustag-reel-excerpt.is-expanded .plustag-reel-excerpt-line {
	display: none;
}

.plustag-reel-excerpt.is-expanded .plustag-reel-excerpt-panel {
	display: block;
	position: absolute;
	left: -16px;
	right: -16px;
	bottom: 0;
	max-height: 60vh;
	overflow-y: auto;
	background: var(--plustag-reel-excerpt-bg, #000);
	color: var(--plustag-reel-excerpt-text, #fff);
	padding: 40px 16px 20px;
	z-index: 4;
	box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.4);
}

.plustag-reel-excerpt-panel-close {
	position: absolute;
	top: 6px;
	right: 10px;
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--plustag-reel-excerpt-text, #fff) !important;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 6px;
}

.plustag-reel-excerpt-panel-text {
	font-size: var(--plustag-reel-excerpt-size, 14px);
	line-height: 1.6;
}

.plustag-reel-excerpt-ctas {
	display: flex;
	gap: 6px;
	margin-top: 14px;
}

.plustag-reel-comments-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 70%;
	background: #14161a;
	border-radius: 16px 16px 0 0;
	transform: translateY(100%);
	transition: transform 0.18s ease;
	z-index: 6;
	display: flex;
	flex-direction: column;
	padding: 16px;
}

.plustag-reel-comments-panel.is-open {
	transform: translateY(0);
}

.plustag-reel-comments-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	margin-bottom: 10px;
}

.plustag-reel-comments-header button {
	background: none !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 22px;
	cursor: pointer;
}

.plustag-reel-comments-list {
	overflow-y: auto;
	flex: 1;
	margin-bottom: 10px;
}

.plustag-reel-comment {
	padding: 8px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 13px;
}

.plustag-reel-comment-date {
	font-size: 11px;
	opacity: 0.6;
	margin-left: 6px;
}

.plustag-reel-comment-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.plustag-reel-comment-form input,
.plustag-reel-comment-form textarea {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	color: #fff;
	padding: 10px;
	font-size: 13px;
}

.plustag-reel-comment-form textarea {
	min-height: 60px;
	resize: vertical;
}

.plustag-reel-ad-card {
	background: #111;
	align-items: center;
	justify-content: center;
	position: relative;
}

.plustag-reel-ad-slot {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.plustag-reel-ad-slot img {
	max-width: 100%;
	max-height: 100%;
}

.plustag-reel-ad-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 999px;
	z-index: 2;
}

.plustag-reel-lightbox {
	position: fixed;
	inset: 0;
	background: var(--plustag-reel-excerpt-bg, #000);
	color: var(--plustag-reel-excerpt-text, #fff);
	z-index: 20;
	overflow-y: auto;
}

.plustag-reel-lightbox-inner {
	max-width: 640px;
	margin: 0 auto;
	padding: 60px 20px 40px;
}

.plustag-reel-lightbox-close {
	position: fixed;
	top: 14px;
	right: 14px;
	background: rgba(128, 128, 128, 0.25) !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	color: var(--plustag-reel-excerpt-text, #fff) !important;
	font-size: 22px;
	cursor: pointer;
	z-index: 21;
}

.plustag-reel-lightbox-meta {
	opacity: 0.6;
	font-size: 13px;
	margin: 8px 0 24px;
}

.plustag-reel-lightbox-content p {
	line-height: 1.7;
	margin-bottom: 1.2em;
	font-size: 16px;
}

.plustag-reel-lightbox-cta {
	display: inline-block;
	margin-top: 24px;
}

.plustag-reel-preloader {
	position: absolute;
	inset: 0;
	background: #000;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	transition: opacity 0.2s ease;
}

.plustag-reel-preloader.is-hidden {
	opacity: 0;
	pointer-events: none;
}

.plustag-reel-boot-logo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: contain;
}

.plustag-reel-boot-text {
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
}

.plustag-reel-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: plustagReelSpin 0.6s linear infinite;
}

@keyframes plustagReelSpin {
	to { transform: rotate(360deg); }
}

@media (min-width: 600px) {
	.plustag-reel-scroller {
		max-width: 370px;
		margin: 0 auto;
	}

	.plustag-reel-topbar {
		left: 50%;
		right: auto;
		width: 370px;
		transform: translateX(-50%);
	}
}
