/* BN Membres — public account area */

.bnmem-account {
	--bnmem-border: rgba(0, 0, 0, 0.14);
	--bnmem-muted: #5f6368;
	--bnmem-soft: rgba(0, 0, 0, 0.04);
	--bnmem-accent: #2271b1;
	--bnmem-accent-hover: #135e96;
	--bnmem-danger: #b32d2e;
	--bnmem-radius: 8px;

	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	color: inherit;
	font-size: 0.95rem;
	line-height: 1.55;
}

.bnmem-account *,
.bnmem-account *::before,
.bnmem-account *::after {
	box-sizing: border-box;
}

.bnmem-account a:not(.bnmem-button) {
	text-decoration: none;
}

.bnmem-account a:not(.bnmem-button):hover,
.bnmem-account a:not(.bnmem-button):focus {
	text-decoration: underline;
}

/* Header ------------------------------------------------------------------ */

.bnmem-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	background: var(--bnmem-soft);
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
}

.bnmem-header-avatar img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.bnmem-header-text {
	min-width: 0;
}

.bnmem-title {
	margin: 0 0 0.25rem;
	padding: 0;
	font-size: 1.35rem;
	line-height: 1.25;
}

.bnmem-identity {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.bnmem-email {
	margin: 0.15rem 0 0;
	color: var(--bnmem-muted);
	font-size: 0.9rem;
	overflow-wrap: anywhere;
}

/* Tabs -------------------------------------------------------------------- */

.bnmem-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 1rem;
	padding: 0;
	border-bottom: 1px solid var(--bnmem-border);
}

.bnmem-tab {
	display: inline-block;
	padding: 0.55rem 0.9rem;
	color: inherit;
	border-bottom: 2px solid transparent;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bnmem-tab:hover,
.bnmem-tab:focus {
	color: var(--bnmem-accent);
	text-decoration: none;
}

.bnmem-tab-badge {
	display: inline-block;
	min-width: 1.6em;
	margin-left: 0.4em;
	padding: 0.05em 0.4em;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	vertical-align: middle;
}

.bnmem-tab.is-active {
	color: var(--bnmem-accent);
	border-bottom-color: var(--bnmem-accent);
}

/* Panel ------------------------------------------------------------------- */

.bnmem-panel {
	padding: 1.25rem;
	background: #fff;
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
}

.bnmem-panel-title {
	margin: 0 0 0.85rem;
	padding: 0 0 0.35rem;
	font-size: 1.1rem;
	line-height: 1.3;
	border-bottom: 2px solid var(--bnmem-accent);
}

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

.bnmem-form {
	margin: 0;
}

.bnmem-field {
	margin: 0 0 1rem;
}

.bnmem-field > label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.bnmem-field input[type="text"],
.bnmem-field input[type="email"],
.bnmem-field input[type="url"],
.bnmem-field input[type="password"],
.bnmem-field input[type="file"],
.bnmem-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.7rem;
	background: #fff;
	color: inherit;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	font: inherit;
	line-height: 1.4;
}

.bnmem-field input[type="file"] {
	padding: 0.45rem;
}

.bnmem-field textarea {
	resize: vertical;
	min-height: 120px;
}

.bnmem-field input:focus,
.bnmem-field textarea:focus {
	border-color: var(--bnmem-accent);
	box-shadow: 0 0 0 1px var(--bnmem-accent);
	outline: none;
}

.bnmem-description {
	display: block;
	margin-top: 0.3rem;
	color: var(--bnmem-muted);
	font-size: 0.85rem;
}

.bnmem-required {
	color: var(--bnmem-danger);
}

.bnmem-form-actions {
	margin: 1rem 0 0;
}

/* Buttons ----------------------------------------------------------------- */

.bnmem-button {
	display: inline-block;
	padding: 0.55rem 1rem;
	background: var(--bnmem-accent);
	color: #fff;
	border: 1px solid var(--bnmem-accent);
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bnmem-button:hover,
.bnmem-button:focus {
	background: var(--bnmem-accent-hover);
	border-color: var(--bnmem-accent-hover);
	color: #fff;
	text-decoration: none;
}

.bnmem-button-secondary {
	background: transparent;
	color: var(--bnmem-accent);
}

.bnmem-button-secondary:hover,
.bnmem-button-secondary:focus {
	background: var(--bnmem-soft);
	color: var(--bnmem-accent-hover);
}

.bnmem-inline-form {
	margin: 0 0 1rem;
}

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

.bnmem-notice {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 6px;
}

.bnmem-notice-success {
	background: #edfaef;
	border-color: #68de7c;
	color: #0a4b13;
}

.bnmem-notice-error {
	background: #fcf0f1;
	border-color: #f0a8ad;
	color: #8a1f24;
}

/* Avatar ------------------------------------------------------------------ */

.bnmem-avatar-current {
	margin-bottom: 0.75rem;
}

.bnmem-avatar-current img {
	display: block;
	width: 128px;
	height: 128px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--bnmem-border);
}

