/**
 * Vormgeving klantaccount — TIFA WeFact
 *
 * Eén vormtaal voor het hele account: aanvragen, bestellingen, offertes en
 * facturen staan in dezelfde lijst met uitgelijnde kolommen.
 * Rechte hoeken, één knopsysteem, accentkleur als variabele.
 */

.woocommerce-account {
	--wfk-accent: #a8873c;
	--wfk-accent-dark: #8a6e2f;
	--wfk-ink: #161513;
	--wfk-muted: #6b6660;
	--wfk-line: #ddd8ce;
	--wfk-line-soft: #ebe7e0;
	--wfk-surface: #ffffff;
	--wfk-surface-alt: #faf8f4;
}

/* ==================================================================
 * Navigatie — één aaneengesloten blok
 * ============================================================== */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li::before,
.woocommerce-account .woocommerce-MyAccount-navigation ul li::marker {
	content: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 15px 20px;
	border: 1px solid var(--wfk-line);
	border-radius: 0;
	background: var(--wfk-surface);
	color: var(--wfk-ink);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:focus-visible {
	background: var(--wfk-surface-alt);
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:focus-visible {
	outline: 2px solid var(--wfk-accent);
	outline-offset: -2px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	z-index: 1;
	background: var(--wfk-accent);
	border-color: var(--wfk-accent);
	color: #fff;
}

/* Afmelden staat los onder het blok. */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
	margin-top: 6px;
	border-color: transparent;
	background: transparent;
	color: var(--wfk-muted);
	font-weight: 400;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: transparent;
	color: var(--wfk-ink);
	text-decoration: underline;
}

/* ==================================================================
 * Knoppen
 * ============================================================== */

.woocommerce-account .wfk-btn,
.woocommerce-account a.wfk-btn,
.woocommerce-account button.wfk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 11px 20px;
	border: 1px solid var(--wfk-ink);
	border-radius: 0;
	background: var(--wfk-ink);
	color: #fff;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.woocommerce-account .wfk-btn:hover,
.woocommerce-account a.wfk-btn:hover,
.woocommerce-account .wfk-btn:focus-visible {
	background: #000;
	border-color: #000;
	color: #fff;
	text-decoration: none;
}

.woocommerce-account .wfk-btn:focus-visible {
	outline: 2px solid var(--wfk-accent);
	outline-offset: 2px;
}

.woocommerce-account .wfk-btn--secondary,
.woocommerce-account a.wfk-btn--secondary {
	background: transparent;
	border-color: var(--wfk-accent);
	color: var(--wfk-accent-dark);
}

.woocommerce-account .wfk-btn--secondary:hover,
.woocommerce-account a.wfk-btn--secondary:hover {
	background: var(--wfk-accent);
	border-color: var(--wfk-accent);
	color: #fff;
}

/* ==================================================================
 * Secties
 * ============================================================== */

.wfk-section + .wfk-section {
	margin-top: 3em;
}

.wfk-section__title {
	margin: 0 0 0.15em;
	line-height: 1.2;
}

.wfk-section__intro {
	margin: 0 0 1.25em;
	color: var(--wfk-muted);
}

/* ==================================================================
 * Lijst met uitgelijnde kolommen
 *
 * De kolomindeling staat op één plek, zodat kop en rijen niet uit
 * elkaar kunnen lopen.
 * ============================================================== */

.wfk-list__head,
.wfk-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 140px 110px 120px 170px;
	align-items: center;
	gap: 16px;
}

.wfk-list__head {
	padding: 0 18px 10px;
	color: var(--wfk-muted);
	font-size: 0.88em;
	font-weight: 600;
}

.wfk-list__head .wfk-col-actions {
	grid-column: span 2;
}

.wfk-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wfk-card {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid var(--wfk-line-soft);
	border-radius: 0;
	background: var(--wfk-surface);
	list-style: none;
}

.wfk-card::before,
.wfk-card::marker {
	content: none;
}

.wfk-card__main {
	min-width: 0;
}

.wfk-card__code {
	display: block;
	color: var(--wfk-accent-dark);
	font-weight: 700;
	word-break: break-word;
}

.wfk-card__code a {
	color: inherit;
	text-decoration: none;
}

.wfk-card__code a:hover {
	text-decoration: underline;
}

.wfk-card__meta {
	display: block;
	margin-top: 4px;
	color: var(--wfk-muted);
	font-size: 0.9em;
}

.wfk-card__amount {
	font-weight: 700;
	white-space: nowrap;
}

