/*
 * PFD Announcement Popup.
 *
 * Styled after premierfilmdistribution.com.au: Open Sans, the site red, 3px
 * corners, and the home page's white buttons with a red notch in the corner.
 * Selectors carry the #pfd-popup id so Divi's own h2/p/ul/button rules lose.
 */

#pfd-popup {
	--pfd-accent: #e02b20;
	--pfd-heading: #333;
	--pfd-text: #666;
	--pfd-width: 880px;
	--pfd-overlay: 0.75;
	--pfd-font: "Open Sans", Arial, Helvetica, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--pfd-font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--pfd-text);
	-webkit-font-smoothing: antialiased;
}

#pfd-popup[hidden] {
	display: none;
}

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

/* ---- Overlay & dialog ---------------------------------------------------- */

#pfd-popup .pfd-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, var(--pfd-overlay));
	opacity: 0;
	transition: opacity 0.3s ease;
}

#pfd-popup .pfd-popup__dialog {
	position: relative;
	display: flex;
	width: 100%;
	max-width: var(--pfd-width);
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow: hidden;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	opacity: 0;
	outline: none;
	transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#pfd-popup.pfd-popup--anim-slide .pfd-popup__dialog {
	transform: translateY(28px);
}

#pfd-popup.is-open .pfd-popup__overlay,
#pfd-popup.is-open .pfd-popup__dialog {
	opacity: 1;
	transform: none;
}

#pfd-popup.pfd-popup--anim-none .pfd-popup__overlay,
#pfd-popup.pfd-popup--anim-none .pfd-popup__dialog {
	transition: none;
}

html.pfd-popup-locked,
html.pfd-popup-locked body {
	overflow: hidden !important;
}

/* ---- Close ------------------------------------------------------------------ */

#pfd-popup .pfd-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	color: var(--pfd-heading);
	background: #fff;
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

#pfd-popup .pfd-popup__close:hover {
	color: #fff;
	background: var(--pfd-accent);
}

/* ---- Red panel ------------------------------------------------------------- */

#pfd-popup .pfd-popup__panel {
	position: relative;
	display: flex;
	flex: 0 0 40%;
	flex-direction: column;
	justify-content: center;
	padding: 56px 44px;
	color: #fff;
	background: var(--pfd-accent);
	overflow: hidden;
}

/* The film-edge sweep behind the PFD wordmark, as three faint diagonal bands. */
#pfd-popup .pfd-popup__panel::after {
	content: "";
	position: absolute;
	right: -30%;
	bottom: -40%;
	width: 90%;
	height: 90%;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 14px, transparent 14px 34px);
	transform: rotate(-8deg);
	pointer-events: none;
}

#pfd-popup .pfd-popup__eyebrow {
	position: relative;
	margin: 0 0 18px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

/* Same left rule as the home page's #IAMPFD heading. */
#pfd-popup .pfd-popup__title {
	position: relative;
	margin: 0;
	padding: 0 0 0 18px;
	font-family: var(--pfd-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #fff;
	border-left: 6px solid #fff;
}

#pfd-popup .pfd-popup__highlight {
	position: relative;
	margin: 24px 0 0;
	padding: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
}

/* ---- White body ---------------------------------------------------------- */

#pfd-popup .pfd-popup__body {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	padding: 48px 44px 40px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* The corner notch from the site's buttons, at the scale of the whole card. */
#pfd-popup .pfd-popup__body::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 34px;
	height: 34px;
	background: linear-gradient(315deg, var(--pfd-accent) 50%, transparent 50%);
	pointer-events: none;
}

#pfd-popup .pfd-popup__logo {
	margin: 0 0 22px;
}

#pfd-popup .pfd-popup__logo img {
	display: block;
	width: auto;
	max-width: 180px;
	height: auto;
	max-height: 56px;
}

#pfd-popup .pfd-popup__message {
	margin: 0 0 26px;
	font-size: 15px;
	color: var(--pfd-text);
}

#pfd-popup .pfd-popup__message p {
	margin: 0 0 0.8em;
	padding: 0;
}

#pfd-popup .pfd-popup__message p:last-child {
	margin-bottom: 0;
}

#pfd-popup .pfd-popup__message a,
#pfd-popup .pfd-popup__email {
	color: var(--pfd-accent);
}

#pfd-popup .pfd-popup__contacts-title {
	margin: 0 0 10px;
	padding: 0;
	font-family: var(--pfd-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pfd-heading);
}

#pfd-popup .pfd-popup__contacts {
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e6e6e6;
}

#pfd-popup .pfd-popup__contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 16px;
	margin: 0;
	padding: 12px 0;
	list-style: none;
	border-bottom: 1px solid #e6e6e6;
}

#pfd-popup .pfd-popup__person {
	display: flex;
	flex-direction: column;
}

#pfd-popup .pfd-popup__name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--pfd-heading);
}

#pfd-popup .pfd-popup__role {
	font-size: 13px;
	line-height: 1.35;
}

#pfd-popup .pfd-popup__reach {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

#pfd-popup .pfd-popup__phone {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--pfd-accent);
	text-decoration: none;
}

#pfd-popup .pfd-popup__phone:hover,
#pfd-popup .pfd-popup__email:hover {
	text-decoration: underline;
}

