/* UrduPaper Addon — News Blocks. All selectors are scoped. */
.upm-newsblocks { width:100%; max-width:100%; }
.upm-newsblocks *, .upm-newsblocks *::before, .upm-newsblocks *::after { box-sizing:border-box; }
.upm-newsblocks img { display:block; max-width:100%; height:auto; }
.upm-newsblocks a { color:inherit; text-decoration:none; }

/* News Showcase — matches the supplied UrduPaper reference hierarchy. */
.upm-news-showcase__main {
	display:grid;
	grid-template-columns:minmax(0,var(--upmns-side-width,32%)) minmax(0,1fr);
	gap:var(--upmp-gap,10px);
	align-items:start;
}
.upm-news-showcase--hero-left .upm-news-showcase__feature { order:1; }
.upm-news-showcase--hero-left .upm-news-showcase__side { order:2; }
.upm-news-showcase--hero-right .upm-news-showcase__side { order:1; }
.upm-news-showcase--hero-right .upm-news-showcase__feature { order:2; }
.upm-news-showcase__feature,
.upm-news-showcase__side,
.upm-news-showcase__hero-card { min-width:0; }
.upm-news-showcase__hero-image {
	display:block;
	width:100%;
	height:var(--upmns-hero-height,300px);
	overflow:hidden;
	border-radius:var(--upmns-image-radius,4px);
	background:#eef1f5;
}
.upm-news-showcase--ratio-auto .upm-news-showcase__hero-image { height:auto; min-height:180px; }
.upm-news-showcase__hero-image img,
.upm-news-showcase__hero-image .upm-news-showcase__placeholder { width:100%; height:100%; object-fit:cover; }
.upm-news-showcase__hero-copy { padding:5px 2px 9px; border-block-end:1px solid var(--upmp-border,#dfe4ec); text-align:right; }
.upm-news-showcase__hero-copy h3 { margin:2px 0 2px; color:var(--upmp-text,#172033); font-family:var(--upmp-title-font,inherit); font-size:var(--upmns-hero-title,20px); font-weight:700; line-height:1.4; }
.upm-news-showcase__hero-copy p { margin:2px 0 0; color:var(--upmp-muted,#657085) !important; font-family:var(--upmp-body-font,inherit) !important; font-size:var(--upmp-body-size,14px) !important; line-height:1.65; direction: rtl;}
.upm-news-showcase time { color:var(--upmp-muted,#657085); font-family:var(--upmp-meta-font,inherit); font-size:var(--upmp-meta-size,12px); }
.upm-news-showcase__cat { display:inline-block; margin-bottom:2px; color:var(--upmp-accent,#e32636); font-family:var(--upmp-meta-font,inherit); font-size:var(--upmp-meta-size,12px); font-weight:700; }

/* Left/side rail: one large story first, then compact image headlines. */
.upm-news-showcase__side { min-width:0; }
.upm-news-showcase__side-lead { padding:0 0 8px; border-block-end:1px solid var(--upmp-border,#dfe4ec); }
.upm-news-showcase__side-lead-image { display:block; width:100%; aspect-ratio:5/3; overflow:hidden; border-radius:var(--upmns-image-radius,4px); background:#eef1f5; }
.upm-news-showcase__side-lead-image img,
.upm-news-showcase__side-lead-image .upm-news-showcase__placeholder { width:100%; height:100%; object-fit:cover; }
.upm-news-showcase__side-lead-copy { padding:6px 1px 0; direction:rtl; text-align:right; }
.upm-news-showcase__side-lead-copy h3 { margin:1px 0 0; color:var(--upmp-text,#172033); font-family:var(--upmp-title-font,inherit); font-size:var(--upmns-side-lead-title,14px); font-weight:700; line-height:1.45; }
.upm-news-showcase__side-lead-copy h3 a:hover { color:var(--upmp-accent,#e32636); }
.upm-news-showcase__side-item { display:flex; direction:ltr; align-items:center; justify-content:space-between; gap:7px; min-height:58px; padding:8px 0; border-block-end:1px solid var(--upmp-border,#dfe4ec); }
.upm-news-showcase__side-copy { min-width:0; flex:1 1 auto; direction:rtl; text-align:right; }
.upm-news-showcase__side-copy h4 { margin:0; color:var(--upmp-text,#172033); font-family:var(--upmp-title-font,inherit); font-size:var(--upmns-side-title,13px); font-weight:600; line-height:1.4; }
.upm-news-showcase__side-copy h4 a:hover { color:var(--upmp-accent,#e32636); }
.upm-news-showcase__side-image { flex:0 0 clamp(42px,27%,88px); width:clamp(42px,27%,88px); aspect-ratio:4/3; overflow:hidden; border-radius:var(--upmns-image-radius,4px); background:#eef1f5; }
.upm-news-showcase__side-image img,
.upm-news-showcase__side-image .upm-news-showcase__placeholder { width:100%; height:100%; object-fit:cover; }
.upm-news-showcase__placeholder { display:flex; align-items:center; justify-content:center; min-height:48px; color:#9ba5b4; background:linear-gradient(135deg,#eef1f5,#e2e6ec); }
.upm-news-showcase__placeholder .dashicons { width:30px; height:30px; font-size:30px; }

/* Three lower stories live only under the main lead column, as in reference. */
.upm-news-showcase__bottom { display:grid; grid-template-columns:repeat(var(--upmns-bottom-cols,3),minmax(0,1fr)); gap:var(--upmp-gap,10px); margin-top:10px; }
.upm-news-showcase__bottom-card { min-width:0; overflow:hidden; background:var(--upmp-card-bg,#fff); border:var(--upmp-border-width,1px) solid var(--upmp-border,#dfe4ec); border-radius:var(--upmp-radius,4px); box-shadow:0 2px 7px rgba(17,24,39,.07); }
.upm-news-showcase__bottom-image { display:block; aspect-ratio:5/3; overflow:hidden; background:#eef1f5; }
.upm-news-showcase__bottom-image img,
.upm-news-showcase__bottom-image .upm-news-showcase__placeholder { width:100%; height:100%; object-fit:cover; }
.upm-news-showcase__bottom-card > div { padding:5px 7px 8px; direction:rtl; text-align:right; }
.upm-news-showcase__bottom-card h4 { margin:1px 0 0; color:var(--upmp-text,#172033); font-family:var(--upmp-title-font,inherit); font-size:var(--upmns-bottom-title,13px); font-weight:600; line-height:1.4; }
.upm-news-showcase__bottom-card h4 a:hover { color:var(--upmp-accent,#e32636); }

/* Flexible Rate List */
.upm-rate-list__scroll { width:100%; overflow-x:auto; border:1px solid var(--upmrt-border,#d7dce3); border-radius:var(--upmp-radius,6px); background:var(--upmrt-row-bg,#fff); }
.upm-rate-list__table { width:100%; min-width:max(100%,var(--upmrt-table-min,220px)); border-collapse:collapse; border-spacing:0; color:var(--upmp-text,#172033); background:var(--upmrt-row-bg,#fff); font-family:var(--upmp-font,inherit); font-size:var(--upmrt-font-size,16px); line-height:1.45; }
.upm-rate-list__table th, .upm-rate-list__table td { min-width:var(--upmrt-min-col,110px); padding:var(--upmrt-cell-pad,11px); border-inline-end:1px solid var(--upmrt-border,#d7dce3); border-block-end:1px solid var(--upmrt-border,#d7dce3); vertical-align:middle; }
.upm-rate-list__table tr > :last-child { border-inline-end:0; }
.upm-rate-list__table tbody tr:last-child td { border-block-end:0; }
.upm-rate-list__table thead th { color:var(--upmrt-head-color,#fff); background:var(--upmrt-head-bg,#e32636); font-weight:700; }
.upm-rate-list__table tbody td { background:var(--upmrt-row-bg,#fff); }
.upm-rate-list.is-striped .upm-rate-list__table tbody tr:nth-child(even) td { background:var(--upmrt-alt-bg,#f7f8fa); }
.upm-rate-list.is-first-bold .upm-rate-list__table tbody td:first-child { font-weight:700; color:var(--upmp-text,#172033); }
.upm-rate-list__empty td { padding:24px !important; color:var(--upmp-muted,#657085); text-align:center !important; }

/* Video Showcase */
.upm-video-showcase__layout { display:grid; grid-template-columns:var(--upmvid-playlist,34%) minmax(0,1fr); overflow:hidden; min-height:var(--upmvid-height,430px); border-radius:var(--upmp-radius,8px); background:var(--upmvid-video-bg,#160000); }
.upm-video-showcase--playlist-right .upm-video-showcase__stage { order:1; }
.upm-video-showcase--playlist-right .upm-video-showcase__playlist { order:2; }
.upm-video-showcase--playlist-left .upm-video-showcase__playlist { order:1; }
.upm-video-showcase--playlist-left .upm-video-showcase__stage { order:2; }
.upm-video-showcase__stage { min-width:0; display:flex; flex-direction:column; justify-content:center; background:var(--upmvid-video-bg,#160000); }
.upm-video-showcase__player { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; background:#000; }
.upm-video-showcase--ratio-4-3 .upm-video-showcase__player { aspect-ratio:4/3; }
.upm-video-showcase--ratio-1-1 .upm-video-showcase__player { aspect-ratio:1/1; }
.upm-video-showcase__player iframe, .upm-video-showcase__player video, .upm-video-showcase__player > div:not(.upm-video-showcase__empty-player) { width:100% !important; height:100% !important; max-width:none !important; border:0; display:block; }
.upm-video-showcase__stage > h3 { margin:0; padding:13px 18px 16px; color:var(--upmvid-title,#fff); font-family:var(--upmp-title-font,inherit); font-size:var(--upmp-title-size,17px); line-height:1.45; text-align:center; }
.upm-video-showcase__playlist { max-height:var(--upmvid-height,430px); overflow-y:auto; padding:10px; background:var(--upmvid-list-bg,#75090f); scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.4) transparent; }
.upm-video-showcase__item { width:100%; display:flex; align-items:center; gap:10px; margin:0 0 10px; padding:10px; border:0; border-radius:6px; color:var(--upmvid-list-text,#fff); background:var(--upmvid-item-bg,#8d171b); text-align:start; cursor:pointer; transition:transform .15s ease,background-color .15s ease; }
.upm-video-showcase__item:last-of-type { margin-bottom:0; }
.upm-video-showcase__item:hover, .upm-video-showcase__item:focus, .upm-video-showcase__item.is-active { background:var(--upmvid-active-bg,#a51d22); transform:translateY(-1px); }
.upm-video-showcase__thumb { position:relative; flex:0 0 var(--upmvid-thumb,82px); width:var(--upmvid-thumb,82px); aspect-ratio:16/9; overflow:hidden; border-radius:4px; background:rgba(0,0,0,.28); }
.upm-video-showcase__thumb img { width:100%; height:100%; object-fit:cover; }
.upm-video-showcase__thumb > i { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); width:30px; height:30px; padding:5px; border-radius:50%; color:#e32636; background:rgba(255,255,255,.93); font-size:20px; line-height:20px; }
.upm-video-showcase__item-copy { min-width:0; display:flex; flex:1 1 auto; flex-direction:column; gap:4px; }
.upm-video-showcase__item-copy small { color:#ffd6d8; font-family:var(--upmp-meta-font,inherit); font-size:var(--upmp-meta-size,12px); font-weight:700; }
.upm-video-showcase__item-copy strong { color:inherit; font-family:var(--upmp-title-font,inherit); font-size:var(--upmp-body-size,14px); font-weight:600; line-height:1.4; }
.upm-video-showcase__empty-player { min-height:280px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:28px; color:#fff; text-align:center; }
.upm-video-showcase__empty-player .dashicons { width:42px; height:42px; font-size:42px; }
.upm-video-showcase__empty-player p { margin:0; }
.upm-video-showcase__empty-list { padding:24px 12px; color:rgba(255,255,255,.82); text-align:center; }
.upm-video-showcase template { display:none !important; }

@media (max-width: 900px) {
	.upm-news-showcase__bottom { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.upm-video-showcase__layout { grid-template-columns:38% minmax(0,1fr); }
}
@media (max-width: 680px) {
	.upm-news-showcase__main { grid-template-columns:1fr; }
	.upm-news-showcase__feature, .upm-news-showcase__side { order:initial !important; }
	.upm-news-showcase__feature { order:1 !important; }
	.upm-news-showcase__side { order:2 !important; }
	.upm-news-showcase__hero-image { height:min(var(--upmns-hero-height,300px),65vw); }
	.upm-news-showcase__bottom { grid-template-columns:1fr 1fr; }
	.upm-news-showcase__side-image { flex-basis:78px; width:78px; }
	.upm-video-showcase__layout { grid-template-columns:1fr; min-height:0; }
	.upm-video-showcase__stage, .upm-video-showcase__playlist { order:initial !important; }
	.upm-video-showcase__stage { order:1 !important; }
	.upm-video-showcase__playlist { order:2 !important; max-height:360px; }
	.upm-video-showcase__thumb { flex-basis:min(var(--upmvid-thumb,82px),92px); }
}
@media (max-width: 560px) {
	.upm-news-showcase__bottom { grid-template-columns:1fr; }
	.upm-rate-list--mobile-stack .upm-rate-list__scroll { overflow:visible; border:0; }
	.upm-rate-list--mobile-stack .upm-rate-list__table, .upm-rate-list--mobile-stack .upm-rate-list__table tbody, .upm-rate-list--mobile-stack .upm-rate-list__table tr, .upm-rate-list--mobile-stack .upm-rate-list__table td { display:block; width:100%; min-width:0; }
	.upm-rate-list--mobile-stack .upm-rate-list__table thead { display:none; }
	.upm-rate-list--mobile-stack .upm-rate-list__table tr { margin-bottom:10px; overflow:hidden; border:1px solid var(--upmrt-border,#d7dce3); border-radius:var(--upmp-radius,6px); }
	.upm-rate-list--mobile-stack .upm-rate-list__table td { display:grid; grid-template-columns:minmax(90px,40%) 1fr; gap:12px; border-inline:0; text-align:start !important; }
	.upm-rate-list--mobile-stack .upm-rate-list__table td::before { content:attr(data-label); font-weight:700; color:var(--upmp-muted,#657085); }
}
.upm-news-showcase--ratio-5-3 .upm-news-showcase__hero-image { height:auto; aspect-ratio:5/3; }
.upm-news-showcase--ratio-16-9 .upm-news-showcase__hero-image { height:auto; aspect-ratio:16/9; }
.upm-news-showcase--ratio-4-3 .upm-news-showcase__hero-image { height:auto; aspect-ratio:4/3; }
.upm-news-showcase--ratio-3-2 .upm-news-showcase__hero-image { height:auto; aspect-ratio:3/2; }
