/**
 * Member Manager - front-end styles.
 *
 * Every element rendered by the plugin's shortcodes ([member_form],
 * [member_login], [member_change_password], [member_utility]) carries an
 * "mm-" prefixed class, so this stylesheet is just a starting point - feel
 * free to override any of these rules from your theme instead of editing
 * this file directly (it may be replaced on plugin updates).
 *
 * Structure below follows the shortcode output: wrappers, forms/fields,
 * buttons, tables, and notices.
 */

/* ---------------------------------------------------------------------
 * Shortcode wrappers
 * ------------------------------------------------------------------- */

.mm-member-form,
.mm-change-password,
.mm-login-form,
.mm-login-panel,
.mm-utility {
	max-width: 480px;
	margin: 0 0 2em;
}

.mm-utility {
	max-width: 640px;
}

.mm-member-form h3,
.mm-member-form h4,
.mm-utility h3,
.mm-utility h4 {
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.mm-member-form h3:first-child,
.mm-utility h3:first-child {
	margin-top: 0;
}

/* ---------------------------------------------------------------------
 * Forms and fields
 * ------------------------------------------------------------------- */

.mm-form {
	margin: 0 0 1.5em;
}

.mm-field {
	margin: 0 0 1em;
}

.mm-field-checkbox {
	display: flex;
	align-items: center;
}

.mm-label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
}

.mm-field-checkbox .mm-label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-weight: normal;
}

.mm-input {
	display: block;
	width: 100%;
	max-width: 360px;
	padding: 0.5em 0.65em;
	box-sizing: border-box;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 1em;
}

.mm-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.mm-input-number {
	max-width: 100px;
}

.mm-checkbox {
	width: auto;
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Buttons and links
 * ------------------------------------------------------------------- */

.mm-button {
	display: inline-block;
	padding: 0.6em 1.25em;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 1em;
	cursor: pointer;
	background: #f0f0f1;
	color: #1d2327;
}

.mm-button-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.mm-button-primary:hover {
	background: #135e96;
}

.mm-button-danger {
	background: #d63638;
	border-color: #d63638;
	color: #fff;
}

.mm-button-danger:hover {
	background: #b32d2e;
}

.mm-select-link {
	font-weight: 600;
}

.mm-lost-password a,
.mm-logout-link {
	font-size: 0.9em;
}

.mm-logged-in-as {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
}

/* ---------------------------------------------------------------------
 * Tables (member lists / review / expired list)
 * ------------------------------------------------------------------- */

.mm-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1em;
}

.mm-table th,
.mm-table td {
	text-align: left;
	padding: 0.5em 0.75em;
	border-bottom: 1px solid #e0e0e0;
	vertical-align: middle;
}

.mm-table thead th {
	border-bottom: 2px solid #ccd0d4;
	font-weight: 600;
}

.mm-member-review th {
	width: 35%;
	font-weight: 600;
	background: #f6f7f7;
}

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

.mm-success,
.mm-error {
	padding: 0.75em 1em;
	border-radius: 4px;
	margin: 0 0 1em;
}

.mm-success {
	background: #edfaef;
	border: 1px solid #68de7c;
	color: #1a7431;
}

.mm-error {
	background: #fcf0f1;
	border: 1px solid #d63638;
	color: #8a1f1f;
}

.mm-error a {
	color: inherit;
	text-decoration: underline;
}

/* ---------------------------------------------------------------------
 * ACF's own front-end forms (acf_form()) - the plugin adds "mm-acf-form"
 * plus a form-specific class (see form_attributes in class-mm-shortcode-form.php)
 * so these can be targeted without fighting ACF's own "acf-form" styles.
 * ------------------------------------------------------------------- */

.mm-acf-form .acf-label label {
	font-weight: 600;
}

.mm-acf-form .acf-fields > .acf-field {
	padding: 0.75em 0;
}
