/* ===========================================================
   BA & LM Registration — front-end form styles
   Scoped under .balm-wrap so it stays out of the theme's way.
   =========================================================== */

.balm-wrap {
	max-width: 640px;
	margin: 32px auto;
	box-sizing: border-box;
}
.balm-wrap *,
.balm-wrap *::before,
.balm-wrap *::after {
	box-sizing: border-box;
}

.balm-box {
	background: #ffffff;
	border: 1px solid #e3e6ec;
	border-radius: 10px;
	padding: 32px 34px;
	box-shadow: 0 8px 30px rgba(31, 58, 95, 0.07);
}

.balm-title {
	margin: 0 0 4px;
	font-size: 24px;
	font-weight: 700;
	color: #1f3a5f;
}
.balm-subtitle {
	margin: 0 0 22px;
	font-size: 14px;
	color: #6a7384;
	line-height: 1.55;
}

/* ---- Messages -------------------------------------------- */
.balm-errors {
	background: #fbe7e7;
	border: 1px solid #f0bcbc;
	color: #8a1f1f;
	border-radius: 7px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
}
.balm-errors ul {
	margin: 8px 0 0;
	padding-left: 20px;
}
.balm-errors li {
	margin: 3px 0;
}

.balm-success {
	border-left: 5px solid #1f9d54;
}
.balm-success h3 {
	margin: 0 0 8px;
	color: #14773f;
	font-size: 20px;
}

/* ---- Fields ---------------------------------------------- */
.balm-field {
	margin-bottom: 18px;
}
.balm-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #2c3445;
	margin-bottom: 6px;
}
.balm-req {
	color: #d23b3b;
}

.balm-form input[type="text"],
.balm-form input[type="email"],
.balm-form input[type="tel"],
.balm-form input[type="url"],
.balm-form input[type="password"],
.balm-form textarea,
.balm-form input[type="file"] {
	width: 100%;
	padding: 11px 13px;
	font-size: 15px;
	color: #1f2430;
	background: #fbfcfd;
	border: 1px solid #d3d8e0;
	border-radius: 7px;
	transition: border-color .15s, box-shadow .15s;
}
.balm-form textarea {
	resize: vertical;
	min-height: 76px;
}
.balm-form input:focus,
.balm-form textarea:focus {
	outline: none;
	border-color: #1f3a5f;
	box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.12);
	background: #fff;
}
.balm-form input[type="file"] {
	padding: 9px 13px;
	background: #fff;
	cursor: pointer;
}

.balm-hint {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	color: #8b93a3;
}

/* ---- Role selector --------------------------------------- */
.balm-roles {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.balm-role-card {
	flex: 1;
	min-width: 180px;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 13px 15px;
	border: 1.5px solid #d3d8e0;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	color: #2c3445;
	background: #fbfcfd;
	transition: border-color .15s, background .15s;
}
.balm-role-card:hover {
	border-color: #9aa6bd;
}
.balm-role-card input {
	accent-color: #1f3a5f;
	width: 17px;
	height: 17px;
}
.balm-role-card:has(input:checked) {
	border-color: #1f3a5f;
	background: #eef2f8;
}

/* ---- Consent + submit ------------------------------------ */
.balm-consent label {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	font-size: 13.5px;
	color: #4a5263;
	line-height: 1.5;
}
.balm-consent input {
	margin-top: 2px;
	accent-color: #1f3a5f;
}

.balm-submit {
	width: 100%;
	margin-top: 8px;
	padding: 13px 20px;
	font-size: 16px;
	font-weight: 700;
	color: #1f2430;
	background: #c8a94e;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s, transform .05s;
}
.balm-submit:hover {
	background: #b6973f;
}
.balm-submit:active {
	transform: translateY(1px);
}

/* ---- Honeypot (hidden) ----------------------------------- */
.balm-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- Field-level error highlight ------------------------- */
.balm-form .balm-invalid input,
.balm-form .balm-invalid textarea {
	border-color: #d23b3b;
	background: #fff7f7;
}
.balm-field-error {
	display: none;
	margin-top: 5px;
	font-size: 12px;
	color: #c0392b;
}
.balm-invalid .balm-field-error {
	display: block;
}

@media (max-width: 520px) {
	.balm-box {
		padding: 24px 20px;
	}
}

/* ===========================================================
   Members directory + profile (added in 1.2.0)
   =========================================================== */
.balm-wrap-wide {
	max-width: 920px;
}

.balm-denied h3 {
	margin: 0 0 8px;
	color: #a01919;
	font-size: 20px;
}

.balm-table-scroll {
	overflow-x: auto;
}
.balm-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 6px;
	font-size: 14px;
}
.balm-table th,
.balm-table td {
	text-align: left;
	padding: 11px 14px;
	border-bottom: 1px solid #e7eaf0;
}
.balm-table th {
	background: #1f3a5f;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
}
.balm-table tbody tr:nth-child(even) {
	background: #f7f9fc;
}
.balm-table tbody tr:hover {
	background: #eef2f8;
}

