/* BizNews E-Paper — edition viewer (standalone) */

body.biznews-epaper-edition {
	background: #eef1f5;
}

body.biznews-epaper-edition .container,
body.biznews-epaper-edition .container-fluid {
	max-width: 100%;
}

body.biznews-epaper-edition .biznews-breadcrumb,
body.biznews-epaper-edition .page-header,
body.biznews-epaper-edition .section-title {
	display: none;
}

/* E-Paper page logo (Logo Image 3) — matches main /e-paper listing */
.epaper-page-logo {
	text-align: center;
}

.epaper-page-logo .biznews-epaper-logo {
	width: 100% !important;
	max-width: 100%;
	height: auto !important;
	display: block;
	margin-left: auto;
	margin-right: auto;
	object-fit: contain;
	flex-shrink: unset;
}

@media (min-width: 768px) {
	.epaper-page-logo .biznews-epaper-logo {
		width: 500px !important;
		max-width: 500px;
	}
}

.env-page-wrap {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 0 2rem;
	box-sizing: border-box;
}

.env-page-wrap--with-logo {
	padding-top: 0;
}

.env-root {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 160px + 400px);
	height: calc(100vh - 160px + 400px);
	max-height: 1800px;
	margin: 0;
	padding: 0;
	background: #1a1c1f;
	color: #fff;
	font-family: 'Jost', sans-serif;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
}

.env-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: #111316;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	flex-wrap: wrap;
}

.env-topbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.env-masthead-title {
	display: block;
	font-size: 1rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.env-masthead-date {
	display: block;
	font-size: 12px;
	opacity: .75;
}

.env-topbar-tools {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.env-vrule {
	width: 1px;
	height: 22px;
	background: rgba(255, 255, 255, .15);
}

.env-icon-btn,
.env-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 34px;
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 4px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}

.env-icon-btn {
	min-width: 34px;
	padding: 6px 8px;
}

.env-icon-btn:hover,
.env-btn:hover {
	background: rgba(255, 255, 255, .16);
	color: #fff;
	text-decoration: none;
}

.env-btn--accent {
	background: #c41e24;
	border-color: #c41e24;
}

.env-icon-btn--blue {
	background: #0d6efd;
	border-color: #0d6efd;
}

.env-zoom-pct {
	min-width: 42px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
}

.env-share {
	position: relative;
}

.env-share-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 50;
	min-width: 170px;
	padding: 6px;
	background: #25282c;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.env-share-menu button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	text-align: left;
}

.env-share-menu button:hover {
	background: rgba(255, 255, 255, .1);
}

.env-shell {
	display: flex;
	flex: 1 1 auto;
	min-height: 520px;
}

.env-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.env-thumbs {
	width: 100px;
	flex-shrink: 0;
	background: #25282c;
	border-right: 1px solid rgba(255, 255, 255, .08);
	display: flex;
	flex-direction: column;
}

.env-thumbs-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 8px 6px;
}

.env-thumb {
	display: block;
	width: 100%;
	border: 2px solid transparent;
	background: #fff;
	padding: 2px;
	margin-bottom: 8px;
	cursor: pointer;
}

.env-thumb img,
.env-thumb-skel {
	display: block;
	width: 100%;
	aspect-ratio: 3/4;
	background: #e5e7eb;
}

.env-thumb span {
	display: block;
	font-size: 10px;
	color: #111;
	text-align: center;
	font-weight: 600;
	padding: 2px 0;
}

.env-thumb.is-on,
.env-thumb:hover {
	border-color: #c41e24;
}

.env-main {
	flex: 1;
	display: flex;
	align-items: stretch;
	min-width: 0;
	position: relative;
	background: #3a3f45;
}

.env-page-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 8;
	width: 36px;
	height: 52px;
	border: 0;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	cursor: pointer;
}

.env-page-arrow:hover:not(:disabled) {
	background: rgba(196, 30, 36, .9);
}

.env-page-arrow:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.env-page-arrow--prev {
	left: 0;
	border-radius: 0 4px 4px 0;
}

.env-page-arrow--next {
	right: 0;
	border-radius: 4px 0 0 4px;
}

.env-stage {
	flex: 1;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.env-loader {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(58, 63, 69, .95);
}

.env-loader.is-hidden {
	display: none;
}

.env-loader-spin {
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, .2);
	border-top-color: #c41e24;
	border-radius: 50%;
	animation: envSpin .75s linear infinite;
}

@keyframes envSpin {
	to { transform: rotate(360deg); }
}

.env-page {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
}

.env-page-inner {
	position: relative;
	display: inline-flex;
}

