/*
 * BVA Ledenomgeving
 * Kleuren en afronding aanpassen? Overschrijf deze variabelen in het thema:
 *   .bva-portal, .bva-auth { --bva-accent: #...; }
 * Lettertype en kopstijlen worden van het thema overgenomen.
 */
.bva-portal,
.bva-auth {
	--bva-accent: #7a4e2d;
	--bva-accent-hover: #5e3b21;
	--bva-accent-contrast: #fff;
	--bva-text: inherit;
	--bva-muted: #6b6560;
	--bva-border: #e4ded6;
	--bva-soft: #f7f4f0;
	--bva-card: #fff;
	--bva-danger: #b32d2e;
	--bva-success: #1f7a3a;
	--bva-radius: 8px;
	--bva-gap: 1.5rem;
	color: var(--bva-text);
	box-sizing: border-box;
}
.bva-portal *,
.bva-auth * { box-sizing: border-box; }

/* ---------- Kaarten, knoppen, meldingen ---------- */
.bva-card {
	background: var(--bva-card);
	border: 1px solid var(--bva-border);
	border-radius: var(--bva-radius);
	padding: 1.5rem;
}
.bva-card h3 { margin: 0 0 1rem; font-size: 1.2em; }
.bva-card h4 { margin: 1.5rem 0 .5rem; }
.bva-card--highlight { background: var(--bva-soft); border-left: 4px solid var(--bva-accent); }
.bva-card--highlight > *:last-child { margin-bottom: 0; }

/*
 * Knoppen: kleur, vorm en lettertype komen van het thema (button / input[type=submit]).
 * De plugin regelt alleen de uitlijning.
 */
.bva-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; cursor: pointer; text-decoration: none; }
.bva-btn-form { display: inline-block; margin: 0; }
.bva-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

.bva-link { color: var(--bva-accent); }

/* Geen onderstreping van links in de ledenomgeving (ook niet als het thema dat wel doet). */
.bva-portal a,
.bva-portal a:hover,
.bva-portal a:focus,
.bva-auth a,
.bva-auth a:hover,
.bva-auth a:focus,
.bva-portal a *,
.bva-auth a * {
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	background-image: none !important;
}
.bva-link--danger { color: var(--bva-danger); }
.bva-muted { color: var(--bva-muted); }
.bva-hint { color: var(--bva-muted); font-size: .9em; font-weight: 400; }
.bva-empty { color: var(--bva-muted); font-style: italic; }
.bva-tag { display: inline-block; padding: .2em .7em; border-radius: 999px; background: var(--bva-soft); border: 1px solid var(--bva-border); font-size: .9em; }

.bva-notice {
	padding: .8rem 1rem;
	border-radius: calc(var(--bva-radius) / 2);
	margin: 0 0 1rem;
	background: #eef4fb;
	border-left: 4px solid #2271b1;
}
.bva-notice--error { background: #fcf0f1; border-color: var(--bva-danger); }
.bva-notice--success { background: #edfaef; border-color: var(--bva-success); }

/* ---------- Formulieren ---------- */
.bva-form label,
.bva-auth label { display: block; font-weight: 600; margin-bottom: .35rem; }
.bva-form input[type=text],
.bva-form input[type=password],
.bva-form input[type=email],
.bva-auth input[type=text],
.bva-auth input[type=password] {
	width: 100%;
	padding: .7em .8em;
	border: 1px solid #cfc8bf;
	border-radius: calc(var(--bva-radius) / 2);
	font: inherit;
	background: #fff;
}
.bva-form input:focus,
.bva-auth input:focus { outline: 2px solid var(--bva-accent); outline-offset: 1px; border-color: var(--bva-accent); }
.bva-form--narrow { max-width: 420px; }
.bva-auth .login-remember label { display: flex; align-items: center; gap: .5em; font-weight: 400; }

/* ACF-formulieren iets rustiger */
.bva-portal .acf-form .acf-fields > .acf-field { border-top: 0; padding: 10px 0; }
.bva-portal .acf-form .acf-fields > .acf-field[data-width] { padding-right: 12px; }
.bva-portal .acf-form .acf-label label { font-weight: 600; }
.bva-portal .acf-form-submit { margin-top: 1rem; display: flex; align-items: center; gap: 1rem; }
.bva-portal .acf-form .acf-image-uploader img { width: 120px; height: 120px; max-width: 120px; object-fit: cover; border-radius: 50%; }

/* ---------- Inloggen ---------- */
.bva-auth { max-width: 460px; margin: 2rem auto; }
.bva-card--auth { padding: 2rem; }
.bva-auth__title { margin: 0 0 1.25rem; font-size: 1.5em; }
.bva-auth__meta { margin: 1rem 0 0; }
.bva-auth form p { margin: 0 0 1rem; }
.bva-auth #wp-submit { width: 100%; cursor: pointer; }

/* ---------- Dashboard-layout ---------- */
.bva-portal {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	margin: 2rem 0;
}
.bva-portal__main { display: grid; gap: var(--bva-gap); min-width: 0; }
.bva-head h2 { margin: 0; }
.bva-head p { margin: .35rem 0 0; }

.bva-portal__nav {
	position: sticky;
	top: 2rem;
	background: var(--bva-soft);
	border-radius: var(--bva-radius);
	padding: 1.25rem 1rem;
}
.bva-nav-user { display: flex; align-items: center; gap: .75rem; padding: 0 .5rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--bva-border); }
.bva-nav-user strong { display: block; line-height: 1.25; }
.bva-nav-user span { display: block; font-size: .85em; color: var(--bva-muted); }
.bva-portal__nav ul { list-style: none; margin: 0; padding: 0; }
.bva-portal__nav li { margin: 0; }
.bva-portal__nav a {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .6rem .75rem;
	border-radius: calc(var(--bva-radius) / 1.5);
	color: inherit;
	text-decoration: none;
}
.bva-portal__nav a:hover { background: rgba(0, 0, 0, .04); }
.bva-portal__nav a.is-active { background: var(--bva-accent); color: var(--bva-accent-contrast); font-weight: 600; }
.bva-portal__nav .dashicons { flex: none; }
.bva-nav-bottom { margin-top: .5rem !important; padding-top: .5rem; border-top: 1px solid var(--bva-border); }

/* Profielfoto altijd rond, ook bij een niet-vierkante foto of thema-CSS als img { height: auto } */
.bva-portal img.bva-avatar {
	display: block;
	flex: none;
	width: 56px !important;
	height: 56px !important;
	max-width: none;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center 30%;
	border-radius: 50% !important;
}
.bva-portal img.bva-avatar--lg { width: 120px !important; height: 120px !important; }

/* Overzicht */
.bva-profile-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.bva-profile-card__body > *:last-child { margin-bottom: 0; }
.bva-profile-card h3 { margin-bottom: .25rem; }
.bva-profile-card p { margin: 0 0 .6rem; }
.bva-inline-dl { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: .75rem 0; }
.bva-inline-dl dt { font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--bva-muted); }
.bva-inline-dl dd { margin: 0; font-weight: 600; }


