.wetheme-story {
	--wetheme-story-ring-size: 72px;
	--wetheme-story-ring-gap: 16px;
	--wetheme-story-ring-color: #ee583f;
	--wetheme-story-ring-color-2: #bd3381;
	--wetheme-story-modal-bg: #000;
	--wetheme-story-seen-color: #bdbdbd;
	position: relative;
	width: 100%;
}

.wetheme-story__notice {
	padding: 16px;
	border: 1px dashed #ccc;
	border-radius: 8px;
	text-align: center;
	color: #666;
	background: #fafafa;
}

.wetheme-story__heading {
	margin: 0 0 16px;
	font-size: 1.125rem;
	font-weight: 700;
}

.wetheme-story__rings {
	display: flex;
	gap: var(--wetheme-story-ring-gap);
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 2px 12px;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: none;
	cursor: grab;
	touch-action: pan-x;
}

.wetheme-story__rings.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
}

.wetheme-story__rings.is-dragging .wetheme-story__ring {
	pointer-events: none;
}

.wetheme-story__rings::-webkit-scrollbar {
	display: none;
	height: 0;
}

.wetheme-story__ring {
	flex: 0 0 auto;
	width: calc(var(--wetheme-story-ring-size) + 12px);
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	text-align: center;
	-webkit-user-drag: none;
	user-select: none;
}

.wetheme-story__ring-border {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--wetheme-story-ring-size) + 8px);
	height: calc(var(--wetheme-story-ring-size) + 8px);
	margin: 0 auto;
	border-radius: 50%;
	background: linear-gradient(45deg, var(--wetheme-story-ring-color), var(--wetheme-story-ring-color-2));
	padding: 3px;
	transition: opacity 0.2s ease;
}

.wetheme-story__ring--seen .wetheme-story__ring-border {
	background: var(--wetheme-story-seen-color);
}

.wetheme-story__ring-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wetheme-story-ring-size);
	height: var(--wetheme-story-ring-size);
	border-radius: 50%;
	overflow: hidden;
	background: #f3f3f3;
	border: 2px solid #fff;
}

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

.wetheme-story__ring-title {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: calc(var(--wetheme-story-ring-size) + 12px);
}

.wetheme-story__modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
}

.wetheme-story__modal.is-open {
	display: flex;
}

.wetheme-story__modal-inner {
	position: relative;
	width: min(420px, 100vw);
	height: min(760px, 100vh);
	background: var(--wetheme-story-modal-bg);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.wetheme-story__modal-top {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 12px 8px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}

.wetheme-story__progress-list {
	display: flex;
	flex: 1;
	gap: 4px;
}

.wetheme-story__progress {
	flex: 1;
	height: 3px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
	overflow: hidden;
}

.wetheme-story__progress-bar {
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
	border-radius: inherit;
}

.wetheme-story__progress.is-complete .wetheme-story__progress-bar {
	width: 100%;
}

.wetheme-story__progress.is-active .wetheme-story__progress-bar {
	transition: width linear;
}

.wetheme-story__close {
	border: 0;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.wetheme-story__modal-header {
	position: absolute;
	top: 42px;
	left: 12px;
	right: 12px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
}

.wetheme-story__modal-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.8);
	flex-shrink: 0;
}

.wetheme-story__modal-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wetheme-story__modal-title {
	font-size: 14px;
	font-weight: 600;
}

.wetheme-story__stage {
	position: absolute;
	inset: 0;
	background: #111;
}

.wetheme-story__media {
	position: absolute;
	inset: 0;
	display: none;
}

.wetheme-story__media.is-active {
	display: block;
}

.wetheme-story__media img,
.wetheme-story__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #000;
}

.wetheme-story__tap-zones {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
}

.wetheme-story__tap-prev,
.wetheme-story__tap-next {
	flex: 1;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-touch-callout: none;
	user-select: none;
}

.wetheme-story__footer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 16px 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
	pointer-events: none;
}

.wetheme-story__footer > * {
	pointer-events: auto;
}

.wetheme-story__interact-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 2px;
	color: #fff;
}

.wetheme-story__message-field {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	height: 44px;
	padding-inline: 16px 6px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wetheme-story__message-field:focus-within {
	border-color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.12);
}

.wetheme-story__message-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 14px;
	outline: none;
}

.wetheme-story__message-input::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

.wetheme-story__message-input:disabled {
	opacity: 0.65;
}

.wetheme-story__message-send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	opacity: 0.4;
	transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.wetheme-story__message-send:not(:disabled) {
	opacity: 1;
}

