/**
 * Front-end event registration — primary CTA, secondary outlines.
 */

.bm-er-button-wrap {
	margin: 0 0 1rem;
}

.bm-er-open-btn {
	display: inline-block;
	padding: 0.65rem 1.35rem;
	border-radius: 6px;
	border: 1px solid #194b7f;
	background: #194b7f;
	color: #fff !important;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bm-er-open-btn:hover,
.bm-er-open-btn:focus {
	background: #f8c628;
	border-color: #f8c628;
	color: #111827 !important;
}

.bm-er-modal[hidden] {
	display: none !important;
}

body.bm-er-modal-open {
	overflow: hidden;
}

.bm-er-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.bm-er-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.45);
}

.bm-er-modal__panel {
	position: relative;
	width: min(440px, calc(100vw - 24px));
	max-height: min(88vh, 640px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	box-shadow:
		0 0 0 1px rgba(25, 75, 127, 0.08),
		0 12px 40px rgba(0, 0, 0, 0.2),
		0 4px 12px rgba(25, 75, 127, 0.12);
	border: 1px solid var(--bm-er-secondary, #6b8cae);
}

.bm-er-modal__head {
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--bm-er-secondary, #6b8cae);
	background: #fafbfc;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.bm-er-modal__title {
	margin: 0;
	font-size: 1.05rem;
	color: var(--bm-er-primary, #194b7f);
}

.bm-er-modal__close {
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	background: #fff;
	border-radius: 6px;
	width: 36px;
	height: 36px;
	line-height: 1;
	font-size: 1.4rem;
	cursor: pointer;
	color: #374151;
}

.bm-er-modal__close:hover {
	background: #f8c628;
	border-color: #f8c628;
	color: #111827;
}

.bm-er-modal__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px 18px 20px;
	-webkit-overflow-scrolling: touch;
	background: linear-gradient(180deg, #f1f5f9 0%, #e8edf3 100%);
}

.bm-er-page {
	max-width: 680px;
	margin: 0 auto 2rem;
	padding: 0 12px;
}

/* Form shell: clear outline, depth, comfortable padding (page + modal). */
.bm-er-inner {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #111827;
	background: #fff;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	border-radius: 12px;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.6) inset,
		0 1px 2px rgba(17, 24, 39, 0.06),
		0 8px 24px -6px rgba(25, 75, 127, 0.14);
	padding: 1.75rem 2rem 2rem;
	box-sizing: border-box;
}

.bm-er-page .bm-er-inner {
	padding: 2rem 2.25rem 2.25rem;
}

.bm-er-modal .bm-er-title {
	display: none;
}

/* Modal: nested “smaller” form card on a soft tray so the flow fits the viewport. */
.bm-er-modal .bm-er-inner {
	max-width: min(100%, 380px);
	margin: 0 auto;
	padding: 1rem 1.125rem 1.25rem;
	border-radius: 10px;
	box-shadow:
		0 0 0 1px rgba(25, 75, 127, 0.1),
		0 2px 6px rgba(17, 24, 39, 0.06),
		0 10px 28px -8px rgba(25, 75, 127, 0.18);
}

.bm-er-modal .bm-er-intro {
	font-size: 0.82rem;
	margin-bottom: 0.75rem;
	line-height: 1.45;
	max-height: 5.5em;
	overflow-y: auto;
}

.bm-er-modal .bm-er-step {
	font-size: 0.95rem;
	margin: 0 0 0.65rem;
}

.bm-er-modal .bm-er-grid {
	gap: 8px;
}

.bm-er-modal .bm-er-card {
	padding: 8px 6px;
	gap: 4px;
	border-radius: 7px;
}

.bm-er-modal .bm-er-card-media {
	aspect-ratio: auto;
	height: 48px;
	max-height: 48px;
	border-radius: 5px;
}

.bm-er-modal .bm-er-ph {
	width: 32px;
	height: 32px;
	border-radius: 6px;
}

.bm-er-modal .bm-er-card-label {
	font-size: 0.78rem;
	line-height: 1.2;
}

.bm-er-modal .bm-er-card-desc {
	font-size: 0.68rem;
	line-height: 1.25;
	max-height: 2.6em;
	overflow: hidden;
}

.bm-er-modal .bm-er-toolbar {
	margin-bottom: 8px;
}

.bm-er-modal .bm-er-field {
	margin-bottom: 10px;
}

.bm-er-modal .bm-er-field label {
	font-size: 0.8rem;
}

.bm-er-modal .bm-er-field input,
.bm-er-modal .bm-er-field textarea {
	padding: 7px 9px;
	font-size: 0.875rem;
}

.bm-er-modal .bm-er-actions {
	margin-top: 14px;
}

.bm-er-modal .bm-er-footnote {
	font-size: 0.78rem;
	padding: 10px;
}

.bm-er-modal .bm-er-msg {
	margin-top: 10px;
	padding: 10px;
	font-size: 0.875rem;
}

.bm-er-title {
	margin: 0 0 0.5rem;
	font-size: 1.65rem;
	color: var(--bm-er-primary, #194b7f);
}

.bm-er-intro {
	font-size: 0.95rem;
	color: #4b5563;
	margin-bottom: 1.25rem;
	line-height: 1.55;
}

.bm-er-step {
	text-align: center;
	font-size: 1.2rem;
	margin: 0 0 1rem;
}

.bm-er-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 520px) {
	.bm-er-grid {
		grid-template-columns: 1fr;
	}
}

.bm-er-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	padding: 14px 10px;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	color: inherit;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bm-er-card:hover {
	border-color: var(--bm-er-primary, #194b7f);
	box-shadow: 0 4px 12px rgba(25, 75, 127, 0.1);
}

.bm-er-card-media {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f4f6;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	display: flex;
	align-items: center;
	justify-content: center;
}

.bm-er-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bm-er-ph {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #e5e7eb;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
}

.bm-er-card-label {
	font-weight: 700;
	color: var(--bm-er-primary, #194b7f);
}

.bm-er-card-desc {
	font-size: 0.8rem;
	color: #6b7280;
	line-height: 1.35;
}

.bm-er-toolbar {
	margin-bottom: 10px;
}

.bm-er-back.button {
	border-radius: 6px;
	border-color: var(--bm-er-secondary, #6b8cae);
	color: var(--bm-er-primary, #194b7f);
}

.bm-er-back.button:hover {
	background: #f8c628;
	border-color: #f8c628;
	color: #111827;
}

.bm-er-field {
	margin-bottom: 14px;
}

.bm-er-field label {
	display: block;
	font-weight: 600;
	font-size: 0.85rem;
	margin-bottom: 4px;
	color: #374151;
}

.bm-er-field input,
.bm-er-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	border-radius: 6px;
	padding: 9px 11px;
	font-size: 0.95rem;
	background: #fff;
}

.bm-er-field input:focus,
.bm-er-field textarea:focus {
	outline: 2px solid var(--bm-er-primary, #194b7f);
	outline-offset: 1px;
}

.bm-er-actions {
	margin-top: 18px;
}

.bm-er-submit.button-primary {
	background: #194b7f !important;
	border-color: #143d66 !important;
	color: #fff !important;
	border-radius: 6px;
	padding: 10px 22px;
	height: auto;
	font-weight: 600;
}

.bm-er-submit.button-primary:hover:not(:disabled) {
	background: #f8c628 !important;
	border-color: #e0b020 !important;
	color: #111827 !important;
}

.bm-er-footnote {
	font-size: 0.85rem;
	color: #4b5563;
	padding: 12px;
	background: #f8fafc;
	border: 1px solid var(--bm-er-secondary, #6b8cae);
	border-radius: 6px;
}

.bm-er-msg {
	margin-top: 14px;
	padding: 12px;
	border-radius: 6px;
	font-size: 0.95rem;
}

.bm-er-msg.is-success {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

.bm-er-msg.is-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}
