/*
 * Masahef Donor Dashboard AR: Arabic / RTL layer.
 * Loaded inside the donor dashboard iframe only when the page language is Arabic.
 * The extra login texts come from CSS variables printed by PHP:
 * --masahef-login-subtitle, --masahef-email-heading, --masahef-email-notice.
 */

#give-donor-dashboard,
.givewp-modal-wrapper {
	direction: rtl;
	text-align: right;
}

/* Icon inside inputs: on the right, with space before the text. */
.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input svg {
	margin: 0;
	margin-inline-start: 14px;
	flex-shrink: 0;
}

.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input input {
	margin: 0 12px;
	text-align: right;
}

/* Typed email addresses and passwords read left-to-right, still aligned to the right. */
.give-donor-dashboard-text-control input[data-masahef-ltr]:not(:placeholder-shown) {
	direction: ltr;
	text-align: right;
}

/* Direction arrows point the other way in RTL. */
#give-donor-dashboard svg[data-icon="chevron-right"],
#give-donor-dashboard svg[data-icon="chevron-left"],
#give-donor-dashboard svg[data-icon="arrow-right"],
#give-donor-dashboard svg[data-icon="arrow-left"] {
	transform: scaleX(-1);
}

.give-donor-dashboard-button svg {
	margin-left: 0;
	margin-right: 0;
	margin-inline-start: 8px;
}

/* ---------- Extra login texts ---------- */

/* Subtitle under the title. */
.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-heading::after {
	content: var(--masahef-login-subtitle, none);
	display: block;
	margin-top: 8px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	opacity: 0.95;
}

/*
 * Heading above the email section. When GiveWP's "Email Access" is enabled, the email
 * instruction is always the first block of the content (or comes right after the notice
 * shown to logged-in users without donations). PHP sets the variable only in that case.
 */
.give-donor-dashboard__auth-modal-content > .give-donor-dashboard__auth-modal-instruction:first-child::before,
.give-donor-dashboard__auth-modal-content > .give-donor-dashboard__auth-modal-notice + .give-donor-dashboard__auth-modal-instruction::before {
	content: var(--masahef-email-heading, none);
	display: block;
	margin-bottom: 6px;
	color: #1f2933;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
}

/* Notice under the "send login link" button (the email form uses display: contents). */
.give-donor-dashboard__auth-modal-content > .give-donor-dashboard__auth-modal-instruction:first-child + .give-donor-dashboard__auth-modal-form::after,
.give-donor-dashboard__auth-modal-content > .give-donor-dashboard__auth-modal-notice + .give-donor-dashboard__auth-modal-instruction + .give-donor-dashboard__auth-modal-form::after {
	content: var(--masahef-email-notice, none);
	display: block;
	padding: 12px 16px;
	border-radius: 8px;
	border-inline-start: 4px solid var(--masahef-primary);
	background: var(--masahef-soft);
	color: #0b4f58;
	font-size: 14px;
	line-height: 1.7;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
	.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame {
		width: calc(100% - 24px);
	}

	.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-heading {
		padding: 22px 20px;
		font-size: 20px;
	}

	.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-content {
		padding: 22px 20px;
	}

	.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input input {
		margin: 0 10px;
		font-size: 14px;
	}

	.give-donor-dashboard-text-control .give-donor-dashboard-text-control__input svg {
		margin-inline-start: 12px;
	}

	.give-donor-dashboard__auth-modal .give-donor-dashboard__auth-modal-frame .give-donor-dashboard__auth-modal-content .give-donor-dashboard__auth-modal-seperator {
		margin-inline: -20px;
	}
}
