/**
 * MGMAC Members: front-end styles.
 *
 * Colours come from the MGMAC theme's palette, with the brand values as
 * fallbacks so everything still looks right under another theme.
 */

.mgmac-m {
	--mgmac-m-navy: var(--wp--preset--color--navy, #0a3266);
	--mgmac-m-blue: var(--wp--preset--color--blue, #0054a6);
	--mgmac-m-maroon: var(--wp--preset--color--maroon, #670603);
	--mgmac-m-surface: var(--wp--preset--color--surface, #f4f7fb);
	--mgmac-m-tint: var(--wp--preset--color--tint, #eaf2fb);
	--mgmac-m-border: var(--wp--preset--color--gray-light, #e6e6e6);
	--mgmac-m-field: #8a94a3;
	--mgmac-m-muted: #5a6370;
	--mgmac-m-radius: 8px;
}

.mgmac-m > :first-child,
.mgmac-m-card > :first-child {
	margin-top: 0;
}

.mgmac-m > :last-child,
.mgmac-m-card > :last-child {
	margin-bottom: 0;
}

/* Cards ------------------------------------------------------------------- */

.mgmac-m-card {
	margin: 0 0 24px;
	padding: clamp(18px, 4vw, 28px);
	background: #fff;
	border: 1px solid var(--mgmac-m-border);
	border-radius: var(--mgmac-m-radius);
	box-shadow: 0 1px 2px rgba(10, 50, 102, 0.06), 0 4px 16px rgba(10, 50, 102, 0.08);
}

.mgmac-m-card h2 {
	margin: 0 0 16px;
	font-size: 1.25rem;
}

.mgmac-m-card h3 {
	margin: 0 0 6px;
	font-size: 1.1rem;
}

.mgmac-m-muted,
.mgmac-m-help {
	color: var(--mgmac-m-muted);
	font-size: 0.88rem;
}

.mgmac-m-link {
	margin-left: 12px;
	font-size: 0.92rem;
}

/* Notices ----------------------------------------------------------------- */

.mgmac-m-notice {
	margin: 0 0 20px;
	padding: 14px 18px;
	background: var(--mgmac-m-tint);
	border-left: 4px solid var(--mgmac-m-blue);
	border-radius: var(--mgmac-m-radius);
}

.mgmac-m-notice--success {
	background: #e3f4e8;
	border-color: #1f8a44;
}

.mgmac-m-notice--error {
	background: #fbe9e7;
	border-color: #b3261e;
}

.mgmac-m-notice > :first-child {
	margin-top: 0;
}

.mgmac-m-notice > :last-child {
	margin-bottom: 0;
}

.mgmac-m-notice ul {
	margin: 6px 0 0;
	padding-left: 1.2em;
}

/* Forms ------------------------------------------------------------------- */

.mgmac-m-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mgmac-m-form > * {
	margin: 0;
}

.mgmac-m-fieldset {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.mgmac-m-fieldset > * {
	margin: 0;
}

.mgmac-m-fieldset legend {
	margin-bottom: 12px;
	padding: 0;
	color: var(--mgmac-m-maroon);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mgmac-m-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 14px 18px;
}

.mgmac-m-grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.mgmac-m-grid > * {
	margin: 0;
}

.mgmac-m-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.mgmac-m-field label,
.mgmac-m-login label {
	color: var(--mgmac-m-navy);
	font-size: 0.9rem;
	font-weight: 600;
}

.mgmac-m-req {
	color: #b3261e;
}

.mgmac-m input[type="text"],
.mgmac-m input[type="email"],
.mgmac-m input[type="tel"],
.mgmac-m input[type="number"],
.mgmac-m input[type="password"],
.mgmac-m input[type="search"],
.mgmac-m select,
.mgmac-m textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--mgmac-m-field);
	border-radius: 6px;
	color: #222;
	font: inherit;
}

.mgmac-m input.mgmac-m-short {
	max-width: 8em;
}

.mgmac-m input:focus,
.mgmac-m select:focus,
.mgmac-m textarea:focus {
	border-color: var(--mgmac-m-blue);
	outline: 2px solid var(--mgmac-m-blue);
	outline-offset: 1px;
}

.mgmac-m-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.95rem;
}

.mgmac-m-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
}

.mgmac-m button.wp-element-button,
.mgmac-m a.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	cursor: pointer;
	text-decoration: none;
}

.mgmac-m .wp-element-button.mgmac-m-ghost {
	background: #fff;
	border: 1px solid var(--mgmac-m-blue);
	color: var(--mgmac-m-blue);
}

.mgmac-m .wp-element-button.mgmac-m-ghost:hover,
.mgmac-m .wp-element-button.mgmac-m-ghost:focus {
	background: var(--mgmac-m-tint);
	color: var(--mgmac-m-navy);
}

.mgmac-m-actions {
	margin: 0;
}

/* The trap field for spam robots: off-screen, not display:none, so robots
   that skip hidden fields still fill it in. */
.mgmac-m-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mgmac-m-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 12px;
	color: var(--mgmac-m-navy);
}

.mgmac-m-amount {
	font-size: 1.5rem;
	font-weight: 800;
}

.mgmac-m-total:empty,
.mgmac-m-partner[hidden] {
	display: none;
}

.mgmac-m-total {
	padding: 12px 16px;
	background: var(--mgmac-m-surface);
	border-radius: var(--mgmac-m-radius);
	color: var(--mgmac-m-navy);
	font-weight: 600;
}

.mgmac-m-partner {
	padding: 14px 18px;
	background: #fdf0d5;
	border-left: 4px solid #b26a00;
	border-radius: var(--mgmac-m-radius);
}

/* The Join Us page's old card was sized for a one-field preview form. */
.mgmac-join-card:has(.mgmac-m-join) {
	max-width: none;
}

/* Login ------------------------------------------------------------------- */

.mgmac-m-login {
	max-width: 440px;
}

.mgmac-m-login form p {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 14px;
}

.mgmac-m-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
}