.wetheme-story__message-send:not(:disabled):hover {
	color: var(--wetheme-primary-color, #4260ff);
	transform: scale(1.08);
}

.wetheme-story__message-send:disabled {
	cursor: default;
}

.wetheme-story__message-send svg {
	width: 20px;
	height: 20px;
}

.wetheme-story__like-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	min-width: 32px;
}

.wetheme-story__like-count {
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	color: rgba(255, 255, 255, 0.85);
	text-align: center;
}

.wetheme-story__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, color 0.2s ease;
}

.wetheme-story__action svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.wetheme-story__action--like svg path {
	fill: currentColor;
}

.wetheme-story__action--like:not(.is-liked) svg path {
	fill: none;
}

.wetheme-story__action--like.is-liked {
	color: #ff3040;
}

.wetheme-story__action--like.is-animating {
	animation: wetheme-story-like-pop 0.45s ease;
}

.wetheme-story__comment-feedback {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.85);
}

.wetheme-story__comment-feedback.is-error {
	color: #ffb4b4;
}

.wetheme-story__pause-indicator {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	pointer-events: none;
}

.wetheme-story__pause-indicator svg {
	width: 34px;
	height: 34px;
	fill: currentColor;
}

.wetheme-story__modal.is-paused .wetheme-story__pause-indicator {
	display: flex;
}

.wetheme-story__modal.is-paused .wetheme-story__media.is-active video {
	filter: brightness(0.88);
}

.wetheme-story__cta {
	display: inline-flex;
	align-self: center;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 20px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.wetheme-story__product-pin {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.95);
	color: #111;
	text-decoration: none;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wetheme-story__product-pin:hover {
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
	transform: translateY(-1px);
}

.wetheme-story__product-pin-image {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f3f3f3;
}

.wetheme-story__product-pin-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wetheme-story__product-pin-body {
	flex: 1;
	min-width: 0;
}

.wetheme-story__product-pin-name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wetheme-story__product-pin-price {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wetheme-primary-color);
}

.wetheme-story__product-pin-price .woocommerce-Price-amount,
.wetheme-story__product-pin-price bdi,
.wetheme-story__product-pin-price ins {
	text-decoration: none;
	font-weight: 700;
	color: #333;
}

.wetheme-story__product-pin-price .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
    font-size: 12px;
    font-weight: 400;
    color: #000000;
    padding-right: 2px;
}

.wetheme-story__product-pin-price del {
	display: none;
}

