/**
 * Dialogs and form feedback: lead dialogs (live Bootstrap 3 .modal look),
 * lead form states, the /construction blueprint card, the shared image
 * lightbox (lightGallery and Magnific Popup looks) and the growl toasts.
 *
 * Base controls (.ba-field/.ba-input/.ba-select/.ba-textarea/.ba-label and
 * .ba-field__error) come from components.css; this file only applies the
 * per-surface sizes measured on live (chrome.md §10–11, CA2, CA7).
 *
 * @package BlueArcChild
 */

/* ==========================================================================
   1. Dialog shell
   ========================================================================== */

.ba-modal-open {
	overflow: hidden;
}

.ba-modal {
	position: fixed;
	inset: 0;
	z-index: 1050;
	overflow-x: hidden;
	overflow-y: auto;
	outline: 0;
	-webkit-overflow-scrolling: touch;
}

.ba-modal__backdrop {
	position: fixed;
	inset: 0;
	background-color: var(--ba-black);
	opacity: 0.5;
}

.ba-modal__dialog {
	position: relative;
	z-index: 1;
	width: auto;
	margin: 10px;
	pointer-events: none;
}

.ba-modal__content {
	position: relative;
	width: 100%;
	border: 1px solid var(--ba-border-legacy);
	border-radius: var(--ba-r-6);
	background-color: var(--ba-white);
	background-clip: padding-box;
	box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
	color: var(--ba-text);
	outline: 0;
	pointer-events: auto;
}

@media (min-width: 768px) {
	.ba-modal__dialog {
		width: 600px;
		margin: 30px auto;
	}

	.ba-modal__content {
		box-shadow: var(--ba-sh-modal);
	}
}

@media (min-width: 500px) {
	.ba-modal--inquiry .ba-modal__dialog {
		width: 480px;
		margin-right: auto;
		margin-left: auto;
	}
}

.ba-modal--book .ba-modal__content {
	border-color: rgba(0, 0, 0, 0.2);
	border-radius: 0;
}

/* Header */

.ba-modal__header {
	display: flow-root;
	padding: 10px 15px;
	text-align: center;
}

.ba-modal--book .ba-modal__header {
	padding: 15px;
	border-bottom: 1px solid #e5e5e5;
}

.ba-modal__icon {
	display: block;
	width: 70px;
	height: auto;
	margin: 20px auto 10px;
}

.ba-modal__title {
	margin: 0;
	color: var(--ba-text-strong);
	font-family: var(--ba-font-heading);
	font-size: 24px;
	font-weight: 400;
	line-height: 34.29px;
}

.ba-modal__intro {
	margin: 0;
	color: var(--ba-text);
	font-size: 14px;
	line-height: 24px;
}

/* Live floats × after the intro and pulls it up 143px, so it tracks the intro height. */
.ba-modal__close {
	position: relative;
	float: right;
	margin-top: -143px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ba-black);
	cursor: pointer;
	font-family: var(--ba-font-body);
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	opacity: 0.2;
	text-shadow: 0 1px 0 var(--ba-white);
}

.ba-modal__close:hover,
.ba-modal__close:focus-visible {
	opacity: 0.5;
}

.ba-modal--book .ba-modal__close {
	margin-top: -2px;
}

/* Body and footer */

.ba-modal__body {
	padding: 15px 18px 0;
}

.ba-modal--book .ba-modal__body {
	padding: 15px;
}

.ba-modal__footer {
	padding: 0 15px 11px;
}

.ba-modal--book .ba-modal__footer {
	padding: 15px 30px;
	border-top: 1px solid #e5e5e5;
}

/* Live's REQUEST INFO button keeps a 15px left and a 30px right inset on phones. */
@media (max-width: 767px) {
	.ba-modal--book .ba-modal__footer {
		padding-left: 15px;
	}
}

.ba-modal__submit {
	display: block;
	width: 100%;
	padding: 10px 11px;
	border: 2px solid var(--ba-primary);
	border-radius: var(--ba-r-8);
	background-color: var(--ba-white);
	color: var(--ba-primary);
	cursor: pointer;
	font-family: var(--ba-font-body);
	font-size: 13px;
	font-weight: 700;
	line-height: 18.57px;
	text-align: center;
	text-transform: uppercase;
}

.ba-modal__submit:hover,
.ba-modal__submit:focus-visible {
	background-color: var(--ba-primary);
	color: var(--ba-white);
}

