/**
 * WhatsApp Stories CSS - News Steam
 * Modern WhatsApp Status / Instagram Stories Model
 */

.news-steam-wa-story-container {
	padding: 18px 0 14px 0;
	background: #ffffff;
	border-bottom: 1px solid #f1f5f9;
	position: relative;
	margin-bottom: 1.5rem;
}

.dark-mode .news-steam-wa-story-container {
	background: #0f172a;
	border-bottom-color: #1e293b;
}

.ns-wa-story-inner-wrap {
	position: relative;
}

/* Header bar */
.ns-wa-story-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.ns-wa-story-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ns-wa-icon-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #25d366;
	color: #ffffff;
	border-radius: 50%;
	font-size: 1rem;
	box-shadow: 0 3px 8px rgba(37, 211, 102, 0.35);
}

.ns-wa-title-text {
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: 0.2px;
}

.dark-mode .ns-wa-title-text {
	color: #f8fafc;
}

.ns-wa-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #fee2e2;
	color: #ef4444;
	font-size: 0.65rem;
	font-weight: 800;
	padding: 2px 7px;
	border-radius: 12px;
	letter-spacing: 0.5px;
}

.ns-pulse-dot {
	width: 6px;
	height: 6px;
	background: #ef4444;
	border-radius: 50%;
	animation: nsDotPulse 1.4s infinite;
}

@keyframes nsDotPulse {
	0% {
		transform: scale(0.9);
		opacity: 0.7;
	}
	50% {
		transform: scale(1.3);
		opacity: 1;
	}
	100% {
		transform: scale(0.9);
		opacity: 0.7;
	}
}

/* Scroll buttons */
.ns-wa-scroll-controls {
	display: flex;
	gap: 6px;
}

.ns-wa-scroll-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	color: #334155;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 0.75rem;
	transition: all 0.2s ease;
}

.ns-wa-scroll-btn:hover {
	background: var(--primary-color, #ff9d23);
	color: #ffffff;
	border-color: var(--primary-color, #ff9d23);
}

.dark-mode .ns-wa-scroll-btn {
	background: #1e293b;
	border-color: #334155;
	color: #cbd5e1;
}

/* Horizontal Track */
.ns-wa-story-scroll-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 4px 2px 8px 2px;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE */
}

.ns-wa-story-scroll-track::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

/* Story Item */
.ns-wa-story-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 82px;
	flex-shrink: 0;
	cursor: pointer;
	user-select: none;
	text-align: center;
	transition: transform 0.2s ease;
}

.ns-wa-story-item:hover {
	transform: translateY(-2px);
}

.ns-wa-avatar-ring {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	padding: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.25s ease;
}

.ns-wa-story-item:hover .ns-wa-avatar-ring {
	transform: scale(1.05);
}

