/*
 * Gebruik nested CSS in je wrapper div: .awcf-klant-kortingen
 * Meer informatie: https://www.w3schools.com/cssref/sel_nesting.php
 */

#klant-kortingen-wrap {
	max-width: 860px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#klant-kortingen-wrap h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1d2327;
	margin-bottom: 6px;
}

#klant-kortingen-wrap .kk-subtitle {
	color: #646970;
	font-size: 0.875rem;
	margin-bottom: 28px;
}

/* Cards */
.kk-cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

.kk-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	transition: box-shadow .2s;
	overflow: hidden;
}

.kk-card:hover {
	box-shadow: 0 3px 10px rgba(0,0,0,.10);
}

/* Card header strip */
.kk-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
}

.kk-card-header .kk-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 1rem;
	font-weight: 700;
	color: #2271b1;
}

.kk-badge-pct {
	background: #2271b1;
	color: #fff;
	border-radius: 6px;
	padding: 2px 10px;
	font-size: 1rem;
	font-weight: 800;
}

.kk-delete-btn {
	background: none;
	border: 1px solid #d63638;
	color: #d63638;
	border-radius: 6px;
	padding: 4px 12px;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 600;
	transition: all .15s;
}
.kk-delete-btn:hover {
	background: #d63638;
	color: #fff;
}

/* Card body: 3-column grid */
.kk-card-body {
	display: grid;
	grid-template-columns: 160px 1fr 200px;
	gap: 0;
}

.kk-field {
	padding: 18px 20px;
	border-right: 1px solid #f0f0f1;
}
.kk-field:last-child {
	border-right: none;
}

.kk-field label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #646970;
	margin-bottom: 8px;
}

.kk-field input[type="number"] {
	width: 100%;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	padding: 7px 10px;
	font-size: 0.9375rem;
	color: #1d2327;
	box-sizing: border-box;
}
.kk-field input[type="number"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
	outline: none;
}

/* Multi-select categories */
.kk-field select[multiple] {
	width: 100%;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	font-size: 0.875rem;
	color: #1d2327;
	padding: 4px 6px;
	min-height: 90px;
	max-height: 120px;
	box-sizing: border-box;
}
.kk-field select[multiple]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
	outline: none;
}

.kk-field .kk-hint {
	font-size: 0.72rem;
	color: #8c8f94;
	margin-top: 5px;
}

/* Toggle switch for invoice only */
.kk-toggle-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kk-toggle-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 0.875rem;
	color: #1d2327;
	user-select: none;
}

.kk-switch {
	position: relative;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.kk-switch input { display: none; }
.kk-switch-slider {
	position: absolute;
	inset: 0;
	background: #c3c4c7;
	border-radius: 22px;
	transition: background .2s;
}
.kk-switch-slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.kk-switch input:checked + .kk-switch-slider {
	background: #2271b1;
}
.kk-switch input:checked + .kk-switch-slider::before {
	transform: translateX(18px);
}

/* Pct input wrapper */
.kk-pct-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}
.kk-pct-wrap input {
	flex: 1;
}
.kk-pct-wrap span {
	font-size: 1.1rem;
	font-weight: 700;
	color: #646970;
}

/* Add button */
#kk-add-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 20px;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
#kk-add-btn:hover { background: #135e96; }

/* Save button override */
#klant-kortingen-wrap .button-primary {
	margin-left: 12px !important;
}

/* Empty state */
.kk-empty {
	text-align: center;
	padding: 48px 20px;
	color: #8c8f94;
	border: 2px dashed #dcdcde;
	border-radius: 10px;
	font-size: 0.9375rem;
	margin-bottom: 24px;
}
.kk-empty strong { display: block; font-size: 1.05rem; color: #646970; margin-bottom: 4px; }