.ba-modal--book .ba-modal__submit {
	padding: 8px 17px;
	border-radius: var(--ba-r-5);
	font-size: 14px;
	line-height: 20px;
}

/* Controls inside dialogs */

.ba-modal .ba-label {
	display: block;
	margin-bottom: 5px;
	color: var(--ba-text);
	font-size: 13px;
	font-weight: 400;
	line-height: 18.57px;
}

.ba-modal .ba-label__hint {
	color: #aab4be;
	font-size: 85%;
	font-weight: 400;
	line-height: 1;
	opacity: 1;
}

.ba-modal .ba-field__error {
	margin: 1px 0 5px;
}

.ba-modal--inquiry .ba-input,
.ba-modal--inquiry .ba-select {
	height: 44px;
	padding: 5px 12px;
}

.ba-modal .ba-textarea {
	height: auto;
	resize: vertical;
}

.ba-modal--inquiry .ba-textarea {
	padding: 5px 12px;
}

.ba-modal--book .ba-field {
	margin-bottom: 25px;
}

.ba-modal--book .ba-input,
.ba-modal--book .ba-select {
	border-radius: var(--ba-r-5);
}

.ba-modal--book .ba-label {
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 20px;
}

.ba-modal .ba-input:focus,
.ba-modal .ba-select:focus,
.ba-modal .ba-textarea:focus {
	border-color: var(--ba-primary);
}

/* Live (jQuery Validate) keeps the border and turns the invalid value red. */
.ba-modal .ba-input[aria-invalid="true"],
.ba-modal .ba-select[aria-invalid="true"],
.ba-modal .ba-textarea[aria-invalid="true"],
.ba-blueprint .ba-input[aria-invalid="true"],
.ba-blueprint .ba-textarea[aria-invalid="true"] {
	border-color: var(--ba-border-input);
	color: var(--ba-error);
}

.ba-modal .ba-input[aria-invalid="true"]:focus,
.ba-modal .ba-select[aria-invalid="true"]:focus,
.ba-modal .ba-textarea[aria-invalid="true"]:focus {
	border-color: var(--ba-primary);
}

/* ==========================================================================
   2. Lead form states (all forms)
   ========================================================================== */

.ba-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ba-form [type="submit"][disabled] {
	cursor: wait;
	opacity: 0.65;
}

.ba-form__progress {
	height: 3px;
	overflow: hidden;
	background-color: var(--ba-border-input);
}

.ba-form__progress-bar {
	display: block;
	width: 0;
	height: 100%;
	background-color: var(--ba-primary);
	transition: width 0.2s linear;
}

.ba-dropzone .ba-input--file {
	cursor: pointer;
}

.ba-dropzone.is-dragover .ba-input--file {
	border-color: var(--ba-primary);
	background-color: #effaff;
	outline: 2px dashed var(--ba-primary);
	outline-offset: -4px;
}

/* ==========================================================================
   3. Blueprint upload card (/construction)
   ========================================================================== */

.ba-blueprint {
	margin: 5px;
	padding: 30px;
	background-color: var(--ba-white);
	text-align: center;
}

.ba-blueprint__title {
	margin: 10px 0;
	color: var(--ba-text-strong);
	font-family: var(--ba-font-heading);
	font-size: 20px;
	font-weight: 500;
	line-height: 22px;
	text-transform: uppercase;
}

.ba-blueprint__intro {
	margin: 0 0 30px;
	font-size: 18px;
	line-height: 24px;
}

.ba-blueprint__grid {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 30px;
	max-width: calc((100% + 30px) * 10 / 12 - 30px);
	margin: 0 auto 30px;
	text-align: left;
}

@media (min-width: 992px) {
	.ba-blueprint__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.ba-blueprint__grid {
		max-width: none;
	}
}

.ba-blueprint .ba-field {
	margin-bottom: 15px;
}

.ba-blueprint .ba-input,
.ba-blueprint .ba-textarea {
	border-radius: var(--ba-r-5);
}

.ba-blueprint .ba-textarea {
	height: 44px;
	resize: none;
}

.ba-blueprint .ba-input--file {
	height: 44px;
	padding: 10px 12px 9px;
	line-height: 22px;
}