/* Lijsten */
.bva-dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0 0 1rem; }
.bva-dl dt { font-weight: 600; }
.bva-dl dd { margin: 0; }
.bva-list { margin: 0 0 1rem; padding-left: 1.2em; }
.bva-list li { margin-bottom: .4rem; }

.bva-pubs,
.bva-docs { list-style: none; margin: 0; padding: 0; }
.bva-pubs li,
.bva-docs li { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--bva-border); }
.bva-pubs li:last-child,
.bva-docs li:last-child { border-bottom: 0; }
.bva-pubs li > div:first-child { flex: 1; }
.bva-pubs .bva-muted,
.bva-docs .bva-muted { display: block; font-size: .9em; margin-top: .15rem; }
.bva-docs p { margin: .25rem 0 0; }
.bva-docs .dashicons { color: var(--bva-accent); margin-top: .1rem; }
.bva-actions { white-space: nowrap; display: flex; gap: .75rem; }

/* Tabel */
.bva-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.bva-filter { display: flex; align-items: center; gap: .5rem; margin: 0; }
.bva-filter label { margin: 0; font-weight: 600; }
.bva-filter select { padding: .45em .6em; border: 1px solid #cfc8bf; border-radius: 4px; font: inherit; }
.bva-table-wrap { overflow-x: auto; }
.bva-table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0; }
.bva-table th,
.bva-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--bva-border); text-align: left; vertical-align: top; }
.bva-table thead th { background: var(--bva-soft); font-weight: 600; white-space: nowrap; }
.bva-table tfoot th { border-bottom: 0; border-top: 2px solid var(--bva-border); }
.bva-table .num { text-align: right; white-space: nowrap; }
.bva-table--compact { max-width: 420px; }

/* ---------- Tablet / mobiel ---------- */
@media (max-width: 900px) {
	.bva-portal { grid-template-columns: 1fr; gap: 1.25rem; }
	.bva-portal__nav { position: static; padding: .75rem; }
	.bva-nav-user { padding-bottom: .75rem; }
	.bva-portal__nav ul { display: flex; gap: .25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.bva-portal__nav a { white-space: nowrap; padding: .5rem .7rem; }
	.bva-nav-bottom { margin: 0 0 0 auto !important; padding: 0; border: 0; }
}
@media (max-width: 600px) {
	.bva-card,
	.bva-card--auth { padding: 1.1rem; }
		.bva-profile-card { flex-direction: column; }
	.bva-dl { grid-template-columns: 1fr; }
	.bva-dl dd { margin-bottom: .5rem; }
	.bva-portal .acf-form .acf-fields > .acf-field[data-width] { width: 100% !important; padding-right: 0; }

	/* Tabel als kaartjes */
	.bva-table thead { display: none; }
	.bva-table tbody tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--bva-border); }
	.bva-table tbody td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .2rem 0; text-align: right; }
	.bva-table tbody td::before { content: attr(data-label); font-weight: 600; text-align: left; }
	.bva-table tbody td:empty { display: none; }
	.bva-table tbody td.bva-actions { justify-content: flex-end; padding-top: .4rem; }
	.bva-table tfoot tr { display: flex; justify-content: space-between; }
	.bva-table tfoot th[colspan="2"] { display: none; }
	.bva-table--compact tbody td::before { content: none; }
}

