/* =========================================================================
   Membership Application widget
   Bare render (no outer border / padding / bg) — sits flush in host layout.
   Namespaced under .ma-app. Uses hardcoded hex (no CSS var dependency).
   ========================================================================= */

.ma-app { box-sizing: border-box; }
.ma-app *, .ma-app *::before, .ma-app *::after { box-sizing: border-box; }

.ma-app__form { margin: 0; }

/* ---------- Sections ---------- */
.ma-app__sect {
	border-top: 1px solid #E6EAE9;
	padding-top: 36px;
	margin-top: 36px;
}
.ma-app__sect:first-of-type {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}
.ma-app__sect-hd {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}
.ma-app__sect-num {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	font-weight: 700;
	color: #026982;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.ma-app__sect h2 {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	color: #001D25;
	margin: 0;
}
.ma-app__sub {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	color: #4B4C4D;
	margin: 0 0 28px;
	max-width: 62ch;
	line-height: 1.55;
}

/* ---------- Grids ---------- */
.ma-app__grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ma-app__grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 820px) {
	.ma-app__grid-2, .ma-app__grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Field primitives ---------- */
.ma-app__field { margin-bottom: 20px; }
.ma-app__field--consent { margin-bottom: 0; }

.ma-app__lbl {
	display: block;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #21282D;
	margin-bottom: 8px;
	line-height: 1.3;
}
.ma-app__req {
	color: #F41C1C;
	margin-left: 3px;
}
.ma-app__opt {
	font-weight: 400;
	color: #4B4C4D;
	margin-left: 6px;
	font-size: 13px;
}
.ma-app__err {
	display: none;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 13px;
	color: #F41C1C;
	margin-top: 6px;
}
.ma-app__err--consent { margin-left: 32px; }
.ma-app__field.ma-app__field--invalid .ma-app__err { display: block; }
.ma-app__field.ma-app__field--invalid .ma-app__input,
.ma-app__field.ma-app__field--invalid .ma-app__select,
.ma-app__field.ma-app__field--invalid .ma-app__multiselect {
	border-color: #F41C1C;
}

/* Override global input[type=text] (64px !important-width) with specificity */
.ma-app .ma-app__input,
.ma-app .ma-app__select,
.ma-app .ma-app__textarea {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 15px;
	width: 100% !important;
	box-sizing: border-box;
	padding: 14px;
	border: 2px solid #000;
	border-radius: 0;
	color: #21282D;
	background: #fff;
	line-height: 1.3;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	transition: border-color .15s, box-shadow .15s;
	margin: 0;
}
.ma-app .ma-app__input,
.ma-app .ma-app__select { height: 52px; }
.ma-app .ma-app__textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.55;
	height: auto;
}
.ma-app__input::placeholder,
.ma-app__textarea::placeholder { color: #707070; }

.ma-app__input:focus,
.ma-app__select:focus,
.ma-app__textarea:focus,
.ma-app__multiselect:focus-within {
	outline: none;
	border-color: #026982;
	box-shadow: 0 0 0 3px rgba(2, 105, 130, .18);
}

/* Select chevron — pure CSS diagonals */
.ma-app .ma-app__select {
	background-image:
		linear-gradient(45deg, transparent 50%, #001D25 50%),
		linear-gradient(135deg, #001D25 50%, transparent 50%);
	background-position: calc(100% - 22px) 24px, calc(100% - 16px) 24px;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
}

/* ---------- Multi-select (tier) ---------- */
.ma-app__multiselect {
	border: 2px solid #000;
	background: #fff;
	padding: 8px;
	min-height: 52px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	transition: border-color .15s, box-shadow .15s;
}
.ma-app__ms-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #001D25;
	color: #fff;
	padding: 6px 10px;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .3px;
	line-height: 1.2;
}
.ma-app__ms-chip-x {
	background: transparent;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
	margin: 0;
}
.ma-app__ms-chip-x:hover { color: #5CFF96; }

.ma-app .ma-app__ms-select {
	flex: 1;
	min-width: 140px;
	border: none;
	outline: none;
	background: transparent;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 15px;
	color: #21282D;
	height: 36px;
	padding: 0 8px;
	width: auto !important;
	box-shadow: none;
	appearance: auto;
	-webkit-appearance: auto;
	background-image: none;
}

/* ---------- Checkbox (consent) ---------- */
.ma-app__check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	position: relative;
}
.ma-app__check input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.ma-app__check-box {
	width: 20px;
	height: 20px;
	border: 2px solid #000;
	background: #fff;
	flex-shrink: 0;
	margin-top: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.ma-app__check-box svg {
	width: 14px;
	height: 14px;
	display: none;
}
.ma-app__check input:checked ~ .ma-app__check-box { background: #5CFF96; }
.ma-app__check input:checked ~ .ma-app__check-box svg { display: block; }
.ma-app__check input:focus-visible ~ .ma-app__check-box {
	outline: 3px solid #026982;
	outline-offset: 2px;
}
.ma-app__check-txt {
	flex: 1;
	min-width: 0;
	color: #21282D;
}
.ma-app__check-txt a { color: #066EB9; }

/* ---------- Actions row ---------- */
.ma-app__actions {
	display: flex;
	gap: 14px;
	margin-top: 40px;
	padding-top: 28px;
	border-top: 2px solid #E6EAE9;
	align-items: center;
	flex-wrap: wrap;
}
.ma-app__spacer { flex: 1; }

.ma-app__submit {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	padding: 18px 22px;
	border: 2px solid #000;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	line-height: 1;
	transition: background .15s, color .15s, border-color .15s;
	background: #5CFF96;
	color: #000;
	border-radius: 0;
}
.ma-app__submit::after {
	content: "\2192";
	font-weight: 400;
	letter-spacing: 0;
}
.ma-app__submit:hover:not(:disabled) {
	background: #001D25;
	color: #fff;
	border-color: #001D25;
}
.ma-app__submit:disabled {
	background: #E6EAE9;
	color: #707070;
	border-color: #A5A5A5;
	cursor: not-allowed;
}
.ma-app__submit:disabled::after { opacity: .4; }

/* ---------- Error banner ---------- */
.ma-app__error-banner {
	margin-top: 24px;
	padding: 14px 16px;
	border: 2px solid #F41C1C;
	background: #fff;
	color: #21282D;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
}
.ma-app__error-banner[hidden] { display: none; }
.ma-app__error-retry,
.ma-app__error-dismiss {
	border: 2px solid #000;
	background: #fff;
	padding: 6px 12px;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	cursor: pointer;
}
.ma-app__error-dismiss {
	margin-left: auto;
	padding: 6px 10px;
	font-size: 16px;
	letter-spacing: 0;
}

/* ---------- Success state ---------- */
.ma-app__success {
	display: none;
	text-align: center;
	padding: 80px 20px;
}
.ma-app__success.is-on { display: block; }
.ma-app__success > i {
	font-size: 56px;
	color: #038710;
	margin-bottom: 16px;
}
.ma-app__success h2 {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 36px;
	line-height: 1.15;
	font-weight: 700;
	color: #001D25;
	margin: 0 0 12px;
}
.ma-app__success p {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 16px;
	color: #4B4C4D;
	margin: 0 auto 24px;
	max-width: 52ch;
	line-height: 1.55;
}
.ma-app__ticket {
	display: inline-block;
	background: #F6F8F8;
	border: 2px solid #001D25;
	padding: 10px 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	color: #001D25;
}
