/* AMR Group Reels — comments UI (Instagram-style bottom sheet). Scoped under
   the core reel classes; designed to feel premium and uncluttered. */

.amr-reels-act-count {
	font-size: 12px;
	line-height: 1;
	margin-top: 5px;
}

/* Lift the video so the sheet sits beneath it. */
.amr-reels-slide .amr-reels-slide-player,
.amr-reels-slide .amr-reels-slide-cover {
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.amr-reels-slide.amr-cmt-open .amr-reels-slide-player,
.amr-reels-slide.amr-cmt-open .amr-reels-slide-cover {
	transform: translateY(-20%) scale(0.78);
}

.amr-reels-slide.amr-cmt-open .amr-reels-actions,
.amr-reels-slide.amr-cmt-open .amr-reels-slide-cap,
.amr-reels-slide.amr-cmt-open .amr-reels-product,
.amr-reels-slide.amr-cmt-open .amr-reels-progress {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

/* ---- Bottom sheet ---- */
.amr-cmt-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 6;
	height: 64%;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #16181c;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
	overflow: hidden;
	animation: amr-cmt-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	font-size: 14px;
}

@keyframes amr-cmt-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.amr-cmt-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 12px;
	border-bottom: 1px solid #f0f0f0;
}

.amr-cmt-grip {
	position: absolute;
	top: 7px;
	left: 50%;
	transform: translateX(-50%);
	width: 38px;
	height: 4px;
	border-radius: 4px;
	background: #d8d8da;
}

.amr-cmt-title-wrap {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.amr-cmt-title {
	font-weight: 700;
	font-size: 15px;
	letter-spacing: -0.01em;
}

.amr-cmt-headcount {
	font-size: 13px;
	color: #9a9a9e;
	font-variant-numeric: tabular-nums;
}

.amr-cmt-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: #f3f3f5;
	color: #50525a;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.amr-cmt-close:hover {
	background: #ececef;
	color: #16181c;
}

.amr-cmt-close svg {
	width: 16px;
	height: 16px;
}