/* Elke actie heeft een eigen kolom. Ontbreekt er een, dan blijft de cel
   leeg en blijven de knoppen eronder netjes uitgelijnd. */
.wfk-card__action {
	display: flex;
	min-width: 0;
}

.wfk-card__action .wfk-btn {
	width: 100%;
}

/* ==================================================================
 * Status
 * ============================================================== */

.wfk-status {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 0;
	font-size: 0.82em;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
}

.wfk-status--open {
	background: #f7edd6;
	color: #765611;
}

.wfk-status--done {
	background: #e0efe3;
	color: #1f5a34;
}

.wfk-status--closed {
	background: #eceae6;
	color: #5c5850;
}

.wfk-status--attention {
	background: #f7e0dd;
	color: #85291f;
}

/* ==================================================================
 * Lege staat en paginering
 * ============================================================== */

.wfk-empty {
	margin: 0;
	padding: 24px;
	border: 1px dashed var(--wfk-line);
	border-radius: 0;
	background: var(--wfk-surface-alt);
	color: var(--wfk-muted);
}

.wfk-pagination {
	display: flex;
	gap: 8px;
	margin-top: 1.5em;
}

/* ==================================================================
 * Smallere schermen: kolommen vervallen, alles stapelt
 * ============================================================== */

@media (max-width: 900px) {

	.wfk-list__head {
		display: none;
	}

	.wfk-card {
		grid-template-columns: minmax(0, 1fr) auto auto;
		gap: 10px 16px;
	}

	.wfk-card__main {
		grid-column: 1 / -1;
	}

	.wfk-card__action:empty {
		display: none;
	}
}

@media (max-width: 560px) {

	.wfk-card {
		grid-template-columns: 1fr;
	}

	.wfk-card__status,
	.wfk-card__amount {
		justify-self: start;
	}

	.wfk-card__action {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {

	.woocommerce-account .woocommerce-MyAccount-navigation ul li a,
	.woocommerce-account .wfk-btn {
		transition: none;
	}
}

/* ==================================================================
 * Teller in het menu
 * ============================================================== */

.woocommerce-account .woocommerce-MyAccount-navigation .wfk-count {
	display: inline-block;
	min-width: 22px;
	margin-left: auto;
	padding: 1px 7px;
	background: var(--wfk-surface-alt);
	border: 1px solid var(--wfk-line);
	color: var(--wfk-muted);
	font-size: 0.78em;
	font-weight: 700;
	text-align: center;
	vertical-align: 1px;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active .wfk-count {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

/* ==================================================================
 * Dashboard
 * ============================================================== */

.wfk-dashboard__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.wfk-dashboard__subtitle {
	margin: 2em 0 0.8em;
}

.wfk-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px;
	margin-bottom: 0.5em;
}

.wfk-tile {
	display: flex;
	flex-direction: column;
	padding: 18px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface);
	color: var(--wfk-ink);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.wfk-tile:hover {
	border-color: var(--wfk-accent);
	text-decoration: none;
}

.wfk-tile__label {
	/* Twee regels ruimte, zodat de cijfers in alle tegels op dezelfde
	   hoogte staan, ook als het ene label langer is dan het andere. */
	display: block;
	min-height: 2.6em;
	font-weight: 600;
	line-height: 1.3;
}

.wfk-tile__number {
	margin: 4px 0 10px;
	color: var(--wfk-accent-dark);
	font-size: 2.4em;
	font-weight: 700;
	line-height: 1;
}

.wfk-tile__link {
	color: var(--wfk-accent-dark);
	font-size: 0.9em;
	font-weight: 600;
	margin-top: auto;
}

.wfk-cards--compact .wfk-card {
	padding: 12px 18px;
}

/* ==================================================================
 * Detailpagina bestelling of aanvraag
 * ============================================================== */

.wfk-order-head {
	margin-bottom: 1.5em;
}

.wfk-order-head__title {
	margin: 0 0 0.2em;
	line-height: 1.2;
}

.wfk-order-head__meta {
	margin: 0 0 0.7em;
	color: var(--wfk-muted);
}

.wfk-order-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	align-items: start;
	gap: 16px;
}

.wfk-order-items {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.wfk-panel {
	padding: 20px 22px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface);
}

.wfk-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.wfk-panel__title {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.25;
}

.wfk-panel__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex: 0 0 auto;
	gap: 3px;
}

.wfk-panel__qty {
	color: var(--wfk-muted);
	font-weight: 700;
	white-space: nowrap;
}

.wfk-panel__price {
	font-weight: 700;
	white-space: nowrap;
}

.wfk-panel__reference {
	margin: 14px 0 0;
	color: var(--wfk-muted);
	font-size: 0.85em;
	word-break: break-all;
}

.wfk-panel__note {
	margin-top: 14px;
	color: var(--wfk-muted);
}

/* Kenmerken en totalen: zelfde ritme, verschillende uitlijning. */

/* Kenmerken: losse regels met optioneel vetgedrukt label (geen vaste
   tabelstructuur — verschillende producttypen kunnen andere velden hebben,
   dus de indeling volgt de brontekst, niet een vast schema). */

.wfk-specs {
	display: block;
}

.wfk-specs__line {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.5;
	word-break: break-word;
}

.wfk-specs__line--description {
	color: var(--wfk-muted);
}

.wfk-specs__label {
	font-weight: 600;
}

/* Totalen blijven een tabelvorm: vaste kolommen, altijd label + bedrag. */

.wfk-totals {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	margin: 0;
	font-size: 0.95em;
}

.wfk-totals dt {
	padding: 10px 0;
	border-top: 1px solid var(--wfk-line-soft);
	font-weight: 600;
}

.wfk-totals dd {
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid var(--wfk-line-soft);
	min-width: 0;
	word-break: break-word;
	text-align: right;
	white-space: nowrap;
}

.wfk-totals dt:first-of-type,
.wfk-totals dd:nth-of-type(1) {
	border-top: 0;
}

.wfk-totals dt.is-total,
.wfk-totals dd.is-total {
	border-top: 2px solid var(--wfk-line);
	padding-top: 14px;
	font-size: 1.15em;
	font-weight: 700;
}

/* Informatievlak, bijvoorbeeld de uitleg bij "Opnieuw aanvragen". */

.wfk-callout {
	margin: 16px 0 0;
	padding: 20px 22px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface-alt);
}

