/*
 * Mehrpath brand on Bootstrap 5.3.
 * Loaded right after the vendored Bootstrap CSS (LTR or RTL) and before the parent theme,
 * theme.json global styles and style.css, which keep the final say on brand styling.
 * 1) Maps the palette and fonts onto Bootstrap's CSS variables.
 * 2) Undoes the few Reboot rules that change existing markup (forms, legends, buttons).
 */

:root,
[data-bs-theme="light"] {
	--bs-body-font-family: var(--wp--preset--font-family--inter), system-ui, sans-serif;
	--bs-body-font-size: 1rem;
	--bs-body-line-height: 1.6;
	--bs-body-color: #17231F;
	--bs-body-color-rgb: 23, 35, 31;
	--bs-body-bg: #FAF7F0;
	--bs-body-bg-rgb: 250, 247, 240;
	--bs-emphasis-color: #102D26;
	--bs-secondary-color: #5D6963;
	--bs-heading-color: inherit;
	--bs-border-color: #D5DEDA;
	--bs-border-radius: 14px;
	--bs-border-radius-lg: 22px;
	--bs-border-radius-pill: 999px;

	/* Action colour: blue (owner's rule), WCAG AA with white text and on ivory. */
	--mp-action: #1F4E79;
	--mp-action-hover: #173B5C;
	--mp-action-rgb: 31, 78, 121;
	--bs-primary: #1F4E79;
	--bs-primary-rgb: 31, 78, 121;
	--bs-link-color: #1F4E79;
	--bs-link-color-rgb: 31, 78, 121;
	--bs-link-hover-color: #173B5C;
	--bs-link-hover-color-rgb: 23, 59, 92;
	--bs-focus-ring-color: rgba(31, 78, 121, .35);

	/* Brand green stays the identity colour. */
	--bs-success: #28594B;
	--bs-success-rgb: 40, 89, 75;
	--bs-dark: #102D26;
	--bs-dark-rgb: 16, 45, 38;
	--bs-light: #F3E9D7;
	--bs-light-rgb: 243, 233, 215;
}

body.lang-fa {
	--bs-body-font-family: var(--wp--preset--font-family--vazirmatn), Tahoma, sans-serif;
	--bs-body-line-height: 1.8;
}

/* Reboot sets these; the members UI (forms on /login/, /manage/, the shop) was built on browser defaults. */
legend {
	float: none;
	width: auto;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}
legend + * { clear: none; }
label { display: revert; }
button { border-radius: revert; }


/* Bootstrap buttons in the brand. */
.btn {
	--bs-btn-font-family: var(--wp--preset--font-family--inter);
	--bs-btn-font-weight: 600;
	--bs-btn-border-radius: 999px;
	--bs-btn-padding-x: 1.25rem;
	--bs-btn-padding-y: .625rem;
	--bs-btn-focus-box-shadow: 0 0 0 .25rem rgba(31, 78, 121, .35);
}
body.lang-fa .btn { --bs-btn-font-family: var(--wp--preset--font-family--vazirmatn); }

.btn-primary,
.mp-btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: #1F4E79;
	--bs-btn-border-color: #1F4E79;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #173B5C;
	--bs-btn-hover-border-color: #173B5C;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #12304B;
	--bs-btn-active-border-color: #12304B;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
	border-color: #1F4E79;
	box-shadow: 0 0 0 .25rem rgba(31, 78, 121, .25);
}
.form-check-input:checked {
	background-color: #1F4E79;
	border-color: #1F4E79;
}