/* ---- List ---- */
.amr-cmt-list {
	flex: 1;
	overflow-y: auto;
	padding: 12px 18px 6px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.amr-cmt-empty {
	color: #9a9a9e;
	text-align: center;
	padding: 30px 12px;
	font-size: 14px;
}

.amr-cmt-item {
	display: flex;
	gap: 11px;
	padding: 9px 0;
}

.amr-cmt-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	flex-shrink: 0;
	background: linear-gradient(135deg, #f0f0f3, #e3e3e8);
	object-fit: cover;
}

.amr-cmt-body {
	flex: 1;
	min-width: 0;
}

.amr-cmt-head {
	display: flex;
	gap: 8px;
	align-items: baseline;
	margin-bottom: 2px;
}

.amr-cmt-author {
	font-weight: 600;
	font-size: 13px;
	color: #16181c;
}

.amr-cmt-ago {
	font-size: 11px;
	color: #adadb2;
}

.amr-cmt-text {
	font-size: 14px;
	line-height: 1.9;
	color: #2b2d33;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

/* ---- Composer ---- */
.amr-cmt-form {
	border-top: 1px solid #f0f0f0;
	padding: 11px 16px calc(11px + env(safe-area-inset-bottom, 0px));
	background: #fff;
}

.amr-cmt-input-row {
	display: flex;
	gap: 9px;
	align-items: flex-end;
}

.amr-cmt-input {
	flex: 1;
	resize: none;
	border: 1px solid #e3e3e8;
	border-radius: 20px;
	padding: 10px 16px;
	font: inherit;
	font-size: 14px;
	line-height: 1.7;
	max-height: 100px;
	background: #fafafa;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.amr-cmt-input:focus {
	outline: none;
	border-color: var(--amr-accent, #FF3366);
	background: #fff;
}

.amr-cmt-send {
	flex-shrink: 0;
	border: 0;
	border-radius: 20px;
	padding: 10px 20px;
	background: var(--amr-accent, #FF3366);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
}

.amr-cmt-send:hover {
	filter: brightness(1.06);
}

.amr-cmt-send[disabled] {
	opacity: 0.55;
	cursor: default;
}

.amr-cmt-notice {
	font-size: 12px;
	color: #b0264c;
	margin-top: 7px;
	min-height: 1em;
}

/* ---- Guest prompt ---- */
.amr-cmt-guest {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 11px;
	border-top: 1px solid #f0f0f0;
	padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
	text-align: center;
}

.amr-cmt-guest-msg {
	font-size: 14px;
	color: #50525a;
}

.amr-cmt-guest-login {
	display: inline-block;
	padding: 9px 26px;
	border-radius: 20px;
	background: var(--amr-accent, #FF3366);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.amr-cmt-guest-login:hover {
	filter: brightness(1.06);
}

/* ============================================================
   Premium pass — scrim, drag-to-dismiss, elegant rows, composer
   ============================================================ */

/* Soft scrim behind the lifted video (below the sheet, above the player). */
.amr-cmt-scrim {
	position: absolute;
	inset: 0;
	z-index: 5;
	background: radial-gradient( ellipse at 50% 28%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55) );
	opacity: 0;
	transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.amr-cmt-scrim.is-in {
	opacity: 1;
}

/* Sheet depth + freeze while dragging. */
.amr-cmt-panel {
	border-radius: 22px 22px 0 0;
	box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 -12px 48px rgba(0, 0, 0, 0.5);
	will-change: transform;
}

.amr-cmt-panel.is-dragging {
	animation: none !important;
	transition: none !important;
}

/* Grip: bigger hit area + live feedback while dragging. */
.amr-cmt-grip {
	width: 40px;
	height: 5px;
	border-radius: 5px;
	background: #dcdce0;
	top: 9px;
	transition: background 0.15s ease, width 0.18s ease;
}

.amr-cmt-header {
	cursor: grab;
	touch-action: none;
	padding-top: 18px;
	-webkit-user-select: none;
	user-select: none;
}

.amr-cmt-header:active {
	cursor: grabbing;
}

.amr-cmt-panel.is-dragging .amr-cmt-grip {
	background: var(--amr-accent, #FF3366);
	width: 52px;
}

/* Rows: avatar ring, initial fallback, dividers, masked-phone subline. */
.amr-cmt-avatar {
	width: 40px;
	height: 40px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.amr-cmt-avatar-fb {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient( 135deg, var(--amr-accent, #FF3366), #ff6f91 );
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
}

.amr-cmt-item {
	padding: 12px 0;
	border-bottom: 1px solid #f4f4f6;
}

.amr-cmt-item:last-child {
	border-bottom: 0;
}

.amr-cmt-author {
	font-size: 13.5px;
}

.amr-cmt-phone {
	font-size: 11px;
	color: #b9b9bf;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	unicode-bidi: plaintext;
}

.amr-cmt-ago {
	margin-inline-start: auto;
}

.amr-cmt-text {
	font-size: 13.5px;
	line-height: 1.85;
}

/* Composer: elevated, pill field with focus ring, springy send. */
.amr-cmt-form {
	position: relative;
	border-top: 1px solid #eee;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.03);
	background: #fff;
}

.amr-cmt-input {
	border-radius: 22px;
	background: #f4f4f6;
	border-color: transparent;
	transition: box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.amr-cmt-input:focus {
	background: #fff;
	border-color: var(--amr-accent, #FF3366);
	box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.12);
}

.amr-cmt-send {
	border-radius: 22px;
	font-weight: 700;
	box-shadow: 0 3px 10px rgba(255, 51, 102, 0.28);
	transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.amr-cmt-send:active {
	transform: scale(0.94);
}

.amr-cmt-send[disabled] {
	opacity: 0.5;
	box-shadow: none;
	transform: none;
}

/* Empty state: soft accent icon bubble (inline SVG mask, no new image). */
.amr-cmt-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 44px 24px;
	color: #9a9a9e;
}

.amr-cmt-empty::before {
	content: "";
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: radial-gradient( circle at 50% 42%, rgba(255, 51, 102, 0.14), rgba(255, 51, 102, 0.04) );
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-1.2 4.3 8.5 8.5 0 0 1-7.3 4.2 8.4 8.4 0 0 1-4-1L3 21l1.8-5.4a8.5 8.5 0 0 1 7.7-12 8.4 8.4 0 0 1 8.5 8z'/%3E%3C/svg%3E") center / 30px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-1.2 4.3 8.5 8.5 0 0 1-7.3 4.2 8.4 8.4 0 0 1-4-1L3 21l1.8-5.4a8.5 8.5 0 0 1 7.7-12 8.4 8.4 0 0 1 8.5 8z'/%3E%3C/svg%3E") center / 30px no-repeat;
	background-color: var(--amr-accent, #FF3366);
}

/* Guest prompt: warm gradient + springy button. */
.amr-cmt-guest {
	gap: 12px;
	background: linear-gradient( to top, #fafafa, #fff );
}

.amr-cmt-guest-msg {
	font-size: 13.5px;
	line-height: 1.9;
}

.amr-cmt-guest-login {
	box-shadow: 0 3px 10px rgba(255, 51, 102, 0.28);
	transition: transform 0.12s ease, filter 0.15s ease;
}

.amr-cmt-guest-login:active {
	transform: scale(0.96);
}

@media ( prefers-reduced-motion: reduce ) {
	.amr-cmt-scrim,
	.amr-cmt-panel,
	.amr-cmt-grip {
		transition: none;
		animation: none;
	}
}
