/*
	Theme Name: MHC Main
	Theme URI: https://muslimhistorychronicles.com/
	Description: The one theme for Muslim History Chronicles: article, archive and card styling carried over from TheIssue, plus the MHC templates, home page and header/footer.
	Author: Sarim Ashrafi
	Author URI: https://thevertechs.in
	Version: 2.0.1
	Requires at least: 6.5
	Requires PHP: 7.4
	License: GPL-2.0-or-later
	License URI: https://www.gnu.org/licenses/gpl-2.0.html
	Text Domain: theissue
*/


/*
 * The parent theme enqueues this file (handle: thb-style) after its own app.css,
 * so rules here override the parent. Add MHC styles below.
 */

/* Date and letter tiles in search suggestions (theme search pop-up and the
   search page), in the secondary colour. */
.mhc-ac-tile {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 100%; height: 100%;
	background: var(--mh-teal,#126788); color: #fff;
	font-size: 11px; font-weight: 600; line-height: 1.1; text-transform: uppercase;
}
.mhc-ac-tile strong { font-size: 24px; line-height: 1; }

/* Bylines under an article's title: several writers' photos overlap a little. */
.mhc-byline-faces { display: inline-flex; flex: none; margin-right: 10px; }
.mhc-byline-faces .avatar { width: 40px !important; height: 40px !important; margin: 0 !important; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.mhc-byline-faces .avatar + .avatar { margin-left: -12px !important; }

/* Optical centring of the theme's buttons and chips.
   Sinkin Sans capitals don't sit in the middle of their line, and where they
   sit depends on the font's own metrics, so no fixed offset is right
   everywhere. Instead the text is trimmed to the height of its capital letters
   (text-box) and the padding is worked out from the line height we want to
   keep (1lh) and that capital height (1cap): equal space above and below the
   letters, same overall height as before. Browsers without text-box/cap get
   the text nudged down by 0.1em (measured on the owner's screen). */
@supports (text-box: trim-both cap alphabetic) and (padding: 1cap) {
	/* The theme's buttons have a fixed height and line-height and no vertical padding of their own. !important because some of the theme's variants set the padding with a more specific selector. */
	.btn {
		text-box: trim-both cap alphabetic;
		padding-top: calc((1lh - 1cap) / 2) !important;
		padding-bottom: calc((1lh - 1cap) / 2) !important;
	}
	a.tag-cloud-link:not(.mhc-save) {
		display: block;
		text-box: trim-both cap alphabetic;
		padding-block: calc(9px + (1lh - 1cap) / 2);
	}
}
@supports not ((text-box: trim-both cap alphabetic) and (padding: 1cap)) {
	.btn { padding-top: 0.1em !important; }
	.tag-cloud-link { padding: calc(9px + 0.1em) 12px calc(9px - 0.1em); }
}

/* The same for the header menu and its drop-downs. The links are
   <a><span>Label</span></a> and the <a> is a flex row, so trimming the label to
   its capital height and centring it puts the same space above and below.
   The drop-down's spacing (12px above and below, 24px at the sides) is set in
   Theme Options > Extra CSS with !important, so the rules here are more specific
   and keep that look: the row is still 24px + one line tall, whatever the
   arrow of a sub-menu does to its height. */
@supports (text-box: trim-both cap alphabetic) and (padding: 1cap) {
	.thb-full-menu > li > a:not(.logolink) > span,
	.thb-full-menu .sub-menu li > a > span {
		text-box: trim-both cap alphabetic;
	}
	.thb-full-menu .sub-menu li > a {
		box-sizing: border-box;
		padding: 0 24px !important;
		min-height: calc(24px + 1lh);
		align-items: center;
	}
}
@supports not ((text-box: trim-both cap alphabetic) and (padding: 1cap)) {
	.thb-full-menu > li > a:not(.logolink) > span { position: relative; top: 0.1em; }
	.thb-full-menu .sub-menu li > a {
		padding-top: calc(12px + 0.1em) !important;
		padding-bottom: calc(12px - 0.1em) !important;
	}
}