.balm-readonly {
	background: #f0f1f4 !important;
	color: #555 !important;
	cursor: not-allowed;
}

.balm-success-inline {
	background: #dff5e4;
	border: 1px solid #addcb8;
	color: #14773f;
	border-radius: 7px;
	padding: 11px 15px;
	margin-bottom: 18px;
	font-size: 14px;
}

.balm-doc-note {
	margin-top: 20px;
	padding: 14px 16px;
	background: #f7f9fc;
	border: 1px solid #e3e6ec;
	border-radius: 8px;
	font-size: 13.5px;
}
.balm-doc-note ul {
	margin: 8px 0;
	padding-left: 20px;
}

/* Members table -> stacked cards on small screens */
@media (max-width: 600px) {
	.balm-table thead {
		display: none;
	}
	.balm-table,
	.balm-table tbody,
	.balm-table tr,
	.balm-table td {
		display: block;
		width: 100%;
	}
	.balm-table tr {
		margin-bottom: 12px;
		border: 1px solid #e7eaf0;
		border-radius: 8px;
		overflow: hidden;
	}
	.balm-table td {
		border: none;
		border-bottom: 1px solid #f0f1f4;
		padding: 9px 14px;
	}
	.balm-table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
		color: #1f3a5f;
	}
}

/* ---- Terms & Conditions link + popup (added in 1.3.0) ----- */
.balm-terms-link {
	color: #1f3a5f;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
.balm-terms-link:hover {
	color: #b6973f;
}

.balm-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(20, 28, 42, 0.6);
	padding: 24px;
	overflow-y: auto;
}
.balm-modal-overlay.is-open {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}
.balm-modal {
	background: #fff;
	max-width: 640px;
	width: 100%;
	margin: auto;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	position: relative;
	overflow: hidden;
}
.balm-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #8b93a3;
	cursor: pointer;
}
.balm-modal-close:hover {
	color: #1f2430;
}
.balm-modal-body {
	padding: 28px 30px 8px;
	max-height: 62vh;
	overflow-y: auto;
}
.balm-modal-title {
	margin: 0 0 4px;
	color: #1f3a5f;
	font-size: 20px;
}
.balm-modal-org {
	margin: 0 0 14px;
	color: #6a7384;
	font-size: 13px;
	font-weight: 600;
}
.balm-modal-intro {
	font-size: 14px;
	color: #4a5263;
	margin: 0 0 12px;
}
.balm-modal-list {
	margin: 0;
	padding-left: 22px;
	font-size: 13.5px;
	color: #2c3445;
	line-height: 1.6;
}
.balm-modal-list li {
	margin-bottom: 12px;
}
.balm-modal-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 14px 30px 20px;
	border-top: 1px solid #e7eaf0;
}
.balm-modal-download {
	font-size: 13px;
	color: #1f3a5f;
	text-decoration: underline;
}
.balm-modal-agree {
	width: auto;
	margin: 0;
	padding: 10px 20px;
	font-size: 14px;
}

/* ---- "Already registered?" login link (added in 1.6.0) ---- */
.balm-login-link {
	margin: 16px 0 0;
	text-align: center;
	font-size: 14px;
	color: #6a7384;
}
.balm-login-link a {
	color: #1f3a5f;
	font-weight: 600;
	text-decoration: underline;
}
.balm-login-link a:hover {
	color: #b6973f;
}

/* ===========================================================
   Dashboard + Members listing (added in 1.7.0)
   =========================================================== */