/* Ring themes */
.theme-wa-green .ns-wa-avatar-ring {
	background: linear-gradient(135deg, #25d366 0%, #128c7e 50%, #25d366 100%);
	box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
}

.theme-ig-sunset .ns-wa-avatar-ring {
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	box-shadow: 0 3px 10px rgba(220, 39, 67, 0.35);
}

.theme-accent .ns-wa-avatar-ring {
	background: linear-gradient(135deg, var(--primary-color, #ff9d23) 0%, #e11d48 100%);
	box-shadow: 0 3px 10px rgba(255, 157, 35, 0.35);
}

.ns-wa-avatar-thumb {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	background-color: #0f172a;
	border: 2.5px solid #ffffff;
}

.dark-mode .ns-wa-avatar-thumb {
	border-color: #0f172a;
}

.ns-wa-ring-badge {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #25d366;
	color: #ffffff;
	font-size: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.theme-ig-sunset .ns-wa-ring-badge {
	background: #e1306c;
}

.theme-accent .ns-wa-ring-badge {
	background: var(--primary-color, #ff9d23);
}

.dark-mode .ns-wa-ring-badge {
	border-color: #0f172a;
}

.ns-wa-item-title {
	font-size: 0.76rem;
	font-weight: 600;
	color: #334155;
	margin-top: 6px;
	line-height: 1.25;
	max-width: 82px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dark-mode .ns-wa-item-title {
	color: #cbd5e1;
}

/* ==============================================================
   INTERACTIVE STORY MODAL VIEWER
   ============================================================== */
.ns-wa-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ns-wa-modal.active {
	opacity: 1;
	visibility: visible;
}

.ns-wa-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 20, 26, 0.92);
	backdrop-filter: blur(10px);
}

.ns-wa-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	height: 88vh;
	max-height: 820px;
	background: #111b21;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	z-index: 2;
}

@media (max-width: 480px) {
	.ns-wa-modal-dialog {
		max-width: 100%;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
}

/* Progress bars at top */
.ns-wa-progress-bars {
	position: absolute;
	top: 10px;
	left: 12px;
	right: 12px;
	display: flex;
	gap: 5px;
	z-index: 20;
}

.ns-wa-progress-seg {
	flex: 1;
	height: 3px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
	overflow: hidden;
	position: relative;
}

.ns-wa-progress-fill {
	height: 100%;
	width: 0%;
	background: #ffffff;
	border-radius: 3px;
}

/* Modal Header */
.ns-wa-modal-header {
	position: absolute;
	top: 22px;
	left: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 20;
}

.ns-wa-modal-user {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ns-wa-header-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #25d366;
}

.ns-wa-header-info {
	display: flex;
	flex-direction: column;
}

.ns-wa-header-name {
	font-size: 0.88rem;
	font-weight: 700;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.ns-wa-header-time {
	font-size: 0.72rem;
	color: rgba(255, 255, 255, 0.75);
}

.ns-wa-modal-actions {
	display: flex;
	gap: 10px;
}

.ns-wa-btn-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	transition: background 0.2s ease;
}

.ns-wa-btn-icon:hover {
	background: rgba(0, 0, 0, 0.7);
}

/* Story Body Slide */
.ns-wa-story-body {
	position: relative;
	flex: 1;
	overflow: hidden;
}

.ns-wa-media-container {
	position: absolute;
	inset: 0;
	background: #0b141a;
}

.ns-wa-slide-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	animation: nsStoryKenBurns 12s infinite alternate ease-in-out;
}

@keyframes nsStoryKenBurns {
	0% {
		transform: scale(1);
	}
	100% {
		transform: scale(1.08);
	}
}

.ns-wa-slide-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 20, 26, 0.45) 0%, rgba(11, 20, 26, 0.1) 30%, rgba(11, 20, 26, 0.7) 70%, rgba(11, 20, 26, 0.96) 100%);
}

/* Tap zones */
.ns-wa-tap-zone {
	position: absolute;
	top: 0;
	bottom: 120px;
	z-index: 10;
	cursor: pointer;
}

.ns-wa-tap-zone.prev {
	left: 0;
	width: 30%;
}

.ns-wa-tap-zone.next {
	right: 0;
	width: 70%;
}

/* Caption and Swipe-up */
.ns-wa-story-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 24px 20px 20px 20px;
	z-index: 15;
	display: flex;
	flex-direction: column;
}

.ns-wa-caption-cat {
	font-size: 0.72rem;
	font-weight: 800;
	color: #25d366;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 6px;
}

.ns-wa-caption-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: #ffffff;
	line-height: 1.3;
	margin: 0 0 8px 0;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.ns-wa-caption-excerpt {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.82);
	line-height: 1.45;
	margin: 0 0 16px 0;
}

.ns-wa-swipe-up-wrap {
	display: flex;
	justify-content: center;
	padding-top: 4px;
}

.ns-wa-read-full-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 22px;
	background: #25d366;
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.6px;
	border-radius: 25px;
	text-decoration: none;
	box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5);
	transition: all 0.25s ease;
}

.ns-wa-read-full-btn:hover {
	background: #1eb956;
	transform: translateY(-2px);
	box-shadow: 0 6px 22px rgba(37, 211, 102, 0.7);
}

.ns-wa-chevron-bounce {
	animation: nsBounceUp 1.2s infinite ease-in-out;
	font-size: 0.75rem;
}

@keyframes nsBounceUp {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}
