/*
Theme Name: Diwan Theme
Theme URI: https://diwanegypt.com/
Author: Clue Digital
Description: Block theme for Diwan Bookstore, built on theme.json and Gutenberg templates powered by Diwan Core and Diwan Blocks.
Version: 3.9.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: diwan-theme
*/

.diwan-job-detail > * {
	box-sizing: content-box;
	max-inline-size: 820px;
	margin-inline: auto;
	padding-inline: 18px;
}

.diwan-job-detail .diwan-job-page__head {
	padding-block: 36px 8px;
}

.diwan-job-detail .diwan-job-page__title {
	margin: 14px 0 6px;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--diwan-blue, #246b8f);
}

.diwan-job-detail .diwan-job-page__about {
	padding-block: 12px 8px;
}

.diwan-job-detail .diwan-job-page__apply {
	padding-block: 8px 64px;
}

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

html,
body {
	margin: 0;
	padding: 0;
	background: var(--diwan-surface, #ffffff);
	color: var(--diwan-text, #000000);
	font-family: var(--diwan-font-body, "Loew", "Rubik", system-ui, -apple-system, sans-serif);
	font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
}

/* Keep the block theme's outer wrapper a full-height flex column so the footer
   always sits at the bottom of short pages (matching chrome-site.css). */
.wp-site-blocks {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	padding: 0 !important;
}

.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part,
.wp-site-blocks > main {
	margin-block: 0;
}

.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: auto;
}

img {
	height: auto;
	max-width: 100%;
}

/* Standard page wrapper (WooCommerce Cart/Checkout/Account, legal pages, Sitemap) */
.diwan-page-main {
	inline-size: 100%;
	max-inline-size: 1140px;
	margin-inline: auto;
	padding-block: 0 60px;
	color: #333;
}

.diwan-page-main .wp-block-post-title {
	color: var(--diwan-heading, #246b8f);
	font-family: var(--diwan-font-display, "TAY", "Tajawal", system-ui, sans-serif);
	font-size: 40px;
	font-weight: 500;
	line-height: 1.2;
	margin: 8px 0 16px;
}

.diwan-page-main :where(.diwan-legal, .entry-content) > :is(h2, h3, h4) {
	font-weight: 500;
	line-height: 1.2;
	margin-block: 8px 16px;
	color: inherit;
}

.diwan-page-main :where(.diwan-legal, .entry-content) > h2 { font-size: 32px; }
.diwan-page-main :where(.diwan-legal, .entry-content) > h3 { font-size: 28px; }
.diwan-page-main :where(.diwan-legal, .entry-content) > h4 { font-size: 24px; }

.diwan-page-main :where(.diwan-legal, .entry-content) > p {
	margin-block: 0 .9rem;
}

.diwan-page-main :where(.diwan-legal, .entry-content) > :is(ul, ol) {
	margin-block: 0;
}

.diwan-page-main .page-content img.aligncenter {
	display: block;
	margin-inline: auto;
}

.diwan-page-main .page-content .wp-block-quote {
	margin: 1em 40px;
	padding: 0;
	border: 0;
}

.diwan-page-main .page-content .wp-block-quote p {
	margin: 0;
}

.diwan-page-main .diwan-legal__table {
	margin: 0 0 1em;
	overflow-x: auto;
}

.diwan-page-main .diwan-legal__table table {
	inline-size: 100%;
	margin-block-end: 15px;
	border-collapse: collapse;
	font-size: .9em;
}

.diwan-page-main .diwan-legal__table .has-fixed-layout {
	table-layout: fixed;
}

.diwan-legal__table :is(td, th) {
	overflow-wrap: break-word;
	vertical-align: top;
	border: 1px solid currentColor;
	padding: .5em;
}

.diwan-legal__table thead {
	border-block-end: 3px solid currentColor;
}

.diwan-legal__table thead tr:first-child th {
	border-block-start-color: rgb(128 128 128 / 50%);
}

.diwan-legal__table tbody > tr:nth-child(odd) > :is(td, th) {
	background: rgb(128 128 128 / 7%);
}

body.diwan-sitemap-page .page-header .entry-title {
	max-inline-size: 1140px;
}

@media (max-width: 1199px) {
	main.diwan-page-main {
		max-inline-size: 100%;
		padding-inline: 20px;
	}
}

@media (max-width: 575px) {
	.diwan-page-main .entry-title,
	.diwan-transaction-main .entry-title {
		padding-inline: 10px;
	}
}

/* WooCommerce pages add `.woocommerce-page img { max-width: 100% }`, which
   outranks Diwan Core's logo caps and blew the header logos up to full size on
   the cart, checkout and account pages. Same caps, one step more specific. */
.diwan-header img.diwan-logo--large {
	max-inline-size: 160px;
}

.diwan-header img.diwan-logo--small {
	max-inline-size: 92px;
}

.diwan-404-page {
	padding: 56px 18px 80px;
	text-align: center;
}

.diwan-404-page h1 {
	max-inline-size: 760px;
	margin: 20px auto;
	color: var(--diwan-blue);
	font-size: 46px;
	line-height: 1;
	letter-spacing: 4px;
}

.diwan-404-page p {
	margin: 0 0 20px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.7;
	color: var(--diwan-subheading);
}

.diwan-404-page .diwan-button {
	display: inline-block;
	padding: 14px 30px;
	border: 0;
	border-radius: 0;
	background-color: #000;
	color: #fff;
	font-family: var(--diwan-font-button, "Loew", "Tajawal", sans-serif);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1;
}

@media (max-width: 767px) {
	.diwan-404-page {
		padding-block: 34px 52px;
	}
}

.wp-block-template-part > .diwan-footer {
	margin-block-start: 0;
}

@media (min-width: 768px) {
	.wp-block-template-part > .diwan-footer {
		padding-block: 40px 24px;
	}
}

/* These three pages share the measure and typography of the original store forms. */
.diwan-transaction-main,
.woocommerce-account main.diwan-page-main {
	inline-size: 100%;
	margin-inline: auto;
	padding-block: 0 60px;
	color: #333;
}

.woocommerce-account main.diwan-page-main .entry-content > .woocommerce {
	margin-block-start: 0;
}

:is(.diwan-transaction-main, .woocommerce-account .diwan-page-main) .entry-title {
	max-inline-size: none;
	margin: 8px 0 16px;
	font: 500 40px/1.2 var(--diwan-font-display, "TAY", "Tajawal", sans-serif);
	color: var(--diwan-heading, #246b8f);
	text-transform: none;
}

.woocommerce-account .diwan-page-main #customer_login h2,
.woocommerce-account .diwan-page-main .woocommerce > h2 {
	margin: 8px 0 16px;
	font-size: 32px;
	font-weight: 500;
	line-height: 1.2;
	color: inherit;
}

:is(.diwan-transaction-main, .woocommerce-account .diwan-page-main) .woocommerce p:where(:not(.form-row)) {
	margin-block: 0 .9rem;
}

.woocommerce-account .diwan-page-main .woocommerce p.woocommerce-LostPassword {
	margin-block-start: 14px;
}

:is(.diwan-transaction-main, .woocommerce-account .diwan-page-main) .woocommerce .button {
	display: inline-block;
	line-height: 1;
}

.woocommerce-account .diwan-page-main .woocommerce-form-login__rememberme input {
	margin: 0;
}

.diwan-transaction-main .woocommerce table.shop_table {
	font-size: .9em;
	line-height: 1.5;
	border-collapse: collapse;
}

.diwan-transaction-main .woocommerce .quantity input.qty {
	font: 400 16px/1.5 var(--diwan-font-body);
	border-radius: 3px;
}

.diwan-transaction-main :is(.cart_totals h2, .diwan-checkout__title, #order_review_heading) {
	font-weight: 500;
	line-height: 1.2;
}

.diwan-transaction-main .cart_totals h2 {
	margin-block: 8px 16px;
}

.diwan-transaction-main .woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: block;
}

.diwan-transaction-main .woocommerce button.diwan-checkout__next-button {
	border: 0;
	font-family: var(--diwan-font-body);
}

@media (max-width: 1199px) {
	body.diwan-sitemap-page main.diwan-page-main {
		padding-inline: 20px;
	}
}