.env-page-inner.is-zoomed {
	align-items: flex-start;
	justify-content: flex-start;
}

.env-canvas {
	display: block;
	box-shadow: 0 6px 28px rgba(0, 0, 0, .35);
	background: #fff;
	max-width: 100%;
}

.env-canvas--source {
	position: absolute;
	left: -9999px;
	width: 0;
	height: 0;
	overflow: hidden;
	visibility: hidden;
}

.env-page-img {
	display: block;
	max-width: 100%;
	box-shadow: 0 6px 28px rgba(0, 0, 0, .35);
	background: #fff;
	user-select: none;
	cursor: default;
}

.env-page-inner.has-zones {
	cursor: pointer;
}

.env-clip-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 4;
}

.env-page-inner.has-zones .env-clip-layer {
	pointer-events: auto;
}

/* Invisible hit areas — highlight only on hover (Rashtra-style) */
.env-clip-zone {
	position: absolute;
	box-sizing: border-box;
	border: 2px solid transparent;
	background: transparent;
	cursor: pointer;
	pointer-events: auto;
	transition: background .12s ease, border-color .12s ease;
}

.env-clip-zone.is-hover,
.env-clip-zone:hover {
	border-color: rgba(226, 54, 45, .85);
	background: rgba(226, 54, 45, .18);
}

.env-clip-hl {
	position: absolute;
	border: 2px solid #e2362d;
	background: rgba(226, 54, 45, .16);
	pointer-events: none;
	z-index: 5;
	opacity: 0;
	transition: opacity .12s ease;
}

.env-clip-hl.is-on {
	opacity: 1;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, .12);
}

.env-bottombar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	background: #111316;
	border-top: 1px solid rgba(255, 255, 255, .08);
	flex-wrap: wrap;
}

.env-bottombar-group {
	display: flex;
	gap: 6px;
}

.env-page-jump {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.env-page-input {
	width: 54px;
	padding: 5px 8px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 4px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	text-align: center;
}

.env-toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(16px);
	padding: 10px 16px;
	background: #111;
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 6px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	z-index: 9999;
}

.env-toast.is-on {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.env-root:fullscreen {
	min-height: 100vh;
}

.env-root:fullscreen .env-shell {
	flex: 1;
	min-height: 0;
}

@media (max-width: 991px) {
	.env-thumbs {
		display: none;
	}

	.env-topbar-tools .env-btn:not(.env-btn--accent) span {
		display: none;
	}
}

@media (max-width: 767px) {
	.env-page-wrap {
		padding: 0.75rem 0.5rem 1.25rem;
	}

	.env-root {
		border-radius: 6px;
		margin-top: 0;
		min-height: calc(100vh - 120px + 150px);
		height: calc(100vh - 120px + 150px);
	}

	.env-topbar-tools {
		order: 3;
		width: 100%;
		overflow-x: auto;
		flex-wrap: nowrap;
	}

	.env-shell {
		min-height: 380px;
	}
}

/* Clip share modal */
.env-clip-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.env-clip-modal[hidden] {
	display: none !important;
}

.env-clip-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.env-clip-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(520px, 96vw);
	max-height: 92vh;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.env-clip-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #1a1c1f;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	transition: background .15s ease, transform .15s ease;
}

.env-clip-modal-close:hover,
.env-clip-modal-close:focus {
	background: #c41e24;
	color: #fff;
	outline: none;
	transform: scale(1.05);
}

.env-clip-modal-close:focus-visible {
	box-shadow: 0 0 0 3px rgba(196, 30, 36, .35);
}

.env-clip-modal-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 14px 52px 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
}

.env-clip-modal-header h5 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #111;
}

.env-clip-modal-body {
	padding: 16px;
	overflow: auto;
	text-align: center;
	min-height: 120px;
}

.env-clip-saving {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px 0;
	color: #555;
}

.env-clip-preview-img {
	max-width: 100%;
	height: auto;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
	border: 1px solid #e5e7eb;
}

.env-clip-modal-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	padding: 12px 16px 16px;
	border-top: 1px solid #e5e7eb;
}

.env-clip-share-btn {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 4px;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.env-clip-share-btn--share { background: #0077b6; }
.env-clip-share-btn--download { background: #ed0000; }
.env-clip-share-btn--copy { background: #ff4500; }
.env-clip-share-btn--open { background: #8a2be2; }
.env-clip-share-btn--facebook { background: #4267b2; }
.env-clip-share-btn--twitter { background: #000; }
.env-clip-share-btn--whatsapp { background: #25d366; }

.env-clip-share-btn:hover {
	opacity: .88;
}