#pfd-popup .pfd-popup__email {
	font-size: 13px;
	text-decoration: none;
	word-break: break-all;
}

/* ---- Actions ----------------------------------------------------------------- */

#pfd-popup .pfd-popup__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
}

/* The home page's "Find a Product" button, with a border so it holds on white. */
#pfd-popup .pfd-popup__button,
.pfd-popup-trigger {
	display: inline-block;
	padding: 9px 26px 9px 20px;
	font-family: "Open Sans", Arial, Helvetica, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--pfd-accent, #e02b20);
	text-decoration: none;
	background-color: #fff;
	/* A fixed-size notch, so a full-width button on a phone keeps a small corner. */
	background-image: linear-gradient(315deg, var(--pfd-accent, #e02b20) 50%, transparent 50%);
	background-position: right bottom;
	background-repeat: no-repeat;
	background-size: 20px 20px;
	border: 2px solid var(--pfd-accent, #e02b20);
	border-radius: 3px;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

#pfd-popup .pfd-popup__button:hover,
#pfd-popup .pfd-popup__button:focus-visible,
.pfd-popup-trigger:hover,
.pfd-popup-trigger:focus-visible {
	color: #fff;
	background-image: none;
	background-color: var(--pfd-accent, #e02b20);
}

#pfd-popup .pfd-popup__continue,
#pfd-popup .pfd-popup__dismiss {
	margin: 0;
	padding: 0;
	font-family: var(--pfd-font);
	line-height: 1.4;
	background: none;
	border: 0;
	cursor: pointer;
}

#pfd-popup .pfd-popup__continue {
	font-size: 15px;
	font-weight: 600;
	color: var(--pfd-heading);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

#pfd-popup .pfd-popup__continue:hover {
	color: var(--pfd-accent);
}

#pfd-popup .pfd-popup__dismiss {
	display: block;
	margin-top: 22px;
	font-size: 12px;
	color: #999;
}

#pfd-popup .pfd-popup__dismiss:hover {
	color: var(--pfd-heading);
	text-decoration: underline;
}

#pfd-popup :focus-visible {
	outline: 2px solid var(--pfd-accent);
	outline-offset: 3px;
}

#pfd-popup .pfd-popup__panel :focus-visible {
	outline-color: #fff;
}

/* The shortcode's link style. */
.pfd-popup-trigger-link {
	color: #e02b20;
	cursor: pointer;
}

/* ---- Stacked layout --------------------------------------------------------- */

#pfd-popup.pfd-popup--stacked .pfd-popup__dialog {
	flex-direction: column;
	max-width: min(var(--pfd-width), 640px);
}

#pfd-popup.pfd-popup--stacked .pfd-popup__panel {
	flex: 0 0 auto;
	padding: 40px 72px 34px 44px;
}

#pfd-popup.pfd-popup--stacked .pfd-popup__close {
	color: #fff;
	background: transparent;
}

#pfd-popup.pfd-popup--stacked .pfd-popup__close:hover {
	color: var(--pfd-accent);
	background: #fff;
}

#pfd-popup.pfd-popup--stacked .pfd-popup__body {
	padding-top: 32px;
}

/* A popup with no heading has no panel; the close button sits on white either way. */
#pfd-popup .pfd-popup__dialog:not(:has(.pfd-popup__panel)) .pfd-popup__close {
	color: var(--pfd-heading);
	background: #fff;
}

/* ---- Small screens ------------------------------------------------------- */

@media (max-width: 767px) {
	#pfd-popup {
		align-items: flex-end;
		padding: 0;
	}

	#pfd-popup .pfd-popup__dialog,
	#pfd-popup.pfd-popup--stacked .pfd-popup__dialog {
		flex-direction: column;
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		overflow-y: auto;
		border-radius: 3px 3px 0 0;
	}

	#pfd-popup .pfd-popup__dialog {
		transform: translateY(40px);
	}

	#pfd-popup .pfd-popup__panel,
	#pfd-popup.pfd-popup--stacked .pfd-popup__panel {
		flex: 0 0 auto;
		padding: 30px 64px 26px 24px;
	}

	#pfd-popup .pfd-popup__close {
		top: 8px;
		right: 8px;
		color: #fff;
		background: transparent;
	}

	#pfd-popup .pfd-popup__close:hover {
		color: var(--pfd-accent);
		background: #fff;
	}

	#pfd-popup .pfd-popup__title {
		padding-left: 14px;
		font-size: 22px;
		border-left-width: 5px;
	}

	#pfd-popup .pfd-popup__highlight {
		margin-top: 14px;
		font-size: 15px;
	}

	#pfd-popup .pfd-popup__eyebrow {
		margin-bottom: 12px;
	}

	#pfd-popup .pfd-popup__body,
	#pfd-popup.pfd-popup--stacked .pfd-popup__body {
		flex: 0 0 auto;
		padding: 24px 24px 28px;
		overflow: visible;
	}

	#pfd-popup .pfd-popup__actions {
		flex-direction: column;
		align-items: stretch;
	}

	#pfd-popup .pfd-popup__button {
		text-align: center;
	}

	#pfd-popup .pfd-popup__dismiss {
		margin-left: auto;
		margin-right: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	#pfd-popup .pfd-popup__overlay,
	#pfd-popup .pfd-popup__dialog {
		transform: none !important;
		transition: opacity 0.15s linear;
	}
}
