/**
 * PAC Applications — front-end styles.
 *
 * Everything is scoped to .pac-form / .pac-modal so the theme is untouched.
 */

.pac-form,
.pac-modal {
	--pac-ink: #16233a;
	--pac-ink-soft: #40506a;
	--pac-muted: #6f7c8d;
	--pac-line: #d9dee5;
	--pac-line-strong: #c2cbd7;
	--pac-navy: #22395c;
	--pac-navy-hover: #1a2c48;
	--pac-upload-bg: #f7f9fc;
	--pac-danger: #b42318;
	--pac-danger-bg: #fdf6f5;
	--pac-radius: 8px;
	--pac-ring: 0 0 0 3px rgba(34, 57, 92, .13);
}

.pac-form *,
.pac-form *::before,
.pac-form *::after,
.pac-modal *,
.pac-modal *::before,
.pac-modal *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Form card */

.pac-form {
	position: relative;
	max-width: 792px;
	margin: 32px auto;
	background: #fff;
	border: 1px solid #e3e7ed;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	overflow: hidden;
	color: var(--pac-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.pac-form__body { padding: 6px 32px 0; }

.pac-section { padding: 22px 0 24px; }

.pac-section + .pac-section { border-top: 1px solid #e9ecf1; }

.pac-form .pac-section__title {
	margin: 0 0 16px;
	padding: 0;
	font-family: inherit;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #1b2a44;
}

/* -------------------------------------------------------------------- Grid */

.pac-form .pac-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 28px;
	row-gap: 12px;
}

.pac-form .pac-field { min-width: 0; }

.pac-form .pac-field--full { grid-column: 1 / -1; }

.pac-form .pac-label {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--pac-ink);
}

.pac-form .pac-req { font-weight: 700; }

/* ------------------------------------------------------------------ Inputs */

.pac-form .pac-input,
.pac-form .pac-textarea,
.pac-form .pac-select {
	display: block;
	width: 100%;
	margin: 0;
	color: var(--pac-ink);
	background-color: #fff;
	border: 1px solid var(--pac-line);
	border-radius: var(--pac-radius);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.3;
	transition: border-color .15s ease, box-shadow .15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.pac-form .pac-input { height: 38px; padding: 0 13px; }

.pac-form .pac-textarea {
	min-height: 88px;
	padding: 10px 13px;
	line-height: 1.5;
	resize: vertical;
}

.pac-form .pac-select {
	height: 38px;
	padding: 0 40px 0 13px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236f7c8d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.pac-form .pac-input:hover,
.pac-form .pac-textarea:hover,
.pac-form .pac-select:hover { border-color: var(--pac-line-strong); }

.pac-form .pac-input:focus,
.pac-form .pac-textarea:focus,
.pac-form .pac-select:focus {
	outline: none;
	border-color: var(--pac-navy);
	box-shadow: var(--pac-ring);
}

.pac-form .pac-input::placeholder,
.pac-form .pac-textarea::placeholder { color: #9aa5b4; opacity: 1; }

.pac-form .pac-field--error .pac-input,
.pac-form .pac-field--error .pac-textarea,
.pac-form .pac-field--error .pac-select {
	border-color: var(--pac-danger);
}

.pac-form .pac-field__error {
	margin: 6px 0 0;
	padding: 0;
	font-size: 12.5px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--pac-danger);
}

.pac-form .pac-field__error[hidden] { display: none; }

/* ------------------------------------------------------------------- Chips */

.pac-form .pac-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.pac-form .pac-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 96px;
	height: 38px;
	padding: 0 18px;
	background: #fff;
	border: 1px solid var(--pac-line);
	border-radius: var(--pac-radius);
	font-size: 14.5px;
	font-weight: 400;
	color: var(--pac-ink);
	cursor: pointer;
	user-select: none;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.pac-form .pac-chip:hover { border-color: var(--pac-line-strong); background: #fbfcfd; }

.pac-form .pac-chip input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.pac-form .pac-chip__dot {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 1.5px solid #b7c0cd;
	border-radius: 50%;
	background: #fff;
	transition: border-color .15s ease;
}

.pac-form .pac-chip input:checked + .pac-chip__dot { border-color: var(--pac-navy); }

.pac-form .pac-chip input:checked + .pac-chip__dot::after {
	content: "";
	position: absolute;
	inset: 3.5px;
	border-radius: 50%;
	background: var(--pac-navy);
}

.pac-form .pac-chip:has(input:checked) {
	border-color: var(--pac-navy);
	box-shadow: inset 0 0 0 1px var(--pac-navy);
}

.pac-form .pac-chip:focus-within {
	border-color: var(--pac-navy);
	box-shadow: var(--pac-ring);
}

/* ------------------------------------------------------------------ Upload */

.pac-form .pac-upload {
	position: relative;
	display: block;
	min-height: 88px;
	padding: 16px 18px;
	background: var(--pac-upload-bg);
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.pac-form .pac-upload:hover,
.pac-form .pac-upload.is-dragover {
	border-color: var(--pac-navy);
	background: #f1f5fa;
}

.pac-form .pac-upload:focus-within {
	border-color: var(--pac-navy);
	box-shadow: var(--pac-ring);
}

.pac-form .pac-field--error .pac-upload {
	border-color: var(--pac-danger);
	background: var(--pac-danger-bg);
}

.pac-form .pac-upload__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--pac-ink);
}

.pac-form .pac-upload__hint {
	display: block;
	margin-top: 4px;
	font-size: 12.5px;
	color: var(--pac-muted);
}

.pac-form .pac-upload__file {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 7px 12px;
	background: #fff;
	border: 1px solid var(--pac-line);
	border-radius: 6px;
	font-size: 13px;
	color: var(--pac-ink-soft);
}

.pac-form .pac-upload__file[hidden] { display: none; }

.pac-form .pac-upload__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ Footer */

.pac-form .pac-form__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 32px 13px;
	border-top: 1px solid #e6e9ee;
}

.pac-form .pac-form__note {
	margin: 0;
	padding: 0;
	font-size: 12.5px;
	color: var(--pac-muted);
}

.pac-form .pac-btn {
	flex: 0 0 auto;
	padding: 11px 28px;
	background: var(--pac-navy);
	color: #fff;
	border: 0;
	border-radius: 24px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
}

.pac-form .pac-btn:hover { background: var(--pac-navy-hover); }
.pac-form .pac-btn:active { transform: translateY(1px); }
.pac-form .pac-btn:focus-visible { outline: 2px solid var(--pac-navy); outline-offset: 3px; }
.pac-form .pac-btn[disabled] { opacity: .65; cursor: default; }

/* ---------------------------------------------------------------- Messages */

.pac-form .pac-notice {
	margin: 18px 0 0;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.45;
}

.pac-form .pac-notice--error {
	background: #fdf3f2;
	border: 1px solid #f3c9c4;
	color: #8f1d14;
}

.pac-form .pac-hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------- Modal */

html.pac-modal-open,
html.pac-modal-open body { overflow: hidden; }

.pac-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .18s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
}

.pac-modal.is-open { opacity: 1; }

/*
 * The dialog is visible without JavaScript, so the entrance is a CSS
 * animation rather than a class toggled on the first frame.
 */
@keyframes pac-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes pac-dialog-in {
	from { transform: translateY(10px) scale(.985); }
	to { transform: none; }
}

.pac-modal.is-open .pac-modal__overlay { animation: pac-overlay-in .18s ease both; }
.pac-modal.is-open .pac-modal__dialog { animation: pac-dialog-in .18s ease both; }

/* `display: flex` above would otherwise beat the browser's [hidden] rule. */
.pac-modal[hidden] { display: none; }

.pac-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, .55);
	cursor: pointer;
}