/* ---- Dashboard header ---- */
.balm-dash-header {
	background: #fff;
	border: 1px solid #e3e6ec;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 24px;
	box-shadow: 0 8px 30px rgba(31, 58, 95, 0.07);
}
.balm-cover {
	height: 180px;
	background: linear-gradient(135deg, #1f3a5f 0%, #2d5a8e 100%);
	background-size: cover;
	background-position: center;
	position: relative;
}
.balm-cover-form {
	position: absolute;
	bottom: 12px;
	right: 14px;
}
.balm-cover-form .balm-cover-upload {
	background: rgba(0,0,0,0.55);
	color: #fff;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
}
.balm-cover-form input[type="file"] {
	display: none;
}
.balm-cover-delete {
	position: absolute;
	bottom: 12px;
	right: 160px;
}
.balm-cover-delete button {
	background: rgba(160,25,25,0.85);
	color: #fff;
	border: none;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.balm-dash-id {
	display: flex;
	gap: 20px;
	align-items: flex-end;
	padding: 0 26px 22px;
	margin-top: -52px;
	position: relative;
}
.balm-avatar-wrap {
	position: relative;
	width: 110px;
	height: 110px;
}
.balm-avatar {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.balm-avatar-upload {
	position: absolute;
	bottom: 4px;
	right: 4px;
	background: #1f3a5f;
	color: #fff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 2px solid #fff;
	font-size: 14px;
}
.balm-avatar-upload input[type="file"] {
	display: none;
}
.balm-dash-name {
	flex: 1;
	padding-bottom: 6px;
}
.balm-dash-name h2 {
	margin: 0 0 4px;
	color: #1f2430;
	font-size: 22px;
}
.balm-dash-meta {
	margin: 0;
	font-size: 14px;
	color: #6a7384;
	display: flex;
	gap: 10px;
	align-items: center;
}
.balm-status-badge {
	font-size: 11px;
	padding: 3px 9px;
	border-radius: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.balm-status-pending { background: #fff6d6; color: #8a6d00; }
.balm-status-approved { background: #dff5e4; color: #0a6b2e; }
.balm-status-rejected { background: #fbe0e0; color: #a01919; }

.balm-doc-list {
	list-style: none;
	margin: 6px 0 12px;
	padding: 0;
	font-size: 14px;
}
.balm-doc-list li {
	padding: 6px 0;
	color: #2c3445;
	border-bottom: 1px dashed #e7eaf0;
}

/* ---- Members listing filters ---- */
.balm-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-top: 16px;
}
.balm-filter label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #6a7384;
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.balm-filter input,
.balm-filter select {
	width: 100%;
	padding: 9px 12px;
	font-size: 14px;
	border: 1px solid #d3d8e0;
	border-radius: 6px;
	background: #fbfcfd;
}
.balm-filter input:focus,
.balm-filter select:focus {
	outline: none;
	border-color: #1f3a5f;
	background: #fff;
}
.balm-filter-actions {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}
.balm-filter-btn {
	margin: 0;
	padding: 10px 18px;
	font-size: 14px;
	width: auto;
}
.balm-filter-clear {
	font-size: 13px;
	color: #6a7384;
	text-decoration: underline;
	padding: 10px 4px;
}
.balm-results-count {
	margin: 16px 0 12px;
	font-size: 14px;
	color: #2c3445;
	font-weight: 600;
}

/* ---- Member cards grid ---- */
.balm-member-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}
.balm-member-card {
	background: #fff;
	border: 1px solid #e3e6ec;
	border-radius: 10px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 4px 14px rgba(31, 58, 95, 0.05);
	transition: transform .15s, box-shadow .15s;
}
.balm-member-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(31, 58, 95, 0.12);
}
.balm-member-cover {
	height: 80px;
	background: linear-gradient(135deg, #1f3a5f 0%, #2d5a8e 100%);
	background-size: cover;
	background-position: center;
}
.balm-member-photo {
	position: absolute;
	top: 38px;
	left: 18px;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	border: 3px solid #fff;
	object-fit: cover;
	background: #fff;
}
.balm-member-info {
	padding: 50px 18px 18px;
}
.balm-member-info h3 {
	margin: 0 0 4px;
	font-size: 17px;
	color: #1f2430;
}
.balm-member-biz {
	margin: 0 0 6px;
	font-size: 13.5px;
	color: #1f3a5f;
	font-weight: 600;
}
.balm-member-loc {
	margin: 0 0 8px;
	font-size: 13px;
	color: #6a7384;
}
.balm-member-contact {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
}
.balm-member-contact a {
	color: #1f3a5f;
	text-decoration: none;
}
.balm-member-contact a:hover {
	color: #b6973f;
	text-decoration: underline;
}

@media (max-width: 520px) {
	.balm-dash-id {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.balm-cover-delete {
		right: 14px;
		bottom: 50px;
	}
}

/* ===========================================================
   Social links (added in 1.8.0)
   =========================================================== */
.balm-section-title {
	margin: 28px 0 10px;
	padding-top: 18px;
	border-top: 1px solid #e7eaf0;
	font-size: 16px;
	font-weight: 700;
	color: #1f3a5f;
}
.balm-section-hint {
	font-weight: 400;
	font-size: 13px;
	color: #8b93a3;
	margin-left: 6px;
}

/* Social links on member cards — icon + text pill style */
.balm-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #f0f1f4;
}
.balm-social {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px 5px 8px;
	border-radius: 20px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .12s, opacity .12s;
	line-height: 1;
}
.balm-social:hover {
	transform: translateY(-1px);
	opacity: 0.92;
	text-decoration: none;
}
.balm-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.balm-social-label {
	display: inline;
}
.balm-social-facebook  { background: #1877f2; }
.balm-social-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.balm-social-linkedin  { background: #0a66c2; }

/* ===========================================================
   Nav links between pages (added in 1.9.0)
   =========================================================== */
.balm-nav-links {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid #e7eaf0;
	text-align: center;
	font-size: 13.5px;
	color: #6a7384;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	justify-content: center;
}
.balm-nav-links a {
	color: #1f3a5f;
	font-weight: 600;
	text-decoration: underline;
}
.balm-nav-links a:hover {
	color: #b6973f;
}
