/* ZHIYAR — Instagram-style story strip on the homepage, directly under the
   banner (the .zhiyar-home wrapper supplies a minimal gap above via
   padding-top). Ring color signals who posted the story: pink/purple/yellow
   gradient = customer-submitted, solid green = site management. */

.zhiyar-stories {
	/* Minimal gap down to the product carousels — kept small sitewide so
	   sections don't eat up screen space. */
	margin: 0 0 20px;
}

.zhiyar-story-list {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	padding: 6px 4px 10px;
	scrollbar-width: thin;
}

/* Real <button> elements pick up the site-wide Additional CSS rule that forces
   a gold (#c9a054) background + border onto every button (and a darker gold
   on :hover) with !important — must out-rank it in every state, not just the
   resting one, or a gold box shows on hover/focus/click too. */
.zhiyar-story,
.zhiyar-story:hover,
.zhiyar-story:focus,
.zhiyar-story:active {
	background: none !important;
	border: none !important;
	outline: none;
}

.zhiyar-story {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	width: 100px;
	padding: 0;
	cursor: pointer;
}

/* The ring IS the border — no filled disc behind it, just a 100px circle
   framed by a gradient/solid edge, with the photo sitting directly inside.
   `overflow:hidden` + the oversized rotating ::before (customer rings only)
   is what makes the gradient itself appear to animate/shift color — the
   pseudo-element spins underneath, clipped to the ring's circular padding. */
.zhiyar-story__ring {
	position: relative;
	display: block;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	padding: 3px;
	overflow: hidden;
	box-sizing: border-box;
	transition: transform 0.15s ease;
}

/* Hover/click affordance is just the ring growing a little — no frame. */
.zhiyar-story:hover .zhiyar-story__ring,
.zhiyar-story:focus-visible .zhiyar-story__ring,
.zhiyar-story:active .zhiyar-story__ring {
	transform: scale(1.08);
}

/* Customer-submitted — pink → purple → yellow, matching Instagram's own
   story-ring gradient, slowly rotating so the colors keep shifting. */
.zhiyar-story--customer .zhiyar-story__ring::before {
	content: "";
	position: absolute;
	inset: -50%;
	background: conic-gradient(from 0deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34);
	animation: zhiyar-ring-spin 3s linear infinite;
}

@keyframes zhiyar-ring-spin {
	to {
		transform: rotate(1turn);
	}
}

/* Posted by site management — solid green ring (no motion, mirrors
   Instagram's static "close friends" ring). */
.zhiyar-story--admin .zhiyar-story__ring {
	background: #22a35a;
}

