/* ==========================================================================
   Acervo de Revistas — galeria de capas + leitor (flipbook 3D próprio).
   ========================================================================== */

/* ---------- Galeria ---------- */
.dv-acervo__feed { max-width: 1100px; }
.dv-acervo__head { padding: 8px 4px 18px; }
.dv-acervo__title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.dv-acervo__sub { color: var(--ig-muted); margin: 6px 0 0; font-size: 15px; }
.dv-acervo__empty { color: var(--ig-muted); text-align: center; padding: 48px 0; }

.dv-acervo__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 26px 20px;
	padding: 8px 4px 40px;
}
.dv-rev {
	display: flex; flex-direction: column; gap: 8px;
	background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.dv-rev__cover {
	position: relative; display: block; width: 100%; aspect-ratio: 3 / 4;
	background: #e9e9ee center/cover no-repeat;
	box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.dv-rev:hover .dv-rev__cover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.26); }
.dv-rev__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: .1em; color: #9aa0ab; }
.dv-rev__play {
	position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(3px);
	opacity: 0; transform: scale(.85); transition: opacity .2s ease, transform .2s ease;
}
.dv-rev:hover .dv-rev__play { opacity: 1; transform: scale(1); }
.dv-rev__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.dv-rev__ed { font-size: 12.5px; color: var(--ig-muted); }
html.dv-dark .dv-rev__cover { background-color: #1d1d20; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ---------- Leitor (overlay) ---------- */
.dv-reader[hidden] { display: none; }
.dv-reader {
	position: fixed; inset: 0; z-index: 100000;
	background: #15151a; color: #f4f4f6;
	display: flex; flex-direction: column;
	-webkit-font-smoothing: antialiased;
}
.dv-reader__bar {
	display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex: 0 0 auto;
	border-bottom: 1px solid rgba(255,255,255,.08);
	position: relative; z-index: 6; background: #15151a;
}
.dv-reader__title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-reader__pg { font-size: 13px; color: #aeb0b8; font-variant-numeric: tabular-nums; }
.dv-reader__close {
	width: 42px; height: 42px; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.dv-reader__close:hover { background: rgba(255,255,255,.16); }

.dv-reader__stage {
	flex: 1 1 auto; position: relative; display: flex; align-items: center; justify-content: center;
	padding: 12px; min-height: 0;
}
.dv-reader__book {
	flex: 1 1 auto; height: 100%; display: flex; align-items: center; justify-content: center; min-width: 0;
}

/* livro + virada 3D */
.dv-fb { position: relative; display: flex; perspective: 2600px; }
.dv-fb__pg { position: relative; background: #fff; overflow: hidden; box-shadow: 0 14px 50px rgba(0,0,0,.55); }
.dv-fb__pg--l { box-shadow: -8px 14px 50px rgba(0,0,0,.55); }
.dv-fb__pg img, .dv-fb__face img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }

.dv-fb__leaf { position: absolute; top: 0; transform-style: preserve-3d; will-change: transform; z-index: 5; }
.dv-fb__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #fff; box-shadow: 0 14px 50px rgba(0,0,0,.5); }
.dv-fb__face--b { transform: rotateY(180deg); }

/* navegação: zonas de toque invisíveis sobre a revista (esq./dir.) */
.dv-reader__nav {
	position: absolute; top: 0; bottom: 0; width: 33%; max-width: 360px;
	border: 0; background: transparent; padding: 0; margin: 0;
	cursor: pointer; z-index: 4; color: transparent; -webkit-tap-highlight-color: transparent;
	-webkit-appearance: none; appearance: none; outline: none;
}
.dv-reader__nav svg { display: none; }
.dv-reader__prev { left: 0; }
.dv-reader__next { right: 0; }

/* carregando (abaixo da barra; nunca cobre o X) */
.dv-reader__loading {
	position: absolute; left: 0; right: 0; bottom: 0; top: 58px; z-index: 3;
	display: flex; flex-direction: column; align-items: center; justify-content: center; background: #15151a;
}
.dv-reader__loadtxt { color: #c9cbd2; margin-top: 14px; font-size: 13px; }
.dv-reader__spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: #fff; animation: dv-reader-spin .9s linear infinite; }
@keyframes dv-reader-spin { to { transform: rotate(360deg); } }
.dv-reader__msg { color: #fff; padding: 24px; text-align: center; }

@media (max-width: 900px) {
	.dv-reader__stage { padding: 8px; }
	.dv-reader__nav { width: 40%; }
}

/* ---------- Leitor aberto: tela cheia, esconde topo e rodapé ---------- */
body.dv-reader-open { overflow: hidden; }
body.dv-reader-open #top,
body.dv-reader-open .dv-tabbar,
body.dv-reader-open .footer,
body.dv-reader-open .scrollTop { display: none !important; }
.dv-reader:fullscreen { width: 100vw; height: 100vh; }
.dv-reader:-webkit-full-screen { width: 100vw; height: 100vh; }