.mgmac-m-login .login-remember input {
	width: 18px;
	height: 18px;
	margin: 0;
}

.mgmac-m-login .login-submit .wp-element-button {
	align-self: flex-start;
	min-height: 44px;
	cursor: pointer;
}

/* Account ----------------------------------------------------------------- */

.mgmac-m-hello {
	margin: 0 0 16px;
	color: var(--mgmac-m-navy);
	font-size: 1.15rem;
	font-weight: 700;
}

.mgmac-m-hello .mgmac-m-link {
	font-weight: 400;
}

.mgmac-m-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
	gap: 14px 24px;
	margin: 0 0 16px;
}

.mgmac-m-facts dt {
	color: var(--mgmac-m-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mgmac-m-facts dd {
	margin: 2px 0 0;
	color: var(--mgmac-m-navy);
	font-weight: 600;
}

.mgmac-m-badge {
	display: inline-block;
	padding: 2px 12px;
	background: #eee;
	border-radius: 999px;
	color: #444;
	font-size: 0.78rem;
	font-weight: 700;
	white-space: nowrap;
}

.mgmac-m-badge--active {
	background: #e3f4e8;
	color: #17602f;
}

.mgmac-m-badge--grace,
.mgmac-m-badge--pending,
.mgmac-m-badge--pending_approval {
	background: #fdf0d5;
	color: #7a4b00;
}

.mgmac-m-badge--lapsed,
.mgmac-m-badge--cancelled {
	background: #fbe9e7;
	color: #8c1d18;
}

.mgmac-m-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
}

/* Positioned, so the hidden screen-reader heading inside scrolls with the
   table instead of widening the whole page on a phone. */
.mgmac-m-table-wrap {
	position: relative;
	overflow-x: auto;
}

.mgmac-m-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.mgmac-m-table th,
.mgmac-m-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--mgmac-m-border);
	text-align: left;
	vertical-align: top;
}

.mgmac-m-table th {
	color: var(--mgmac-m-muted);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mgmac-m-table .mgmac-m-num {
	text-align: right;
	white-space: nowrap;
}

.mgmac-m-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mgmac-m-list li {
	padding: 10px 0;
	border-bottom: 1px solid var(--mgmac-m-border);
}

.mgmac-m-list li:last-child {
	border-bottom: 0;
}

.mgmac-m-file {
	font-weight: 600;
}

/* Events ------------------------------------------------------------------ */

.mgmac-m-tag {
	width: fit-content;
	margin: 0 0 12px;
	padding: 4px 12px;
	background: var(--mgmac-m-maroon);
	border-radius: 999px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.mgmac-m-event h3 a {
	color: var(--mgmac-m-navy);
	text-decoration: none;
}

.mgmac-m-event h3 a:hover,
.mgmac-m-event h3 a:focus {
	text-decoration: underline;
}

.mgmac-m-where {
	margin: 0 0 8px;
	color: var(--mgmac-m-blue);
	font-size: 0.92rem;
	font-weight: 600;
}

.mgmac-m-event-details .mgmac-m-facts {
	margin: 0;
}

.mgmac-m-register {
	margin-top: 40px;
}

/* Directory --------------------------------------------------------------- */

.mgmac-m-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
	margin: 0 0 16px;
}

.mgmac-m-search .mgmac-m-field {
	flex: 1 1 220px;
}

.mgmac-m-people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mgmac-m-person {
	margin: 0;
}

.mgmac-m-person p {
	margin: 0 0 4px;
	font-size: 0.92rem;
	overflow-wrap: anywhere;
}

.mgmac-m-role {
	color: var(--mgmac-m-blue);
	font-weight: 600;
}

.mgmac-m-pages {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

/* Editor placeholders ----------------------------------------------------- */

.mgmac-m-placeholder {
	padding: 20px 24px;
	background: #f4f7fb;
	border: 1px dashed #0054a6;
	border-radius: 8px;
	color: #0a3266;
}

.mgmac-m-placeholder strong {
	display: block;
	margin-bottom: 4px;
	font-size: 1.05rem;
}

.mgmac-m-placeholder span {
	font-size: 0.9rem;
}

.mgmac-m .screen-reader-text:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}