.bnmem-avatar-preview {
	display: block;
	width: 96px;
	height: 96px;
	margin-top: 0.6rem;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--bnmem-border);
}

.bnmem-avatar-preview[hidden] {
	display: none;
}

/* Messaging cards --------------------------------------------------------- */

.bnmem-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.75rem;
	margin: 0 0 1rem;
}

.bnmem-card {
	padding: 0.9rem;
	background: var(--bnmem-soft);
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
}

.bnmem-card-label {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--bnmem-muted);
	font-size: 0.85rem;
}

.bnmem-card-value {
	display: block;
	font-size: 1.8rem;
	line-height: 1.1;
}

.bnmem-card-link {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 600;
}

/* Footer ------------------------------------------------------------------ */

.bnmem-footer {
	margin-top: 1rem;
	color: var(--bnmem-muted);
	font-size: 0.9rem;
}

.bnmem-footer p {
	margin: 0;
}

.bnmem-footer span {
	margin: 0 0.2rem;
}

/* Guest view -------------------------------------------------------------- */

.bnmem-guest {
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
}

.bnmem-intro {
	margin: 0 0 1rem;
	color: var(--bnmem-muted);
}

.bnmem-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 600px) {
	.bnmem-header {
		flex-direction: column;
		text-align: center;
	}

	.bnmem-header-avatar img {
		width: 80px;
		height: 80px;
	}

	.bnmem-panel {
		padding: 1rem;
	}

	.bnmem-tab {
		padding: 0.5rem 0.65rem;
	}
}

/* Asgaros signature ------------------------------------------------------- */

.bnmem-signature {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
}

.bnmem-signature legend {
	padding: 0 0.35rem;
	font-weight: 600;
}

.bnmem-signature .bnmem-field:last-child {
	margin-bottom: 0;
}

/* Authentication screens -------------------------------------------------- */

.bnmem-auth-card {
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--bnmem-border);
	border-radius: var(--bnmem-radius);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.bnmem-auth .bnmem-title {
	margin-bottom: 0.35rem;
	text-align: center;
	border-bottom: 0;
	padding-bottom: 0;
}

.bnmem-auth .bnmem-intro {
	margin-bottom: 1.1rem;
	text-align: center;
}

.bnmem-auth .bnmem-form-actions {
	margin-top: 1.1rem;
}

.bnmem-auth .bnmem-form-actions .bnmem-button {
	width: 100%;
}

.bnmem-auth-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem 1rem;
	margin: 1rem 0 0;
	font-size: 0.9rem;
	text-align: center;
}

.bnmem-checkbox {
	margin: 0 0 0.5rem;
}

.bnmem-checkbox label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
}

.bnmem-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (max-width: 520px) {
	.bnmem-auth-card {
		padding: 1.1rem;
	}
}

/* Custom profile fields ---------------------------------------------------- */

.bnmem-pf-fields {
	margin: 1.5rem 0 1rem;
	padding: 1rem 1rem 0.25rem;
	border: 1px solid var(--bnmem-border);
	border-radius: 8px;
}

.bnmem-pf-legend {
	padding: 0 0.4rem;
	font-weight: 600;
}

.bnmem-pf-field > .bnmem-pf-label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.bnmem-pf-field select {
	width: 100%;
	max-width: 100%;
	padding: 0.55rem 0.7rem;
	background: #fff;
	color: inherit;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	font: inherit;
}

.bnmem-pf-choices {
	margin: 0;
	padding: 0;
	border: 0;
}

.bnmem-pf-choices label {
	display: block;
	margin: 0 0 0.35rem;
	font-weight: 400;
}

.bnmem-pf-field input[type="checkbox"],
.bnmem-pf-field input[type="radio"] {
	margin-right: 0.35rem;
}

.bnmem-pf-visibility {
	display: block;
	margin-top: 0.25rem;
	color: var(--bnmem-muted);
	font-size: 0.85em;
}

.bnmem-pf-error {
	display: block;
	margin-top: 0.3rem;
	color: var(--bnmem-danger);
	font-weight: 600;
}

.bnmem-pf-has-error input,
.bnmem-pf-has-error select,
.bnmem-pf-has-error textarea {
	border-color: var(--bnmem-danger);
}

/* Terms of use ------------------------------------------------------------- */

.bnmem-terms {
	margin: 0 0 1rem;
}

.bnmem-terms-title {
	margin: 0 0 0.25rem;
}

.bnmem-terms-meta,
.bnmem-terms-policy {
	color: var(--bnmem-muted);
	font-size: 0.9em;
}

.bnmem-terms-content {
	max-height: 22rem;
	overflow-y: auto;
	padding: 0.75rem 1rem;
	background: #fff;
	border: 1px solid var(--bnmem-border);
	border-radius: 6px;
}

.bnmem-terms-content:focus {
	outline: 2px solid var(--bnmem-accent);
	outline-offset: 2px;
}

.bnmem-terms-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1rem 0;
}

.bnmem-terms-accepted {
	color: var(--bnmem-muted);
	font-size: 0.9em;
}