.ba-blueprint__submit {
	display: block;
	width: 100%;
	height: 44px;
	padding: 9px 12px;
	border: 0;
	border-radius: var(--ba-r-5);
	background-color: var(--ba-primary);
	color: var(--ba-white);
	cursor: pointer;
	font-family: var(--ba-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
}

.ba-blueprint .ba-form__progress {
	max-width: calc((100% + 30px) * 10 / 12 - 30px);
	margin: -18px auto 15px;
}

/* ==========================================================================
   4. Lightbox (default: lightGallery look; --magnific: Magnific Popup look)
   ========================================================================== */

.ba-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1050;
	overflow: hidden;
	color: #999;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	outline: 0;
	touch-action: pan-y pinch-zoom;
	user-select: none;
}

.ba-lightbox__backdrop {
	position: fixed;
	inset: 0;
	background-color: var(--ba-black);
}

.ba-lightbox__toolbar {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	display: flex;
	justify-content: space-between;
	height: 47px;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.ba-lightbox__counter {
	margin: 0;
	padding: 12px 0 0 20px;
	color: #999;
	font-size: 16px;
	line-height: 22.86px;
}

.ba-lightbox__close {
	width: 50px;
	height: 47px;
	padding: 10px 0;
	border: 0;
	background: none;
	color: #999;
	cursor: pointer;
	line-height: 0;
}

.ba-lightbox__close:hover,
.ba-lightbox__close:focus-visible,
.ba-lightbox__nav:hover,
.ba-lightbox__nav:focus-visible {
	color: var(--ba-white);
}

.ba-lightbox__nav {
	position: absolute;
	top: calc(47px + (100% - 47px) / 2 - 10px);
	z-index: 3;
	width: 42px;
	height: 39px;
	padding: 8px 10px 9px;
	border: 0;
	border-radius: 2px;
	background-color: rgba(0, 0, 0, 0.45);
	color: #999;
	cursor: pointer;
	line-height: 0;
	transition: opacity 0.25s ease, color 0.2s linear;
}

.ba-lightbox__nav--prev {
	left: 20px;
}

.ba-lightbox__nav--next {
	right: 20px;
}

.ba-lightbox__nav[hidden] {
	display: none;
}

.ba-lightbox.is-idle .ba-lightbox__toolbar {
	opacity: 0;
	transform: translateY(-100%);
}

.ba-lightbox.is-idle .ba-lightbox__nav {
	opacity: 0;
}

.ba-lightbox__stage {
	position: absolute;
	top: 47px;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.ba-lightbox__frame {
	position: relative;
	display: block;
	line-height: 0;
}

.ba-lightbox__img {
	display: block;
	width: auto;
	max-width: 100vw;
	height: auto;
	max-height: calc(100vh - 47px);
	-webkit-user-drag: none;
}

.ba-lightbox__img.is-from-next {
	animation: ba-lightbox-from-next 0.5s ease;
}

.ba-lightbox__img.is-from-prev {
	animation: ba-lightbox-from-prev 0.5s ease;
}

.ba-lightbox__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	padding: 10px 40px;
	color: #eee;
	font-size: 16px;
	line-height: 22.86px;
	text-align: center;
}

.ba-lightbox__title {
	display: block;
	margin: 0;
	background-color: rgba(0, 0, 0, 0.37);
	color: var(--ba-white);
	font-family: var(--ba-font-heading);
	font-size: 15px;
	font-weight: 700;
	line-height: 22px;
}

.ba-lightbox__link {
	display: inline-block;
	margin-top: 5px;
	color: #eee;
	font-size: 12px;
	line-height: 24px;
}

.ba-lightbox__link:hover,
.ba-lightbox__link:focus {
	color: var(--ba-white);
}

.ba-lightbox__counter--frame {
	display: none;
}

.ba-lightbox__status {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	margin: 0;
	color: #ccc;
	font-size: 14px;
	transform: translate(-50%, -50%);
}

/* Magnific Popup look (event galleries) */

.ba-lightbox--magnific .ba-lightbox__backdrop {
	background-color: #0b0b0b;
	opacity: 0.8;
}

.ba-lightbox--magnific .ba-lightbox__toolbar .ba-lightbox__counter {
	visibility: hidden;
}

.ba-lightbox--magnific .ba-lightbox__close {
	position: fixed;
	top: 10px;
	right: 2px;
	width: 44px;
	height: 44px;
	padding: 10px;
	color: var(--ba-white);
	opacity: 0.65;
}

.ba-lightbox--magnific .ba-lightbox__close:hover,
.ba-lightbox--magnific .ba-lightbox__close:focus-visible {
	opacity: 1;
}

.ba-lightbox--magnific .ba-lightbox__stage {
	top: 0;
	padding: 40px 8px;
}

.ba-lightbox--magnific .ba-lightbox__img {
	max-width: calc(100vw - 16px);
	max-height: calc(100vh - 80px);
}

.ba-lightbox--magnific .ba-lightbox__caption {
	bottom: 18px;
	left: 8px;
	padding: 0 60px 0 0;
	color: #f3f3f3;
	font-size: 12px;
	line-height: 18px;
	text-align: left;
}

.ba-lightbox--magnific .ba-lightbox__title {
	display: inline;
	background: none;
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
}

.ba-lightbox--magnific .ba-lightbox__link {
	margin: 0 0 0 10px;
	line-height: 18px;
}

.ba-lightbox--magnific .ba-lightbox__counter--frame {
	position: absolute;
	top: 100%;
	right: 0;
	display: block;
	margin-top: 4px;
	padding: 0;
	color: #ccc;
	font-size: 12px;
	line-height: 18px;
	white-space: nowrap;
}

.ba-lightbox--magnific .ba-lightbox__nav {
	top: 50%;
	width: 90px;
	height: 110px;
	margin-top: -55px;
	padding: 0;
	background: none;
	color: var(--ba-white);
	opacity: 0.65;
}

.ba-lightbox--magnific .ba-lightbox__nav:hover,
.ba-lightbox--magnific .ba-lightbox__nav:focus-visible {
	opacity: 1;
}

.ba-lightbox--magnific .ba-lightbox__nav--prev {
	left: 0;
}

.ba-lightbox--magnific .ba-lightbox__nav--next {
	right: 0;
}

.ba-lightbox--magnific .ba-lightbox__nav svg {
	display: none;
}

.ba-lightbox--magnific .ba-lightbox__nav::before,
.ba-lightbox--magnific .ba-lightbox__nav::after {
	position: absolute;
	top: 50%;
	width: 0;
	height: 0;
	margin-top: -18px;
	border-top: 18px solid transparent;
	border-bottom: 18px solid transparent;
	content: "";
}

.ba-lightbox--magnific .ba-lightbox__nav--prev::before {
	left: 35px;
	border-right: 27px solid #3f3f3f;
}

.ba-lightbox--magnific .ba-lightbox__nav--prev::after {
	left: 38px;
	margin-top: -15px;
	border-top-width: 15px;
	border-right: 20px solid var(--ba-white);
	border-bottom-width: 15px;
}

.ba-lightbox--magnific .ba-lightbox__nav--next::before {
	right: 35px;
	border-left: 27px solid #3f3f3f;
}

.ba-lightbox--magnific .ba-lightbox__nav--next::after {
	right: 38px;
	margin-top: -15px;
	border-top-width: 15px;
	border-bottom-width: 15px;
	border-left: 20px solid var(--ba-white);
}

@media (prefers-reduced-motion: reduce) {
	.ba-lightbox__img.is-from-next,
	.ba-lightbox__img.is-from-prev {
		animation: none;
	}
}

@keyframes ba-lightbox-from-next {
	from {
		opacity: 0;
		transform: translateX(40%);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ba-lightbox-from-prev {
	from {
		opacity: 0;
		transform: translateX(-40%);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   5. Toasts (live bootstrap-growl .alert: top-right, 355px, 5s)
   ========================================================================== */

.ba-toasts {
	position: fixed;
	top: 0;
	right: 20px;
	z-index: 1000010;
	width: 355px;
	max-width: calc(100vw - 35px);
	pointer-events: none;
}

@keyframes baToastFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ba-toast {
	position: relative;
	margin-top: 20px;
	padding: 15px 35px 15px 15px;
	border: 1px solid #d6e9c6;
	border-radius: 0;
	background-color: #dff0d8;
	color: #3c763d;
	font-family: var(--ba-font-body);
	font-size: 14px;
	line-height: 20px;
	opacity: 1;
	animation: baToastFadeIn 0.4s;
	pointer-events: auto;
	transition: opacity 0.4s linear;
}

.ba-toast + .ba-toast {
	margin-top: 10px;
}

.ba-toast--danger {
	border-color: #ebccd1;
	background-color: #f2dede;
	color: #a94442;
}

.ba-toast.is-leaving {
	opacity: 0;
}

.ba-toast__close {
	position: absolute;
	top: 16px;
	right: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	opacity: 0.2;
	text-shadow: 0 1px 0 var(--ba-white);
}

.ba-toast__close:hover,
.ba-toast__close:focus-visible {
	opacity: 0.5;
}
