/*
Theme Name: Uncut News Child
Description: Site child theme for Uncut News. It fixes post meta under pretty permalinks with Hindi slugs, a 1–2px horizontal overflow, and the cramped header post on mobile.
Author: News team
Template: uncut-news
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: uncut-news-child
*/

/*
 * BUG-2: 1–2px horizontal overflow.
 * .site-container-width has 14px side padding, but the parent's grid rows pull out
 * further: the home page widget row by 1rem (16px), the footer row by 15px. Their right
 * edges then end 2px and 1px past the viewport. Match the rows' negative margins and
 * the columns' padding to the container's 14px, so each row's edge lines up exactly
 * with the viewport edge.
 */
.widget-element-section .widget-element-wrap.secondary-sidebar-left,
.widget-element-section .widget-element-wrap.secondary-sidebar-right {
	margin-inline: -14px;
}

.widget-element-section .widget-element-wrap .primary-widget-section,
.widget-element-section .widget-element-wrap .secondary-widget-section {
	padding-inline: 14px;
}

.site-footer .upper-footer .upper-footer-container {
	margin-inline: -14px;
}

.site-footer .upper-footer .upper-footer-container .footer-widget-block {
	padding-inline: 14px;
}

/*
 * BUG-3: on phones the header post next to the logo is too narrow to read: the title
 * is clamped to about 2 words and the image is cropped. Hide it at the parent's mobile
 * breakpoint (max-width: 600px, where the middle header switches to one column).
 */
@media (max-width: 600px) {
	.site-middle-header .header-widget {
		display: none;
	}
}

/*
 * Logo (T-006). The custom logo is assets/brand/logo@2x.png (580×240). Show it at 60px
 * tall (145px wide), half its pixel size, so it stays sharp on 2x screens. 48px on
 * phones. The middle header's background is light, so the red logo is used, not the
 * white one.
 */
.site-branding .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding .custom-logo {
	display: block;
	width: auto;
	height: 60px;
	max-width: 100%;
}

@media (max-width: 600px) {
	.site-branding .custom-logo {
		height: 48px;
	}
}

/*
 * Featured image caption with the photo credit (T-009). The parent styles
 * .post-thumbnail as a <div>; as a <figure> it also needs the browser's default margin
 * removed.
 */
figure.post-thumbnail {
	margin: 0;
}

.post-thumbnail-caption {
	margin-top: 6px;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #555;
	overflow-wrap: anywhere;
}

.post-thumbnail-caption a {
	color: inherit;
	text-decoration: underline;
}

/* Source line at the end of each sample article. */
.entry-content .news-source {
	font-size: 0.875rem;
	color: #555;
	border-top: 1px solid #e5e5e5;
	padding-top: 10px;
}

/*
 * T-011 (BUG-G): the "Sign In" button is gone (functions.php), which leaves the parent's
 * .middle-header-right empty. On desktop the empty column keeps the logo centred in the
 * parent's 1fr 2fr 1fr grid, so it stays. On phones the header is a column, where the empty
 * box would add a 12px gap under the logo.
 */
@media (max-width: 600px) {
	.site-middle-header .middle-header-right:not(:has(*)) {
		display: none;
	}
}

/* T-011: privacy policy link after the copyright line (shown once the page is published). */
.site-footer .site-info .privacy-policy-link {
	white-space: nowrap;
}