.pac-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 32px 28px 26px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
	text-align: center;
}

.pac-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	background: #eaf0fa;
	border-radius: 50%;
	color: #142a5c;
}

.pac-modal .pac-modal__title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: #142a5c;
}

.pac-modal .pac-modal__text {
	margin: 0 0 24px;
	padding: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: #4b5563;
}

.pac-modal__close {
	display: inline-block;
	padding: 11px 32px;
	background: #142a5c;
	color: #fff;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s ease;
}

.pac-modal__close:hover,
.pac-modal__close:focus {
	background: #1a2c48;
	color: #fff;
	text-decoration: none;
}

.pac-modal__close:focus-visible {
	outline: 2px solid #142a5c;
	outline-offset: 3px;
}

/* --------------------------------------------------------------- Responsive */

@media (max-width: 680px) {
	.pac-form {
		margin: 0 auto;
		border-radius: 6px;
	}

	.pac-form__body { padding: 2px 20px 0; }

	.pac-form .pac-grid { grid-template-columns: minmax(0, 1fr); }

	.pac-form .pac-field--full { grid-column: auto; }

	.pac-form .pac-section { padding: 22px 0 24px; }

	.pac-form .pac-form__footer {
		flex-direction: column;
		align-items: stretch;
		padding: 18px 20px 22px;
	}

	.pac-form .pac-form__note { order: 2; text-align: center; }

	.pac-form .pac-btn {
		width: 100%;
		padding: 14px 24px;
	}

	/* 16px prevents iOS from zooming the viewport on focus. */
	.pac-form .pac-input,
	.pac-form .pac-textarea,
	.pac-form .pac-select { font-size: 16px; }

	.pac-modal__dialog { padding: 28px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.pac-form,
	.pac-form *,
	.pac-modal,
	.pac-modal * {
		transition: none !important;
		animation: none !important;
	}
}