/* ---------- Blok Tweestapsverificatie (Kadence Security) ---------- */
.bva-security > :not(h3):not(.bva-muted) { border-radius: var(--bva-radius); }
.bva-security button,
.bva-security .button,
.bva-security input[type=submit] { border-radius: calc(var(--bva-radius) / 1.5) !important; }
.bva-security button:hover,
.bva-security button:focus-visible { filter: brightness(.9); }
.bva-security a { color: var(--bva-accent); }

/* ---------- Sterktemeter wachtwoord ---------- */
.bva-pw-meter { display: flex; align-items: center; gap: .75rem; margin: -.5rem 0 1rem; min-height: 1.2em; }
.bva-pw-meter__bar { flex: 0 0 160px; height: 6px; border-radius: 3px; background: var(--bva-border); position: relative; overflow: hidden; }
.bva-pw-meter__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--bva-pw, 0%); background: var(--bva-pw-color, #b32d2e); transition: width .2s, background .2s; }
.bva-pw-meter__label { font-size: .9em; color: var(--bva-muted); }

/* ---------- Oogje: wachtwoord tonen ---------- */
.bva-pw-wrap { position: relative; display: block; }
.bva-pw-wrap input[type=password],
.bva-pw-wrap input[type=text] { padding-right: 3rem !important; width: 100%; }
/* Losgekoppeld van de knopstijl van het thema. */
.bva-portal .bva-pw-toggle,
.bva-auth .bva-pw-toggle {
	position: absolute; top: 50%; right: .35rem; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 2.4rem; height: 2.4rem; margin: 0; padding: 0 !important;
	background: transparent !important; border: 0 !important; border-radius: 50% !important; box-shadow: none !important;
	color: var(--bva-muted) !important; cursor: pointer; line-height: 1;
}
.bva-portal .bva-pw-toggle:hover,
.bva-auth .bva-pw-toggle:hover { color: var(--bva-text, #222) !important; background: rgba(0, 0, 0, .05) !important; }
.bva-portal .bva-pw-toggle:focus-visible,
.bva-auth .bva-pw-toggle:focus-visible { outline: 2px solid var(--bva-accent); outline-offset: 1px; }
.bva-pw-toggle .dashicons { font-size: 20px; width: 20px; height: 20px; }

/* ---------- Weergave met "Bewerken"-knop (Mijn werkervaring) ---------- */
.bva-card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bva-card__head h3 { margin: 0; }
.bva-dl--wide { grid-template-columns: minmax(160px, max-content) 1fr; }
.bva-dl--answers { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .6rem 1.5rem; }
.bva-dl--answers dt { font-weight: 400; }
.bva-dl--answers dd { font-weight: 600; }
.bva-view__block { margin-top: 1.25rem; }
.bva-view__block h4 { margin: 0 0 .35rem; font-size: 1em; }
.bva-view__block p { margin: 0 0 .6rem; }
.bva-portal .acf-radio-list.acf-hl li { margin-right: 1.25rem; }
@media (max-width: 600px) {
	.bva-dl--answers { grid-template-columns: 1fr; }
	.bva-dl--answers dd { margin-bottom: .5rem; }
}

/* ACF-formulieren: lettertype en invoervelden van de site */
.bva-portal .acf-form input[type=text],
.bva-portal .acf-form input[type=url],
.bva-portal .acf-form input[type=email],
.bva-portal .acf-form input[type=number],
.bva-portal .acf-form textarea,
.bva-form input[type=email] {
	font: inherit; padding: .6em .75em; border: 1px solid #cfc8bf; border-radius: calc(var(--bva-radius) / 2); background: #fff; box-sizing: border-box; width: 100%;
}
.bva-portal .acf-form textarea { line-height: 1.5; }
.bva-portal .acf-form .acf-checkbox-list label,
.bva-portal .acf-form .acf-radio-list label { font-size: inherit; display: inline-flex; align-items: center; gap: .5em; cursor: pointer; }
.bva-portal .acf-form .acf-checkbox-list li,
.bva-portal .acf-form .acf-radio-list li { font-size: inherit; line-height: 1.6; }
.bva-portal .acf-form .acf-checkbox-list input,
.bva-portal .acf-form .acf-radio-list input { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--bva-accent); }
.bva-portal .acf-form .acf-label .description,
.bva-portal .acf-form p.description { font-size: .9em; color: var(--bva-muted); }