.wfk-callout p {
	margin: 0 0 14px;
	color: var(--wfk-muted);
}

.wfk-callout p:last-child {
	margin-bottom: 0;
}

/* Klantberichten bij een order. */

.wfk-note {
	margin-bottom: 1.5em;
	padding: 18px 22px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface-alt);
}

.wfk-note__title {
	margin: 0 0 0.6em;
	font-size: 1em;
}

.wfk-note__item + .wfk-note__item {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--wfk-line-soft);
}

.wfk-note__date {
	display: block;
	color: var(--wfk-muted);
	font-size: 0.85em;
}

.wfk-note p {
	margin: 0.3em 0 0;
}

/* ==================================================================
 * Adreskaarten
 * ============================================================== */

.wfk-address-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	align-items: stretch;
	gap: 16px;
}

.wfk-address-grid--order {
	margin-top: 16px;
}

.wfk-address {
	display: flex;
	flex-direction: column;
	padding: 20px 22px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface);
}

.wfk-address__title {
	margin: 0 0 0.7em;
	font-size: 1.1em;
	line-height: 1.25;
}

.wfk-address__body {
	flex: 1 1 auto;
	font-style: normal; /* adressen rechtop, niet cursief */
	line-height: 1.7;
}

.wfk-address__body address {
	font-style: normal;
}

.wfk-address__empty {
	color: var(--wfk-muted);
}

.wfk-address__actions {
	margin-top: 18px;
}

/* ==================================================================
 * Smaller scherm
 * ============================================================== */

@media (max-width: 900px) {

	.wfk-order-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Toelichting onder een vastgezet formulierveld. */
.woocommerce-account .wfk-field-note {
	display: block;
	margin-top: 6px;
	color: var(--wfk-muted);
	font-size: 0.9em;
	line-height: 1.5;
}

.woocommerce-account input[readonly] {
	background: var(--wfk-surface-alt);
	cursor: not-allowed;
}

/* ==================================================================
 * Vervolgknoppen buiten het account (bedankpagina)
 *
 * Eigen selector, want de knopstijl hierboven is bewust gescoped op
 * .woocommerce-account en die klasse staat hier niet.
 * ============================================================== */

.wfk-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 1.5em 0 2em;
}

.wfk-actions .wfk-btn,
.wfk-actions a.wfk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 11px 20px;
	border: 1px solid #161513;
	border-radius: 0;
	background: #161513;
	color: #fff;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wfk-actions .wfk-btn:hover,
.wfk-actions a.wfk-btn:hover {
	background: #000;
	border-color: #000;
	color: #fff;
	text-decoration: none;
}

