/**
 * AFE PDF Embed
 *
 * --afe-pdf-height is set inline per shortcode. The colours are custom properties so the
 * child theme can restyle without this file being edited.
 *
 * Breakpoint is 767px to line up with Divi's phone breakpoint: below it the frame is
 * dropped entirely, because mobile browsers either refuse to render a framed PDF or show
 * one unscrollable page. Those visitors get the note plus the button instead.
 */

.afe-pdf-embed {
	--afe-pdf-accent: #06387D;
	--afe-pdf-accent-hover: #CD212A;
	--afe-pdf-border: #ddd;
	margin-bottom: 30px;
}

.afe-pdf-embed__frame {
	display: block;
	width: 100%;
	height: var(--afe-pdf-height, 800px);
	border: 1px solid var(--afe-pdf-border);
	background: #f7f7f7;
}

/* Shown only when the frame is hidden, so mobile visitors know what the button opens. */
.afe-pdf-embed__note {
	display: none;
	margin: 0 0 15px;
	padding: 20px;
	border: 1px solid var(--afe-pdf-border);
	background: #f7f7f7;
	font-weight: 600;
}

.afe-pdf-embed__actions {
	margin: 15px 0 0;
}

.afe-pdf-embed__button {
	display: inline-block;
	padding: 10px 25px;
	border: 2px solid var(--afe-pdf-accent);
	border-radius: 8px;
	background: var(--afe-pdf-accent);
	color: #fff !important;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	transition: all .5s ease;
}

.afe-pdf-embed__button:hover,
.afe-pdf-embed__button:focus {
	border-color: var(--afe-pdf-accent-hover);
	background: var(--afe-pdf-accent-hover);
	color: #fff !important;
}

.afe-pdf-embed__error {
	padding: 15px;
	border-left: 4px solid #CD212A;
	background: #fff4f4;
}

@media only screen and (max-width: 767px) {
	.afe-pdf-embed__frame {
		display: none;
	}

	.afe-pdf-embed__note {
		display: block;
	}

	.afe-pdf-embed__actions {
		margin-top: 0;
	}
}