body.wetheme-story-open {
	overflow: hidden;
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
	.wetheme-story {
		--wetheme-story-ring-size: 80px;
		--wetheme-story-ring-gap: 32px;
	}

	.wetheme-story__heading {
		margin-bottom: 14px;
		font-size: 1rem;
	}

	.wetheme-story__rings {
		padding: 4px 0 10px;
	}

	.wetheme-story__ring-border {
		padding: 2px;
	}

	.wetheme-story__ring-title {
		margin-top: 6px;
		font-size: 12px;
		max-width: calc(var(--wetheme-story-ring-size) + 8px);
	}

	.wetheme-story__modal-inner {
		width:100%;
		height: 100%;
		border-radius: 0;
	}

	.wetheme-story__modal-top {
		padding: 12px 10px 8px;
	}

	.wetheme-story__modal-header {
		top: 38px;
		left: 10px;
		right: 10px;
	}

	.wetheme-story__modal-avatar {
		width: 32px;
		height: 32px;
	}

	.wetheme-story__modal-title {
		font-size: 13px;
	}

	.wetheme-story__footer {
		padding: 14px 14px 18px;
		gap: 8px;
	}

	.wetheme-story__message-field {
		height: 40px;
		padding-inline: 14px 5px;
	}

	.wetheme-story__message-input {
		font-size: 13px;
	}

	.wetheme-story__product-pin {
		padding: 8px 10px;
		gap: 10px;
	}

	.wetheme-story__product-pin-image {
		width: 46px;
		height: 46px;
	}

	.wetheme-story__product-pin-name,
	.wetheme-story__product-pin-price {
		font-size: 12px;
	}

	.wetheme-story__cta {
		min-height: 38px;
		padding: 0 16px;
		font-size: 13px;
	}
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
	.wetheme-story {
		--wetheme-story-ring-size: 64px;
		--wetheme-story-ring-gap: 20px;
	}

	.wetheme-story__heading {
		margin-bottom: 12px;
		font-size: 0.9375rem;
	}

	.wetheme-story__rings {
		padding: 2px 0 8px;
	}

	.wetheme-story__ring {
		width: calc(var(--wetheme-story-ring-size) + 8px);
	}

	.wetheme-story__ring-border {
		width: calc(var(--wetheme-story-ring-size) + 6px);
		height: calc(var(--wetheme-story-ring-size) + 6px);
		padding: 2px;
	}

	.wetheme-story__ring-thumb {
		border-width: 1px;
	}

	.wetheme-story__ring-title {
		margin-top: 6px;
		font-size: 11px;
		line-height: 1.3;
		max-width: calc(var(--wetheme-story-ring-size) + 8px);
	}

	.wetheme-story__modal {
		background: #000;
	}

	.wetheme-story__modal-inner {
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
		box-shadow: none;
	}

	.wetheme-story__modal-top {
		padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 6px;
		gap: 8px;
	}

	.wetheme-story__progress {
		height: 2px;
	}

	.wetheme-story__close {
		width: 28px;
		height: 28px;
		font-size: 18px;
	}

	.wetheme-story__modal-header {
		top: calc(34px + env(safe-area-inset-top, 0px));
		left: 10px;
		right: 10px;
		gap: 8px;
	}

	.wetheme-story__modal-avatar {
		width: 35px;
		height: 35px;
		border-width: 1px;
	}

	.wetheme-story__modal-title {
		font-size: 12px;
	}

	.wetheme-story__footer {
		padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px));
		gap: 8px;
	}

	.wetheme-story__interact-bar {
		gap: 10px;
	}

	.wetheme-story__message-field {
		height: 38px;
		padding-inline: 12px 4px;
	}

	.wetheme-story__message-input {
		font-size: 13px;
	}

	.wetheme-story__message-send {
		width: 28px;
		height: 28px;
	}

	.wetheme-story__message-send svg {
		width: 18px;
		height: 18px;
	}

	.wetheme-story__like-wrap {
		min-width: 28px;
	}

	.wetheme-story__action {
		width: 28px;
		height: 28px;
	}

	.wetheme-story__action svg {
		width: 24px;
		height: 24px;
	}

	.wetheme-story__like-count {
		font-size: 10px;
	}

	.wetheme-story__comment-feedback {
		font-size: 11px;
	}

	.wetheme-story__pause-indicator {
		width: 60px;
		height: 60px;
		margin: -30px 0 0 -30px;
	}

	.wetheme-story__pause-indicator svg {
		width: 28px;
		height: 28px;
	}

	.wetheme-story__cta {
		min-height: 36px;
		padding: 0 14px;
		font-size: 12px;
	}

	.wetheme-story__product-pin {
		padding: 8px 10px;
		gap: 8px;
		border-radius: 10px;
	}

	.wetheme-story__product-pin-image {
		width: 42px;
		height: 42px;
		border-radius: 6px;
	}

	.wetheme-story__product-pin-name {
		font-size: 11px;
	}

	.wetheme-story__product-pin-price {
		margin-top: 4px;
		font-size: 11px;
	}

	.wetheme-story__product-pin-price .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
		font-size: 10px;
	}
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
	.wetheme-story {
		--wetheme-story-ring-size: 56px;
		--wetheme-story-ring-gap: 16px;
	}

	.wetheme-story__heading {
		margin-bottom: 10px;
		font-size: 0.875rem;
	}

	.wetheme-story__ring-title {
		font-size: 10px;
		margin-top: 5px;
	}

	.wetheme-story__footer {
		padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
	}

	.wetheme-story__message-field {
		height: 36px;
		padding-inline: 10px 4px;
	}

	.wetheme-story__message-input {
		font-size: 12px;
	}

	.wetheme-story__product-pin-image {
		width: 38px;
		height: 38px;
	}
}

/* ── Landscape mobile ── */
@media (max-width: 767px) and (orientation: landscape) {
	.wetheme-story__modal-top {
		padding-top: calc(6px + env(safe-area-inset-top, 0px));
	}

	.wetheme-story__modal-header {
		top: calc(28px + env(safe-area-inset-top, 0px));
	}

	.wetheme-story__footer {
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
		gap: 6px;
	}

	.wetheme-story__interact-bar {
		gap: 8px;
	}

	.wetheme-story__message-field {
		height: 34px;
	}

	.wetheme-story__product-pin {
		padding: 6px 8px;
	}

	.wetheme-story__product-pin-image {
		width: 36px;
		height: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wetheme-story__progress.is-active .wetheme-story__progress-bar {
		transition: none;
	}

	.wetheme-story__action--like.is-animating {
		animation: none;
	}
}

@keyframes wetheme-story-like-pop {
	0% {
		transform: scale(1);
	}
	35% {
		transform: scale(1.25);
	}
	100% {
		transform: scale(1);
	}
}
