/* ============================================
   story.css — Instagram tarzı Hikaye (Story) özelliği
   post_news.css içindeki --ig-* değişkenlerini kullanır
   ============================================ */

/* ---- HİKAYE BARI ---- */
.story_bar {
	background: var(--ig-bg-primary, #fff);
	border: 1px solid var(--ig-border, #dbdbdb);
	border-radius: var(--ig-radius-card, 12px);
	padding: 14px 0 14px 14px;
	margin-bottom: 16px;
	overflow: hidden;
}

.story_bar_scroll {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-right: 14px;
	scrollbar-width: none;
}
.story_bar_scroll::-webkit-scrollbar { display: none; }

.story_ring_item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	width: 64px;
	cursor: pointer;
}

.story_ring {
	position: relative;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5px;
	transition: transform 0.15s ease;
}
.story_ring_item:active .story_ring { transform: scale(0.94); }

.story_ring_unseen {
	background: var(--ig-story-gradient, linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888));
}
.story_ring_seen {
	background: var(--ig-border, #dbdbdb);
}
.story_ring_add {
	background: var(--ig-border, #dbdbdb);
}

.story_ring_inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2.5px solid var(--ig-bg-primary, #fff);
	overflow: hidden;
	background: var(--ig-bg-tertiary, #f0f0f0);
}
.story_ring_inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.story_add_badge {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--ig-blue, #0095f6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	border: 2px solid var(--ig-bg-primary, #fff);
}

.story_ring_label {
	font-size: 11.5px;
	color: var(--ig-text-primary, #262626);
	max-width: 64px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

/* ---- TAM EKRAN GÖRÜNTÜLEYİCİ ---- */
.story_viewer_overlay {
	position: fixed;
	inset: 0;
	background: #000;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: storyFadeIn 0.15s ease;
	touch-action: none;
}

@keyframes storyFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.story_viewer_frame {
	position: relative;
	width: 100%;
	max-width: 460px;
	height: 100%;
	max-height: 100vh;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.story_progress_row {
	position: absolute;
	top: 8px;
	left: 8px;
	right: 8px;
	display: flex;
	gap: 4px;
	z-index: 5;
}
.story_progress_track {
	flex: 1;
	height: 2.5px;
	background: rgba(255,255,255,0.35);
	border-radius: 2px;
	overflow: hidden;
}
.story_progress_fill {
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 2px;
}
.story_progress_track.done .story_progress_fill { width: 100% !important; }

.story_viewer_header {
	position: absolute;
	top: 20px;
	left: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 5;
}
.story_viewer_header img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid rgba(255,255,255,0.4);
}
.story_viewer_header .story_viewer_name {
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
}
.story_viewer_header .story_viewer_time {
	color: rgba(255,255,255,0.75);
	font-size: 11.5px;
	margin-left: 4px;
}
.story_viewer_close,
.story_viewer_delete {
	margin-left: auto;
	color: #fff;
	font-size: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 8px;
	opacity: 0.9;
}
.story_viewer_delete { font-size: 17px; margin-left: 4px; }

.story_media_wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}
.story_media_wrap img,
.story_media_wrap video {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.story_text_slide {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	text-align: center;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.4;
	background: linear-gradient(135deg, #405de6, #5b51d8, #833ab4, #c13584, #e1306c, #fd1d1d);
	word-break: break-word;
}

.story_tap_zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 34%;
	z-index: 4;
}
.story_tap_prev { left: 0; }
.story_tap_next { right: 0; }

.story_viewer_footer {
	position: absolute;
	bottom: 16px;
	left: 12px;
	right: 12px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
}
.story_viewers_btn {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	background: rgba(255,255,255,0.15);
	border: none;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	cursor: pointer;
}

/* ---- HİKAYE PAYLAŞ KUTUSU (news kutusu üzerinden açılan) ---- */
.story_compose_preview {
	position: relative;
	width: 100%;
	max-height: 55vh;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}
.story_compose_preview img,
.story_compose_preview video {
	max-width: 100%;
	max-height: 55vh;
	object-fit: contain;
}

/* ---- İZLEYENLER LİSTESİ ---- */
.story_viewers_modal_list { max-height: 360px; overflow-y: auto; }
.story_viewer_row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 4px;
	border-bottom: 1px solid var(--ig-border-light, #efefef);
}
.story_viewer_avatar img {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.story_viewer_row .story_viewer_name {
	flex: 1;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ig-text-primary, #262626);
}
.story_viewer_row .story_viewer_time {
	font-size: 11.5px;
	color: var(--ig-text-tertiary, #a8a8a8);
}

@media (max-width: 520px) {
	.story_bar {
		border-radius: 0 !important;
		border-left: none !important;
		border-right: none !important;
	}
}
