/*
 * Masahef Donor Dashboard AR: brand colors and font.
 * Loaded only inside the GiveWP donor dashboard iframe, in every language.
 * Color values come from CSS variables printed by PHP (--masahef-primary, ...).
 */

/* IBM Plex Sans Arabic (SIL Open Font License 1.1), bundled locally. */
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Font ---------- */

#give-donor-dashboard,
#give-donor-dashboard *,
.givewp-modal-wrapper,
.givewp-modal-wrapper * {
	font-family: var(--masahef-font, sans-serif) !important;
}

/* ---------- Login screen ---------- */

/*
 * GiveWP centers the login card absolutely over the blurred dashboard (min-height 800px on
 * mobile). A taller card overflowed at the top and bottom and was cut off. Stacking both in
 * one grid cell lets the container grow with the taller of the two, so the iframe resizes.
 */
.give-donor-dashboard__auth {
	display: grid;
}

.give-donor-dashboard__auth > .give-donor-dashboard__auth-modal,
.give-donor-dashboard__auth > .give-donor-dashboard__auth-wrapper {
	grid-area: 1 / 1;
	min-width: 0;
}

.give-donor-dashboard__auth > .give-donor-dashboard__auth-modal {
	position: relative;
	height: auto;
	padding: 24px 0;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame {
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(15, 40, 50, 0.14);
}

.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-heading {
	background: var(--masahef-primary);
	color: #fff;
	padding: 28px 32px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.4;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-content {
	padding: 28px 32px;
	color: #1f2933;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-instruction {
	color: #4a5560;
	line-height: 1.8;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-content .give-donor-dashboard__auth-modal-row {
	flex-wrap: wrap;
	gap: 0 16px;
}

/* Error / status messages next to the buttons (GiveWP shows them at 10px). */
.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-content .give-donor-dashboard__auth-modal-error {
	flex: 1 1 100%;
	max-width: 100%;
	margin: -8px 0 12px;
	font-size: 14px;
	line-height: 1.6;
	color: #b42318;
}

/* ---------- Inputs ---------- */

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input {
	min-height: 46px;
	border: 1px solid #d5dbe1;
	border-radius: 8px;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input:focus-within {
	border-color: var(--masahef-primary);
	box-shadow: 0 0 0 1px var(--masahef-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--masahef-primary) 20%, transparent);
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input svg {
	color: #8a949e;
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input:focus-within svg {
	color: var(--masahef-primary);
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input input {
	min-height: 44px;
	background: transparent;
	color: #1f2933;
	font-size: 15px;
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input input::placeholder {
	color: #8a949e;
	opacity: 1;
}

/* ---------- Buttons ---------- */

.give-donor-dashboard-button {
	border-color: var(--masahef-primary);
	border-radius: 8px;
	min-height: 44px;
	white-space: nowrap;
}

.give-donor-dashboard-button:focus {
	box-shadow: none;
}

.give-donor-dashboard-button:focus-visible {
	outline: 2px solid var(--masahef-primary-dark);
	outline-offset: 2px;
}

.give-donor-dashboard-button.give-donor-dashboard-button--primary::before {
	background: var(--masahef-primary);
}

.give-donor-dashboard-button.give-donor-dashboard-button--primary:hover,
.give-donor-dashboard-button.give-donor-dashboard-button--primary:active {
	border-color: var(--masahef-primary-dark);
}

.give-donor-dashboard-button.give-donor-dashboard-button--primary:hover::before,
.give-donor-dashboard-button.give-donor-dashboard-button--primary:active::before {
	background: var(--masahef-primary-dark);
	filter: none;
}

.give-donor-dashboard-button.give-donor-dashboard-button--variant {
	color: var(--masahef-primary) !important;
	border-color: var(--masahef-primary);
}

.give-donor-dashboard-button.give-donor-dashboard-button--variant:hover {
	color: var(--masahef-primary-dark) !important;
	border-color: var(--masahef-primary-dark);
	filter: none;
}

/* "Forgot Password?" is rendered by GiveWP as a primary button; show it as a text link. */
.give-donor-dashboard__auth-modal .give-donor-dashboard-button[type="button"] {
	margin: 0;
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--masahef-primary) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	box-shadow: none;
	overflow: visible;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard-button[type="button"]::before {
	display: none;
}

.give-donor-dashboard__auth-modal .give-donor-dashboard-button[type="button"]:hover,
.give-donor-dashboard__auth-modal .give-donor-dashboard-button[type="button"]:active {
	color: var(--masahef-primary-dark) !important;
}