.zhiyar-story__photo {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #e5ded0;
	background-size: cover;
	background-position: center;
	border: 2px solid var(--ast-global-color-7, #fff);
	box-sizing: border-box;
}

/* Already-viewed stories fade to a neutral gray ring, Instagram-style —
   also stops the customer ring's rotation. */
.zhiyar-story.is-seen .zhiyar-story__ring {
	background: #cfcfcf;
}

.zhiyar-story.is-seen .zhiyar-story__ring::before {
	display: none;
}

.zhiyar-story__name {
	max-width: 100px;
	font-size: 0.78em;
	color: var(--ast-global-color-3, #12241c);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Tablet: slightly smaller circles so a few more stories peek into view. */
@media (max-width: 991px) {
	.zhiyar-story,
	.zhiyar-story__ring {
		width: 88px;
	}

	.zhiyar-story__ring {
		height: 88px;
	}

	.zhiyar-story__name {
		max-width: 88px;
	}
}

/* Real phones: smaller still, tighter gaps — more of the strip is visible
   per screen-width without losing the horizontal-scroll interaction. */
@media (max-width: 599px) {
	.zhiyar-story-list {
		gap: 12px;
		padding: 4px 4px 8px;
	}

	.zhiyar-story,
	.zhiyar-story__ring {
		width: 72px;
	}

	.zhiyar-story__ring {
		height: 72px;
	}

	.zhiyar-story__name {
		max-width: 72px;
		font-size: 0.72em;
	}
}

/* ---------------------------------------------------------------------
 * Full-screen viewer
 * ------------------------------------------------------------------- */
.zhiyar-story-viewer {
	position: fixed;
	inset: 0;
	/* Above #zhiyar-header (see zhiyar-header.css) on purpose — this is a
	   genuine full-screen takeover and should cover the sticky header too,
	   unlike ordinary page content. */
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	background: rgba(6, 10, 8, 0.6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	padding: 20px;
	box-sizing: border-box;
}

.zhiyar-story-viewer[hidden] {
	display: none;
}

/* The "dark smoky glass halo" — a frosted, translucent dark card with a
   soft wide shadow bleeding out around it. */
.zhiyar-story-viewer__frame {
	position: relative;
	width: min(92vw, 420px);
	border-radius: 22px;
	padding: 14px;
	background: linear-gradient(165deg, rgba(24, 28, 24, 0.55), rgba(8, 8, 8, 0.8));
	-webkit-backdrop-filter: blur(30px) saturate(140%);
	backdrop-filter: blur(30px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.04),
		0 30px 80px -20px rgba(0, 0, 0, 0.8),
		0 0 120px 10px rgba(0, 0, 0, 0.45);
}

.zhiyar-story-viewer__progress {
	display: flex;
	gap: 4px;
	margin-bottom: 10px;
}

.zhiyar-story-viewer__seg {
	flex: 1 1 0;
	height: 3px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.25);
	overflow: hidden;
}

.zhiyar-story-viewer__seg-fill {
	display: block;
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 3px;
}

.zhiyar-story-viewer__seg.is-done .zhiyar-story-viewer__seg-fill {
	width: 100%;
}

/* Paused while the visitor is writing a comment — no auto-advance mid-typing. */
.zhiyar-story-viewer__seg.is-paused .zhiyar-story-viewer__seg-fill {
	animation-play-state: paused;
}

.zhiyar-story-viewer__seg.is-active .zhiyar-story-viewer__seg-fill {
	animation: zhiyar-story-fill linear forwards;
	animation-duration: 15s;
}

@keyframes zhiyar-story-fill {
	from { width: 0%; }
	to { width: 100%; }
}

.zhiyar-story-viewer__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.zhiyar-story-viewer__avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #444;
	background-size: cover;
	background-position: center;
	flex: 0 0 auto;
}

.zhiyar-story-viewer__name {
	flex: 1 1 auto;
	color: #f5f0e6;
	font-weight: 600;
	font-size: 0.92em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Simple × — no circle chip behind it. */
.zhiyar-story-viewer__close,
.zhiyar-story-viewer__close:hover,
.zhiyar-story-viewer__close:focus,
.zhiyar-story-viewer__close:active {
	background: transparent !important;
	border: none !important;
	outline: none;
}

.zhiyar-story-viewer__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

/* Fixed 9:16 frame. The full photo always shows uncropped (object-fit:
   contain) — when its own ratio doesn't fill the frame, the gap is covered
   by a blurred, darkened copy of the same photo (the "smoky glass" edges),
   not plain black bars. */
.zhiyar-story-viewer__body {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	max-height: 70vh;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
}

.zhiyar-story-viewer__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-size: cover;
	background-position: center;
	filter: blur(30px) saturate(120%) brightness(0.55);
	transform: scale(1.3);
}

.zhiyar-story-viewer__img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Small chevron arrows for prev/next, not just an invisible tap zone. */
.zhiyar-story-viewer__nav,
.zhiyar-story-viewer__nav:hover,
.zhiyar-story-viewer__nav:focus,
.zhiyar-story-viewer__nav:active {
	background: transparent !important;
	border: none !important;
	outline: none;
}

.zhiyar-story-viewer__nav {
	position: absolute;
	z-index: 2;
	top: 0;
	bottom: 0;
	width: 30%;
	display: flex;
	align-items: center;
	padding: 0 8px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.55);
	transition: color 0.15s ease;
}

.zhiyar-story-viewer__nav:hover {
	color: rgba(255, 255, 255, 0.9);
}

.zhiyar-story-viewer__nav svg {
	width: 15px;
	height: 15px;
}

.zhiyar-story-viewer__nav--next {
	right: 0;
	justify-content: flex-end;
}

.zhiyar-story-viewer__nav--prev {
	left: 0;
	justify-content: flex-start;
}

/* Smoky translucent pill, Instagram caption style — overlaid on the photo
   itself, bottom-left, only shown when the story actually has a caption. */
.zhiyar-story-viewer__caption {
	position: absolute;
	z-index: 3;
	left: 12px;
	bottom: 14px;
	max-width: 62%;
	margin: 0;
	padding: 9px 13px;
	border-radius: 14px;
	background: rgba(20, 20, 20, 0.55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #f5f0e6;
	font-size: 0.86em;
	line-height: 1.7;
}

.zhiyar-story-viewer__caption[hidden] {
	display: none;
}

/* ---------------------------------------------------------------------
 * Like / comment — overlaid on the photo, bottom-right, stacked like on
 * top of comment (Instagram's own story action layout).
 * ------------------------------------------------------------------- */
.zhiyar-story-viewer__actions {
	position: absolute;
	z-index: 3;
	right: 10px;
	bottom: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.zhiyar-story-viewer__like,
.zhiyar-story-viewer__like:hover,
.zhiyar-story-viewer__like:focus,
.zhiyar-story-viewer__like:active,
.zhiyar-story-viewer__comment-toggle,
.zhiyar-story-viewer__comment-toggle:hover,
.zhiyar-story-viewer__comment-toggle:focus,
.zhiyar-story-viewer__comment-toggle:active {
	background: transparent !important;
	border: none !important;
	outline: none;
}

.zhiyar-story-viewer__like,
.zhiyar-story-viewer__comment-toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 4px;
	color: #fff;
	font-size: 0.7em;
	cursor: pointer;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.zhiyar-story-viewer__like svg,
.zhiyar-story-viewer__comment-toggle svg {
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

.zhiyar-story-viewer__like-count {
	min-width: 10px;
}

/* Liked state — filled red heart. */
.zhiyar-story-viewer__like.is-liked svg {
	fill: #ee2a7b;
	stroke: #ee2a7b;
}

.zhiyar-story-viewer__comment-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 12px 2px 0;
	animation: zhiyar-story-reveal-in 0.2s ease;
}

.zhiyar-story-viewer__comment-form[hidden] {
	display: none;
}

@keyframes zhiyar-story-reveal-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.zhiyar-story-viewer__comment-input {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.08);
	color: #f5f0e6;
	font-family: inherit;
	font-size: 0.86em;
	resize: none;
}

.zhiyar-story-viewer__comment-input::placeholder {
	color: rgba(245, 240, 230, 0.5);
}

.zhiyar-story-viewer__comment-submit {
	align-self: flex-start;
	padding: 8px 20px;
	border-radius: 10px;
	border: none;
	background: conic-gradient(from 180deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34) !important;
	color: #fff;
	font-weight: 700;
	font-size: 0.86em;
	cursor: pointer;
}

.zhiyar-story-viewer__comment-status {
	margin: 0;
	font-size: 0.82em;
	color: #f5f0e6;
}

.zhiyar-story-viewer__comment-status[hidden] {
	display: none;
}