.wfk-actions .wfk-btn--secondary,
.wfk-actions a.wfk-btn--secondary {
	background: transparent;
	border-color: #a8873c;
	color: #8a6e2f;
}

.wfk-actions .wfk-btn--secondary:hover,
.wfk-actions a.wfk-btn--secondary:hover {
	background: #a8873c;
	border-color: #a8873c;
	color: #fff;
}

@media (max-width: 480px) {

	.wfk-actions .wfk-btn {
		flex: 1 1 100%;
	}
}

/* ==================================================================
 * Technische tekening bij een orderregel
 * ============================================================== */

.wfk-panel__body {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	align-items: flex-start;
}

.wfk-panel__specs {
	flex: 1 1 260px;
	min-width: 0;
}

.wfk-drawing {
	flex: 0 0 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	border: 1px solid var(--wfk-line-soft);
	background: var(--wfk-surface-alt);
}

.wfk-drawing img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
}

/* Een echte productfoto mag het vak vullen; een technische tekening heeft
   juist witruimte nodig om leesbaar te blijven, vandaar het onderscheid. */
.wfk-drawing--photo img {
	height: 100%;
	object-fit: cover;
}

@media (max-width: 560px) {

	.wfk-drawing {
		flex: 1 1 100%;
	}

	.wfk-drawing img {
		max-height: 260px;
		margin: 0 auto;
		width: auto;
		max-width: 100%;
	}
}

/* Detailweergave van één offerte of factuur (1.38.0). */
.wfk-back {
	display: inline-block;
	margin-bottom: .5rem;
	text-decoration: none;
}

.wfk-lines {
	list-style: none;
	margin: 0 0 .5rem;
	padding: 0;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.wfk-line {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: .75rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.wfk-line__text {
	flex: 1 1 auto;
	line-height: 1.5;
}

.wfk-line__qty {
	flex: 0 0 auto;
	white-space: nowrap;
	opacity: .7;
}

.wfk-line__amount {
	flex: 0 0 auto;
	min-width: 6rem;
	text-align: right;
	white-space: nowrap;
}

.wfk-lines__note {
	margin: 0 0 1rem;
	font-size: .85em;
	opacity: .7;
}

table.wfk-totals {
	width: auto;
	min-width: 16rem;
	margin: 0 0 1rem auto;
	border: 0;
	border-collapse: collapse;
	table-layout: auto;
}

table.wfk-totals th,
table.wfk-totals td {
	border: 0;
	padding: .25rem 0;
	background: none;
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
}

table.wfk-totals td {
	text-align: right;
	padding-left: 1.5rem;
}

table.wfk-totals tr.wfk-totals__final th,
table.wfk-totals tr.wfk-totals__final td {
	font-weight: 600;
	border-top: 1px solid rgba(0, 0, 0, .12);
	padding-top: .5rem;
}

.wfk-detail__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
}

/* Offerte afwijzen (1.40.0). */
.wfk-decline {
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 4px;
	background: rgba(0, 0, 0, .02);
	max-width: 32rem;
}

.wfk-decline h4 {
	margin: 0 0 .25rem;
}

.wfk-decline p {
	margin: 0 0 .75rem;
}

.wfk-decline select,
.wfk-decline textarea {
	width: 100%;
	max-width: 100%;
}

.wfk-notice {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border-left: 4px solid rgba(0, 0, 0, .3);
	background: rgba(0, 0, 0, .03);
}

.wfk-notice p {
	margin: 0;
}

.wfk-notice--ok {
	border-left-color: #2d7a2d;
}

.wfk-notice--error {
	border-left-color: #b32d2e;
}

/* Grijze knop: een actie die bestaat, maar die je niet aanmoedigt (1.40.1). */
.woocommerce-account .wfk-btn--muted,
.woocommerce-account a.wfk-btn--muted,
.woocommerce-account button.wfk-btn--muted {
	background: #fff;
	border-color: #b5b5b5;
	color: #5a5a5a;
	font-weight: 500;
}

.woocommerce-account .wfk-btn--muted:hover,
.woocommerce-account a.wfk-btn--muted:hover,
.woocommerce-account button.wfk-btn--muted:hover,
.woocommerce-account .wfk-btn--muted:focus-visible {
	background: #f4f4f4;
	border-color: #8a8a8a;
	color: #333;
}

/* De knoppenrij is een div, geen alinea: zo blijven alle knoppen op één lijn. */
.wfk-detail__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin: 0 0 1rem;
}
