/* ═══════════════════════════════════════════════════
   Automatic Photocard System  —  Standalone UI CSS
   3 templates matching the exact reference screenshots
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body.npbd-pc-body {
	height: 100%;
	font-family: 'SolaimanLipi', 'Noto Serif Bengali', serif;
	background: #0d1b2e;
	color: #fff;
	-webkit-font-smoothing: antialiased;
}

/* ── App Shell ── */
.npbd-pc-app {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	max-width: 520px;
	margin: 0 auto;
}

/* ── Top Bar ── */
.npbd-pc-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px 12px;
	background: #0d1b2e;
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.npbd-pc-back {
	color: #fff; display: flex; align-items: center;
	flex-shrink: 0; opacity: .85; text-decoration: none; transition: opacity .2s;
}
.npbd-pc-back:hover { opacity: 1; }
.npbd-pc-back svg { width: 22px; height: 22px; }
.npbd-pc-topbar-title {
	flex: 1; font-size: 14px; font-weight: 700;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.npbd-pc-ver { opacity: .55; font-weight: 400; }
.npbd-pc-info-btn {
	background: none; border: 2px solid rgba(255,255,255,.35);
	border-radius: 50%; width: 30px; height: 30px;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer; color: #fff; flex-shrink: 0; transition: border-color .2s;
}
.npbd-pc-info-btn:hover { border-color: #fff; }
.npbd-pc-info-btn svg { width: 16px; height: 16px; }

/* ── Main ── */
.npbd-pc-main {
	flex: 1; padding: 20px 16px 24px;
	display: flex; flex-direction: column; gap: 20px;
}

/* ── Preview Wrap ── */
.npbd-pc-preview-wrap { display: flex; justify-content: center; }
.npbd-pc-card-stage {
	width: 100%; max-width: 380px;
}

/* ── Template base ── */
.npbd-pc-tpl { display: none; }
.npbd-pc-tpl.active { display: block; }


/* ═══════════════════════════════════════════════════
   TEMPLATE 1 — White / newspaper-style
   (ref: DynamicPhotocard_.png — "সারাদেশ" layout)
   ═══════════════════════════════════════════════════ */

.npbd-t1-wrap {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 32px rgba(0,0,0,.55);
	position: relative;
	padding: 16px 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Red corner triangle — top-right */
.npbd-t1-corner {
	position: absolute;
	top: 0; right: 0;
	width: 0; height: 0;
	border-style: solid;
	border-width: 0 46px 46px 0;
	border-color: transparent #cc0000 transparent transparent;
}

/* Header row */
.npbd-t1-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-right: 30px; /* clear corner triangle */
}
.npbd-t1-cat-date {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	line-height: 1.3;
}
.npbd-t1-cat  { font-weight: 800; }
.npbd-t1-sep  { opacity: .5; }
.npbd-t1-date { font-weight: 600; }
.npbd-t1-logo img {
	max-height: 42px;
	width: auto;
	object-fit: contain;
	display: block;
}
.npbd-t1-logo-text { font-size: 15px; font-weight: 900; color: #111; }

/* Image */
.npbd-t1-img-wrap {
	width: 100%;
	aspect-ratio: 16/10;
	border-radius: 10px;
	overflow: hidden;
	border: 2.5px solid #cc0000;
	box-shadow: 0 2px 10px rgba(204,0,0,.2);
}
.npbd-t1-thumb {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
.npbd-t1-no-img {
	width: 100%; height: 100%;
	background: #e5e5e5; display: flex; align-items: center;
	justify-content: center; color: #999; font-size: 13px;
}

/* Title */
.npbd-t1-title {
	font-size: 20px; /* overridden by slider */
	line-height: 1.4;
	font-weight: 700;
	color: #111;
	text-align: center;
}

/* Red pill readmore row */
.npbd-t1-readmore-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.npbd-t1-dot {
	color: #cc0000;
	font-size: 22px;
	line-height: 1;
}
.npbd-t1-readmore-btn {
	background: #cc0000;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 6px 18px;
	border-radius: 50px;
}

/* Site URL */
.npbd-t1-site-url {
	font-size: 12px;
	color: #888;
	text-align: center;
	letter-spacing: .02em;
}


/* ═══════════════════════════════════════════════════
   TEMPLATE 2 — Classic red-banner bottom
   (ref: DynamicPhotocard2.png — Moon Times layout)
   ═══════════════════════════════════════════════════ */

.npbd-t2-wrap {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 32px rgba(0,0,0,.55);
	position: relative;
}

/* Red corner triangle */
.npbd-t2-corner {
	position: absolute;
	top: 0; right: 0;
	width: 0; height: 0;
	border-style: solid;
	border-width: 0 46px 46px 0;
	border-color: transparent #cc0000 transparent transparent;
	z-index: 2;
}

/* Header row */
.npbd-t2-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 52px 12px 16px; /* right clears triangle */
	background: #fff;
}
.npbd-t2-logo img {
	max-height: 44px;
	width: auto;
	object-fit: contain;
	display: block;
}
.npbd-t2-logo-text { font-size: 15px; font-weight: 900; color: #111; }
.npbd-t2-date {
	font-size: 15px;
	font-weight: 600;
	color: #111;
}

/* Image — no border, full width */
.npbd-t2-img-wrap {
	width: 100%;
	aspect-ratio: 16/10;
	overflow: hidden;
	margin: 0 12px;
	width: calc(100% - 24px);
	border-radius: 6px;
}
.npbd-t2-thumb {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
.npbd-t2-no-img {
	width: 100%; height: 100%;
	background: #e5e5e5; display: flex; align-items: center;
	justify-content: center; color: #999; font-size: 13px;
}

/* Red banner */
.npbd-t2-banner {
	background: #cc0000;
	padding: 18px 18px 14px;
	position: relative;
	overflow: hidden;
	margin-top: 0;
}
/* Subtle dot-grid pattern */
.npbd-t2-dots {
	position: absolute; inset: 0;
	background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
	background-size: 9px 9px;
	pointer-events: none;
}
.npbd-t2-title {
	position: relative;
	font-size: 22px;
	line-height: 1.4;
	font-weight: 800;
	color: #fff;
	text-align: center;
	margin-bottom: 8px;
}
.npbd-t2-readmore {
	position: relative;
	font-size: 14px;
	color: rgba(255,255,255,.9);
	text-align: center;
}


/* ═══════════════════════════════════════════════════
   TEMPLATE 3 — Light bg + category header + cyan strip
   (ref: DynamicPhotocard3.png — বানিজ্য layout)
   ═══════════════════════════════════════════════════ */

.npbd-t3-wrap {
	background: #f8f6f0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 32px rgba(0,0,0,.55);
	padding: 16px 16px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Header row */
.npbd-t3-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.npbd-t3-cat-date {
	font-size: 16px;
	font-weight: 700;
	color: #111;
}
.npbd-t3-cat  { font-weight: 800; }
.npbd-t3-sep  { opacity: .45; }
.npbd-t3-date { font-weight: 600; }
.npbd-t3-logo img {
	max-height: 44px;
	width: auto;
	object-fit: contain;
	display: block;
}
.npbd-t3-logo-text { font-size: 15px; font-weight: 900; color: #111; }

/* Image — rounded corners + red border (thicker) */
.npbd-t3-img-wrap {
	width: 100%;
	aspect-ratio: 16/10;
	border-radius: 12px;
	overflow: hidden;
	border: 3px solid #cc0000;
	box-shadow: 0 2px 12px rgba(204,0,0,.25);
}
.npbd-t3-thumb {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
.npbd-t3-no-img {
	width: 100%; height: 100%;
	background: #ddd; display: flex; align-items: center;
	justify-content: center; color: #999; font-size: 13px;
}

/* Title */
.npbd-t3-title {
	font-size: 22px;
	line-height: 1.4;
	font-weight: 800;
	color: #111;
	text-align: center;
}

/* Italic readmore */
.npbd-t3-readmore {
	font-size: 13px;
	color: #555;
	text-align: center;
	font-style: italic;
	padding-bottom: 4px;
}

/* Cyan / teal site strip */
.npbd-t3-site-strip {
	background: #00b4d8;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
	text-align: center;
	padding: 9px 12px;
	margin: 0 -16px; /* break out of parent padding */
}


/* ═══════════════════════════════════
   TEMPLATE PICKER THUMBNAILS
   ═══════════════════════════════════ */

.npbd-pc-tpl-picker {
	display: flex;
	gap: 12px;
	justify-content: center;
}
.npbd-pc-tpl-thumb {
	background: none;
	border: 2.5px solid rgba(255,255,255,.2);
	border-radius: 8px;
	padding: 0;
	cursor: pointer;
	width: 92px;
	height: 64px;
	overflow: hidden;
	transition: border-color .2s, transform .15s;
}
.npbd-pc-tpl-thumb:hover  { transform: scale(1.05); border-color: rgba(255,255,255,.5); }
.npbd-pc-tpl-thumb.active { border-color: #f5a623; }

.npbd-tp-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

/* T1 thumbnail */
.npbd-tp-1 { background: #fff; padding: 4px; gap: 3px; }
.npbd-tp-1-header { height: 10px; background: #e5e5e5; border-radius: 2px; }
.npbd-tp-1-img    { flex: 1; background: #bbb; border-radius: 3px; border: 1.5px solid #cc0000; }
.npbd-tp-1-title  { height: 10px; background: #ccc; border-radius: 2px; }
.npbd-tp-1-btn    { height: 8px; width: 50%; align-self: center; background: #cc0000; border-radius: 99px; }

/* T2 thumbnail */
.npbd-tp-2 { background: #fff; }
.npbd-tp-2-header { height: 14px; background: #f5f5f5; flex-shrink: 0; }
.npbd-tp-2-img    { flex: 1; background: #bbb; }
.npbd-tp-2-red    { height: 22px; background: #cc0000; flex-shrink: 0; }

/* T3 thumbnail */
.npbd-tp-3 { background: #f8f6f0; padding: 3px; gap: 2px; }
.npbd-tp-3-header { height: 10px; background: #e0ddd5; border-radius: 2px; }
.npbd-tp-3-img    { flex: 1; background: #bbb; border-radius: 3px; border: 1.5px solid #cc0000; }
.npbd-tp-3-title  { height: 10px; background: #ccc; border-radius: 2px; }
.npbd-tp-3-strip  { height: 9px; background: #00b4d8; border-radius: 2px; }


/* ═══════════════════════════════════
   CONTROLS
   ═══════════════════════════════════ */

.npbd-pc-controls {
	background: rgba(255,255,255,.06);
	border-radius: 12px;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.npbd-pc-slider-row { display: flex; flex-direction: column; gap: 8px; }
.npbd-pc-slider-label { font-size: 13px; color: rgba(255,255,255,.75); }
.npbd-pc-slider {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 4px;
	border-radius: 2px; background: rgba(255,255,255,.2);
	outline: none; cursor: pointer;
}
.npbd-pc-slider::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 18px; height: 18px; border-radius: 50%;
	background: #f5a623; cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .15s;
}
.npbd-pc-slider::-webkit-slider-thumb:active { transform: scale(1.2); }
.npbd-pc-slider::-moz-range-thumb {
	width: 18px; height: 18px; border-radius: 50%;
	background: #f5a623; cursor: pointer; border: none;
}

/* ═══════════════════════════════════
   DOWNLOAD BUTTON
   ═══════════════════════════════════ */

.npbd-pc-dl-row { display: flex; justify-content: center; }
.npbd-pc-download-btn {
	background: #f5a623; color: #111; border: none;
	border-radius: 8px; width: 100%; max-width: 380px;
	padding: 14px 24px; font-size: 16px; font-weight: 700;
	font-family: inherit; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	gap: 8px; transition: background .2s, transform .15s;
}
.npbd-pc-download-btn:hover  { background: #e6951a; }
.npbd-pc-download-btn:active { transform: scale(.97); }
.npbd-pc-download-btn.loading { opacity: .6; pointer-events: none; }
.npbd-pc-download-btn svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */

.npbd-pc-footer {
	text-align: center; padding: 14px 16px 20px;
	font-size: 12px; color: rgba(255,255,255,.4);
	border-top: 1px solid rgba(255,255,255,.06);
}
.npbd-pc-footer a { color: #f5a623; text-decoration: none; }
.npbd-pc-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════
   INFO MODAL
   ═══════════════════════════════════ */

.npbd-pc-modal-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.72);
	z-index: 100; display: flex;
	align-items: center; justify-content: center;
	padding: 24px; opacity: 0; pointer-events: none;
	transition: opacity .25s;
}
.npbd-pc-modal-overlay.open { opacity: 1; pointer-events: all; }
.npbd-pc-modal-box {
	background: #162035; border-radius: 14px;
	padding: 28px 24px 24px; max-width: 360px;
	width: 100%; position: relative; color: #fff;
}
.npbd-pc-modal-box h2 { font-size: 18px; margin-bottom: 12px; }
.npbd-pc-modal-box p  { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.8); margin-bottom: 10px; }
.npbd-pc-modal-box ul { padding-left: 20px; margin-bottom: 12px; }
.npbd-pc-modal-box li { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.8; }
.npbd-pc-modal-ver    { font-size: 12px !important; color: rgba(255,255,255,.35) !important; margin-top: 14px !important; }
.npbd-pc-modal-close  {
	position: absolute; top: 14px; right: 16px;
	background: none; border: none; color: rgba(255,255,255,.55);
	font-size: 18px; cursor: pointer; transition: color .2s;
}
.npbd-pc-modal-close:hover { color: #fff; }

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */

@media (max-width: 400px) {
	.npbd-pc-topbar-title { font-size: 12px; }
	.npbd-pc-tpl-thumb    { width: 78px; height: 54px; }
}
