/* ==== Stories Blog Post - estilos ==== */

/* Reset defensivo: muitos temas/page builders aplicam estilo global em
   <button>, <a> etc. Isolamos nossos elementos pra sempre renderizar igual,
   independente do tema. */
.sbp-bolinha-item,
.sbp-arquivo-item,
.sbp-nav,
.sbp-close,
.sbp-carousel-arrow,
.sbp-carousel-dot {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
}

.sbp-empty {
	opacity: .7;
	font-style: italic;
}

/* ---- Bolinhas (home) ---- */
.sbp-bolinhas-wrap {
	width: 100%;
	overflow: hidden;
	padding: 8px 0;
}

.sbp-bolinhas-scroll {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 4px 4px 12px;
}

.sbp-bolinhas-scroll::-webkit-scrollbar {
	display: none;
}

.sbp-bolinha-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	width: 76px;
}

.sbp-bolinha-ring {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	padding: 3px;
	background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}

.sbp-bolinha-item:hover .sbp-bolinha-ring {
	transform: scale(1.05);
}

.sbp-bolinha-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #222;
	background-size: cover;
	background-position: center;
	border: 3px solid #fff;
}

.sbp-bolinha-label {
	font-size: 12px;
	line-height: 1.2;
	text-align: center;
	max-width: 76px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: inherit;
}

/* ---- Grade de arquivados ---- */
.sbp-arquivo-titulo {
	font-size: 20px;
	font-weight: 700;
	margin: 8px 0 16px;
}

.sbp-arquivo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.sbp-arquivo-item {
	position: relative;
	border: none;
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 9 / 16;
	padding: 0;
	background: #111;
	display: block;
}

.sbp-arquivo-thumb {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform .3s ease;
}

.sbp-arquivo-item:hover .sbp-arquivo-thumb {
	transform: scale(1.06);
}

.sbp-arquivo-views {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 7px;
	border-radius: 20px;
	z-index: 2;
}

.sbp-arquivo-info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 8px;
	background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.sbp-arquivo-nome {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sbp-arquivo-data {
	color: rgba(255,255,255,.75);
	font-size: 11px;
	margin-top: 4px;
}

/* ---- Visualizador (modal) ---- */
.sbp-viewer {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.92);
}

.sbp-viewer.sbp-open {
	display: flex;
}

.sbp-viewer-stage {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sbp-story-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	height: 100%;
	max-height: 90vh;
	aspect-ratio: 9 / 16;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 0 40px rgba(0,0,0,.6);
}

.sbp-progress-row {
	position: absolute;
	top: 8px;
	left: 8px;
	right: 8px;
	display: flex;
	gap: 4px;
	z-index: 5;
}

.sbp-progress-seg {
	flex: 1;
	height: 3px;
	background: rgba(255,255,255,.35);
	border-radius: 3px;
	overflow: hidden;
}

.sbp-progress-fill {
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 3px;
}

.sbp-progress-seg.sbp-done .sbp-progress-fill {
	width: 100%;
}

.sbp-story-header {
	position: absolute;
	top: 20px;
	left: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 5;
}

.sbp-story-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid rgba(255,255,255,.4);
}

.sbp-story-headertext {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.sbp-story-username {
	color: #fff;
	font-weight: 600;
	font-size: 13px;
}

.sbp-story-time {
	color: rgba(255,255,255,.75);
	font-size: 11px;
}

.sbp-story-media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #1a1a1a;
}

.sbp-story-gradient-top {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 120px;
	background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
	z-index: 2;
}

.sbp-story-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 55%;
	overflow-y: auto;
	padding: 40px 16px 24px;
	background: linear-gradient(to top, rgba(0,0,0,.88) 40%, rgba(0,0,0,0));
	z-index: 4;
}

.sbp-story-title {
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.sbp-story-text {
	color: rgba(255,255,255,.92);
	font-size: 14px;
	line-height: 1.5;
}

.sbp-tap-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 35%;
	z-index: 3;
	cursor: pointer;
}

.sbp-tap-left {
	left: 0;
}

.sbp-tap-right {
	right: 0;
}

.sbp-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 20;
	background: rgba(0,0,0,.4);
	border: none;
	color: #fff;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.sbp-nav {
	position: relative;
	z-index: 10;
	background: rgba(255,255,255,.12);
	border: none;
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	flex: 0 0 auto;
	margin: 0 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sbp-nav:hover {
	background: rgba(255,255,255,.25);
}

@media (max-width: 600px) {
	.sbp-nav {
		display: none;
	}
	.sbp-story-card {
		max-width: 100%;
		border-radius: 0;
		max-height: 100vh;
	}
}
