/**
 * Islamica Print Issue — gate modal.
 * Scoped under .ipi-* so Salient's styles are left alone.
 */

.ipi-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 12, 16, 0.72);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ipi-overlay[hidden] {
	display: none;
}

.ipi-modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	margin: auto;
	padding: 34px 30px 30px;
	border-radius: var(--ipi-radius);
	background: #fff;
	color: #1e2430;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
	font-size: 15px;
	line-height: 1.5;
}

.ipi-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: var(--ipi-radius);
	background: transparent;
	color: #7b8496;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.ipi-close:hover,
.ipi-close:focus-visible {
	background: #f0f2f5;
	color: #1e2430;
}

/*
 * Spacing is deliberately scoped through .ipi-overlay .ipi-modal rather than
 * the bare class. Themes (Salient among them) style bare `p`, `label`, `input`
 * and `select`, and their stylesheet loads after this one — so an equally
 * specific rule here would lose the tie and the form would space itself out
 * according to the theme. The extra selectors win outright.
 *
 * To fine-tune without editing the plugin, override these two values in
 * Appearance > Customize > Additional CSS:
 *
 *   .ipi-modal { --ipi-field-gap: 16px; --ipi-label-gap: 6px; }
 */
.ipi-modal {
	--ipi-field-gap: 12px;
	--ipi-label-gap: 4px;
	--ipi-radius: 0;
}

.ipi-overlay .ipi-modal .ipi-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 21px;
	line-height: 1.25;
	color: #1e2430;
}

.ipi-overlay .ipi-modal .ipi-intro {
	margin: 0 0 16px;
	padding: 0;
	color: #5c6474;
	font-size: 14px;
	line-height: 1.4;
}

.ipi-overlay .ipi-modal .ipi-field {
	margin: 0 0 var(--ipi-field-gap);
	padding: 0;
}

.ipi-overlay .ipi-modal .ipi-field label {
	display: block;
	margin: 0 0 var(--ipi-label-gap);
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: #333b49;
}

.ipi-overlay .ipi-modal .ipi-field input,
.ipi-overlay .ipi-modal .ipi-field select {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #ccd2dd;
	border-radius: var(--ipi-radius);
	background: #fff;
	color: #1e2430;
	font-size: 15px;
	font-family: inherit;
	line-height: normal;
	vertical-align: middle;
}

.ipi-overlay .ipi-modal .ipi-field input:focus,
.ipi-overlay .ipi-modal .ipi-field select:focus {
	border-color: #2f6fd0;
	outline: 2px solid rgba(47, 111, 208, 0.22);
	outline-offset: 0;
}

.ipi-overlay .ipi-modal .ipi-field.ipi-invalid input,
.ipi-overlay .ipi-modal .ipi-field.ipi-invalid select {
	border-color: #c8332c;
}

.ipi-overlay .ipi-modal .ipi-form {
	margin: 0;
	padding: 0;
}

.ipi-error {
	display: none;
	margin-top: 4px;
	color: #c8332c;
	font-size: 12.5px;
	line-height: 1.3;
}

.ipi-error.ipi-visible {
	display: block;
}

.ipi-overlay .ipi-modal .ipi-captcha {
	margin: 0 0 var(--ipi-field-gap);
	padding: 0;
	/* reCAPTCHA's own iframe is 78px tall; reserve it so the button does not
	   jump when Google's script finishes loading. */
	min-height: 78px;
}

/*
 * Google injects its own wrapper divs here. Square off everything that lands
 * in our DOM; the widget's inner chrome lives inside a cross-origin iframe and
 * cannot be restyled from this side.
 */
.ipi-overlay .ipi-modal .ipi-captcha,
.ipi-overlay .ipi-modal .ipi-captcha div,
.ipi-overlay .ipi-modal .ipi-captcha iframe {
	border-radius: var(--ipi-radius);
}

.ipi-alert {
	margin: 0 0 16px;
	padding: 11px 13px;
	border-radius: var(--ipi-radius);
	background: #fdecea;
	border: 1px solid #f2c2be;
	color: #9c2b25;
	font-size: 13.5px;
}

.ipi-alert[hidden] {
	display: none;
}

.ipi-overlay .ipi-modal .ipi-submit {
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	border: 0;
	border-radius: var(--ipi-radius);
	background: #1e2430;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ipi-submit:hover:not(:disabled) {
	opacity: 0.88;
}

.ipi-submit:disabled {
	opacity: 0.55;
	cursor: default;
}

.ipi-overlay .ipi-modal .ipi-remember-note {
	margin: 10px 0 0;
	padding: 0;
	color: #7b8496;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.ipi-success[hidden] {
	display: none;
}

.ipi-success {
	text-align: center;
	padding: 6px 0 2px;
}

.ipi-success-note {
	margin: 0 0 14px;
	color: #5c6474;
	font-size: 14px;
}

.ipi-proceed {
	display: inline-block;
	font-size: 17px;
	font-weight: 600;
	color: #2f6fd0;
	text-decoration: underline;
}

.ipi-proceed:hover,
.ipi-proceed:focus-visible {
	color: #1e2430;
}

@media (max-width: 480px) {
	.ipi-modal {
		padding: 30px 20px 24px;
	}
}
