/**
 * SDH Händler Styles
 *
 * Styling für Händler-spezifische Komponenten:
 * - Registrierungsformular (Marken-Grid)
 * - Progress-Dots (Händler 2-Step)
 *
 * @package SDH_Core
 */

/* ============================================
   Marken-Grid: Visuelle Checkbox-Cards
   ============================================ */

.sdh-marken-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-top: 8px;
}

.sdh-marken-grid[data-columns="2"] {
	grid-template-columns: repeat(2, 1fr);
}

.sdh-marken-grid[data-columns="3"] {
	grid-template-columns: repeat(3, 1fr);
}

.sdh-marken-grid[data-columns="5"] {
	grid-template-columns: repeat(5, 1fr);
}

/* Checkbox verstecken */
.sdh-marke-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Card-Label */
.sdh-marke-card {
	display: block;
	cursor: pointer;
	position: relative;
}

.sdh-marke-card-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 12px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
	min-height: 100px;
	position: relative;
}

.sdh-marke-card-inner:hover {
	border-color: #999;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Checked State */
.sdh-marke-checkbox:checked + .sdh-marke-card-inner {
	border-color: var(--sdh-primary, #0073aa);
	background: #f0f7ff;
	box-shadow: 0 0 0 1px var(--sdh-primary, #0073aa);
}

/* Focus State */
.sdh-marke-checkbox:focus-visible + .sdh-marke-card-inner {
	outline: 2px solid var(--sdh-primary, #0073aa);
	outline-offset: 2px;
}

/* Logo */
.sdh-marke-logo {
	max-width: 80px;
	max-height: 50px;
	object-fit: contain;
	margin-bottom: 8px;
}

/* Placeholder (kein Logo) */
.sdh-marke-placeholder {
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f0;
	border-radius: 50%;
	font-size: 18px;
	font-weight: 700;
	color: #666;
	margin-bottom: 8px;
	text-transform: uppercase;
}

/* Markenname */
.sdh-marke-name {
	font-size: 13px;
	font-weight: 500;
	color: #333;
	text-align: center;
	line-height: 1.3;
}

/* Checkmark Icon */
.sdh-marke-check {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--sdh-primary, #0073aa);
	color: #fff;
	opacity: 0;
	transform: scale(0.5);
	transition: opacity 0.2s, transform 0.2s;
}

.sdh-marke-checkbox:checked + .sdh-marke-card-inner .sdh-marke-check {
	opacity: 1;
	transform: scale(1);
}

/* ============================================
   Progress-Dots (Händler 2-Step)
   ============================================ */

.sdh-progress-dots-haendler {
	margin-bottom: 24px;
}

/* ============================================
   Field Description
   ============================================ */

.sdh-field-description {
	font-size: 13px;
	color: #666;
	margin: -4px 0 8px;
}

/* ============================================
   Newsletter Group
   ============================================ */

.sdh-newsletter-group {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
	.sdh-marken-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.sdh-marken-grid[data-columns="2"] {
		grid-template-columns: repeat(2, 1fr);
	}

	.sdh-marke-card-inner {
		padding: 12px 8px;
		min-height: 80px;
	}

	.sdh-marke-logo {
		max-width: 60px;
		max-height: 40px;
	}

	.sdh-marke-name {
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.sdh-marken-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}

	.sdh-marke-card-inner {
		padding: 10px 6px;
		min-height: 70px;
	}
}

/* ============================================
   Händler Dashboard (Status 2 - Verifiziert)
   ============================================ */

.sdh-haendler-dashboard {
	max-width: 720px;
}

/* Header */
.sdh-haendler-dashboard-header {
	margin-bottom: 24px;
}

.sdh-haendler-dashboard-title {
	font-size: 22px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 8px;
}

/* Mini Marken-Logos im Header */
.sdh-haendler-marken-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sdh-haendler-marke-mini {
	width: 32px;
	height: 32px;
	object-fit: contain;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
	padding: 2px;
	background: #fff;
}

.sdh-haendler-marke-mini-text {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
	background: #f5f5f5;
	font-size: 11px;
	font-weight: 700;
	color: #666;
	text-transform: uppercase;
}

/* Statistik-Karten */
.sdh-haendler-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

.sdh-haendler-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	background: #f8f9fa;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
}

.sdh-haendler-stat-icon {
	flex-shrink: 0;
	color: var(--sdh-primary, #0073aa);
}

.sdh-haendler-stat-icon svg {
	display: block;
}

.sdh-haendler-stat-content {
	display: flex;
	flex-direction: column;
}

.sdh-haendler-stat-number {
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
}

.sdh-haendler-stat-label {
	font-size: 13px;
	color: #666;
}

/* Schnellzugriff-Kacheln */
.sdh-haendler-quick-actions {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.sdh-haendler-action-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 12px 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	text-decoration: none;
	color: #333;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
	position: relative;
}

.sdh-haendler-action-card:hover {
	border-color: var(--sdh-primary, #0073aa);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
	text-decoration: none;
	color: #333;
}

.sdh-haendler-action-icon {
	color: var(--sdh-primary, #0073aa);
	margin-bottom: 10px;
}

.sdh-haendler-action-icon svg {
	display: block;
}

.sdh-haendler-action-label {
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	line-height: 1.3;
}

.sdh-haendler-action-count {
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--sdh-primary, #0073aa);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	padding: 0 6px;
}

/* ============================================
   QR-Upload Modal (im Kunden-Detail Off-Canvas)
   ============================================ */

.sdh-kv-qr-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 12px 0;
	color: var(--sdh-gray-400);
	font-size: 0.8rem;
}

.sdh-kv-qr-divider::before,
.sdh-kv-qr-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--sdh-gray-200);
}

.sdh-kv-qr-modal {
	margin-top: 16px;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--sdh-gray-200);
	border-radius: var(--sdh-radius-lg);
}

.sdh-kv-qr-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.sdh-kv-qr-modal-header h4 {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sdh-gray-800);
}

.sdh-kv-qr-modal-close {
	background: none;
	border: none;
	font-size: 1.4rem;
	color: var(--sdh-gray-400);
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.sdh-kv-qr-modal-close:hover {
	color: var(--sdh-gray-600);
}

.sdh-kv-qr-instruction {
	font-size: 0.8125rem;
	color: var(--sdh-gray-600);
	line-height: 1.5;
	margin: 0 0 16px;
}

.sdh-kv-qr-code-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 200px;
	position: relative;
}

#sdh-kv-qr-code {
	display: flex;
	justify-content: center;
}

#sdh-kv-qr-code img,
#sdh-kv-qr-code canvas {
	border-radius: 8px;
}

.sdh-kv-qr-loading {
	position: absolute;
}

.sdh-kv-qr-expiry {
	text-align: center;
	margin-top: 12px;
	font-size: 0.8125rem;
	color: var(--sdh-gray-500);
}

.sdh-kv-qr-expiry .sdh-kv-qr-timer {
	font-weight: 600;
	color: var(--sdh-gray-700);
}

.sdh-kv-qr-expired {
	color: var(--sdh-error) !important;
}

/* ============================================
   Händler Onboarding (Status 0, 3, 4)
   Basis-Design kommt aus sdh-auth.css (zentriert, modern).
   Hier nur Ergänzungen für Händler-spezifische Farben.
   ============================================ */

/* Status Badge */
.sdh-status-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 12px;
	line-height: 1.4;
}

.sdh-status-pending {
	background: #fff3cd;
	color: #856404;
}

/* Progress Bar (Status 0) */
.sdh-progress-bar-container {
	margin-top: 24px;
}

.sdh-progress-bar {
	height: 4px;
	background: #e8e8e8;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 8px;
}

.sdh-progress-bar-fill {
	height: 100%;
	width: 33%;
	background: var(--sdh-primary, #0073aa);
	border-radius: 2px;
}

.sdh-progress-bar-fill.sdh-progress-animated {
	animation: sdh-progress-pulse 2s ease-in-out infinite;
}

@keyframes sdh-progress-pulse {
	0%, 100% { width: 25%; opacity: 0.7; }
	50% { width: 50%; opacity: 1; }
}

.sdh-progress-label {
	font-size: 12px;
	color: #888;
}

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

@media (max-width: 768px) {
	.sdh-haendler-stats {
		grid-template-columns: 1fr;
	}

	.sdh-haendler-quick-actions {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.sdh-haendler-dashboard-title {
		font-size: 18px;
	}

	.sdh-haendler-stat-card {
		padding: 12px 14px;
	}

	.sdh-haendler-stat-number {
		font-size: 20px;
	}

	.sdh-haendler-quick-actions {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.sdh-haendler-action-card {
		padding: 14px 8px 12px;
	}
}

/* ============================================
   Kundenverwaltung: Tabs
   ============================================ */

.sdh-kv {
	max-width: 900px;
}

.sdh-kv-tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid #e0e0e0;
	margin-bottom: 24px;
}

.sdh-kv-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.sdh-kv-tab:hover {
	color: #333;
}

.sdh-kv-tab-active {
	color: var(--sdh-primary, #0073aa);
	border-bottom-color: var(--sdh-primary, #0073aa);
	font-weight: 600;
}

.sdh-kv-tab-count {
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f0;
	color: #666;
	padding: 1px 8px;
	border-radius: 10px;
}

.sdh-kv-tab-active .sdh-kv-tab-count {
	background: var(--sdh-primary, #0073aa);
	color: #fff;
}

.sdh-kv-tab-badge {
	font-size: 11px;
	font-weight: 700;
	background: #e65100;
	color: #fff;
	min-width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	padding: 0 6px;
}

/* Panels */
.sdh-kv-panel {
	display: none;
}

.sdh-kv-panel-active {
	display: block;
}

/* ============================================
   Kundenverwaltung: Titel
   ============================================ */

.sdh-kv-title {
	font-size: 18px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 16px;
}

.sdh-kv-subtitle {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sdh-kv-description {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 20px;
}

/* ============================================
   Kundenverwaltung: Toolbar (Suche + Filter)
   ============================================ */

.sdh-kv-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.sdh-kv-search {
	position: relative;
	flex: 1;
	min-width: 200px;
	max-width: 320px;
}

.sdh-kv-search-full {
	max-width: none;
}

.sdh-kv-search .sdh-input {
	padding-left: 36px;
	width: 100%;
}

.sdh-kv-search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	pointer-events: none;
}

.sdh-kv-filters {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.sdh-kv-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
	color: #555;
	cursor: pointer;
	transition: all 0.15s;
}

.sdh-kv-filter:hover {
	border-color: #bbb;
	background: #f8f8f8;
}

.sdh-kv-filter-active {
	border-color: var(--sdh-primary, #0073aa);
	background: #f0f7ff;
	color: var(--sdh-primary, #0073aa);
	font-weight: 600;
}

.sdh-kv-filter-count {
	font-size: 11px;
	font-weight: 600;
	background: #e8e8e8;
	padding: 1px 6px;
	border-radius: 8px;
}

.sdh-kv-filter-active .sdh-kv-filter-count {
	background: var(--sdh-primary, #0073aa);
	color: #fff;
}

/* ============================================
   Kundenverwaltung: Tabelle
   ============================================ */

.sdh-kv-table-wrapper {
	position: relative;
	min-height: 80px;
}

.sdh-kv-table {
	width: 100%;
}

.sdh-kv-row {
	cursor: pointer;
	transition: background 0.15s;
}

.sdh-kv-row:hover {
	background: #f8f9fa;
}

.sdh-kv-cell-name {
	font-weight: 500;
}

.sdh-kv-cell-actions {
	width: 40px;
	text-align: center;
}

.sdh-kv-detail-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	background: none;
	color: #999;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.sdh-kv-detail-btn:hover {
	background: #f0f0f0;
	color: var(--sdh-primary, #0073aa);
}

/* Sortierung */
.sdh-kv-sortable {
	cursor: pointer;
	user-select: none;
}

.sdh-kv-sortable:hover {
	color: var(--sdh-primary, #0073aa);
}

.sdh-kv-sort-icon {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 4px;
	vertical-align: middle;
}

.sdh-kv-sort-asc .sdh-kv-sort-icon {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-bottom: 5px solid currentColor;
}

.sdh-kv-sort-desc .sdh-kv-sort-icon {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}

/* Loading */
.sdh-kv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 0;
	color: #888;
	font-size: 14px;
}

.sdh-kv-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid #e0e0e0;
	border-top-color: var(--sdh-primary, #0073aa);
	border-radius: 50%;
	animation: sdh-kv-spin 0.6s linear infinite;
}

@keyframes sdh-kv-spin {
	to { transform: rotate(360deg); }
}

/* Leer / Keine Treffer */
.sdh-kv-empty,
.sdh-kv-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #888;
	font-size: 14px;
}

/* ============================================
   Kundenverwaltung: Pagination
   ============================================ */

.sdh-kv-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e8e8e8;
}

.sdh-kv-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	color: #333;
	cursor: pointer;
	transition: all 0.15s;
}

.sdh-kv-page-btn:hover:not(:disabled) {
	border-color: var(--sdh-primary, #0073aa);
	color: var(--sdh-primary, #0073aa);
}

.sdh-kv-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.sdh-kv-page-info {
	font-size: 13px;
	color: #666;
	min-width: 60px;
	text-align: center;
}

/* ============================================
   Kundenverwaltung: Link-Code Formular
   ============================================ */

.sdh-kv-link-input-row {
	display: flex;
	gap: 8px;
	max-width: 400px;
}

.sdh-kv-link-input-row .sdh-input {
	text-transform: uppercase;
	font-family: monospace;
	font-size: 16px;
	letter-spacing: 1px;
	flex: 1;
	min-width: 0;
}

.sdh-kv-link-check-btn {
	white-space: nowrap;
	flex-shrink: 0;
	width: auto;
}

/* Vorschau nach Code-Check */
.sdh-kv-link-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	margin-top: 12px;
	background: #f0f7ff;
	border: 1px solid #cce0f0;
	border-radius: 8px;
	max-width: 500px;
}

.sdh-kv-link-preview-info {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sdh-kv-link-preview-info svg {
	flex-shrink: 0;
	color: var(--sdh-primary, #0073aa);
}

.sdh-kv-link-preview-name {
	font-weight: 600;
	font-size: 15px;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sdh-kv-link-preview-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.sdh-kv-link-send-btn {
	white-space: nowrap;
	width: auto;
	padding: 8px 16px;
}

.sdh-kv-link-cancel-btn {
	white-space: nowrap;
	width: auto;
	padding: 8px 12px;
}

.sdh-kv-pending-section {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e0e0e0;
}

.sdh-kv-pending-empty {
	font-size: 13px;
	color: #999;
	margin: 0;
}

/* Pending Card */
.sdh-kv-pending-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	background: #fefce8;
	border: 1px solid #fde68a;
	border-radius: 8px;
	margin-bottom: 8px;
}

.sdh-kv-pending-card:last-child {
	margin-bottom: 0;
}

.sdh-kv-pending-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sdh-kv-pending-name {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sdh-kv-pending-date {
	font-size: 12px;
	color: #888;
}

.sdh-kv-pending-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.sdh-kv-pending-status {
	font-size: 12px;
	color: #92400e;
	white-space: nowrap;
}

.sdh-kv-pending-cancel {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	background: none;
	color: #999;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.sdh-kv-pending-cancel:hover {
	background: #fde68a;
	color: #c62828;
}

/* ============================================
   Kundenverwaltung: Inline-Validierung
   ============================================ */

.sdh-field-error {
	display: none;
	font-size: 12px;
	color: #c62828;
	margin-top: 4px;
}

.sdh-input-error {
	border-color: #c62828 !important;
}

.sdh-kv-create-success {
	margin-bottom: 16px;
}

/* ============================================
   Kundenverwaltung: Datei-Upload (Dropzone)
   ============================================ */

.sdh-kv-upload-area {
	margin-top: 8px;
}

.sdh-kv-dropzone {
	position: relative;
	border: 2px dashed #d0d0d0;
	border-radius: 8px;
	padding: 24px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.sdh-kv-dropzone:hover,
.sdh-kv-dropzone-hover {
	border-color: var(--sdh-primary, #0073aa);
	background: #f8fbff;
}

.sdh-kv-dropzone input[type="file"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.sdh-kv-dropzone-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #888;
	font-size: 14px;
	pointer-events: none;
}

.sdh-kv-dropzone-content svg {
	color: #bbb;
}

.sdh-kv-dropzone-hint {
	font-size: 12px;
	color: #aaa;
}

/* File Preview */
.sdh-kv-file-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	margin-top: 8px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.sdh-kv-file-preview.sdh-kv-file-error {
	border-color: #c62828;
	background: #fff5f5;
}

.sdh-kv-file-info {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sdh-kv-file-icon {
	flex-shrink: 0;
	color: var(--sdh-primary, #0073aa);
}

.sdh-kv-file-error .sdh-kv-file-icon {
	color: #c62828;
}

.sdh-kv-file-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sdh-kv-file-name {
	font-size: 13px;
	font-weight: 500;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sdh-kv-file-size {
	font-size: 12px;
	color: #888;
}

.sdh-kv-file-error .sdh-kv-file-size {
	color: #c62828;
}

.sdh-kv-file-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	background: none;
	color: #999;
	cursor: pointer;
	border-radius: 6px;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
}

.sdh-kv-file-remove:hover {
	background: #f0f0f0;
	color: #c62828;
}

/* ============================================
   Kundenverwaltung: Detail-Panel (Slide-in)
   ============================================ */

.sdh-kv-body-locked {
	overflow: hidden;
}

.sdh-kv-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s, visibility 0.25s;
}

.sdh-kv-overlay-active {
	opacity: 1;
	visibility: visible;
}

.sdh-kv-detail {
	position: fixed;
	top: 0;
	right: 0;
	width: 420px;
	max-width: 90vw;
	height: 100vh;
	background: #fff;
	z-index: 9999;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.sdh-kv-detail-open {
	transform: translateX(0);
}

.sdh-kv-detail-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e8e8e8;
	flex-shrink: 0;
}

.sdh-kv-detail-title {
	font-size: 18px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sdh-kv-detail-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: none;
	color: #666;
	cursor: pointer;
	border-radius: 8px;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
}

.sdh-kv-detail-close:hover {
	background: #f0f0f0;
	color: #333;
}

.sdh-kv-detail-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 0;
}

.sdh-kv-detail-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}

.sdh-kv-detail-error {
	color: #c62828;
	font-size: 14px;
}

/* Status + Code */
.sdh-kv-detail-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
}

.sdh-kv-detail-code {
	font-family: monospace;
	font-size: 13px;
	color: #888;
	background: #f5f5f5;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 1px;
}

/* Sections */
.sdh-kv-detail-section {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f0;
}

.sdh-kv-detail-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.sdh-kv-detail-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
	margin-bottom: 6px;
}

.sdh-kv-detail-value {
	font-size: 14px;
	color: #333;
	line-height: 1.5;
}

.sdh-kv-detail-value + .sdh-kv-detail-value {
	margin-top: 2px;
}

.sdh-kv-detail-link {
	color: var(--sdh-primary, #0073aa);
	text-decoration: none;
}

.sdh-kv-detail-link:hover {
	text-decoration: underline;
}

/* Meta Grid */
.sdh-kv-detail-meta-grid {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sdh-kv-detail-meta-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.sdh-kv-detail-meta-key {
	font-size: 13px;
	color: #888;
}

.sdh-kv-detail-meta-val {
	font-size: 13px;
	color: #333;
	font-weight: 500;
}

/* ============================================
   Kundenverwaltung: Responsive
   ============================================ */

@media (max-width: 768px) {
	.sdh-kv-tabs {
		gap: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.sdh-kv-tab {
		padding: 10px 14px;
		font-size: 13px;
	}

	.sdh-kv-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.sdh-kv-search {
		max-width: none;
	}

	.sdh-kv-filters {
		justify-content: flex-start;
	}

	.sdh-kv-hide-mobile {
		display: none;
	}

	.sdh-kv-link-input-row {
		max-width: none;
	}

	.sdh-kv-link-preview {
		max-width: none;
		flex-direction: column;
		align-items: stretch;
	}

	.sdh-kv-link-preview-actions {
		justify-content: flex-end;
	}

	.sdh-kv-detail {
		width: 100%;
		max-width: 100vw;
	}

	.sdh-kv-detail-body {
		padding: 20px 16px;
	}

	.sdh-kv-pending-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.sdh-kv-pending-actions {
		width: 100%;
		justify-content: space-between;
	}

	.sdh-kv-pending-status {
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	.sdh-kv-tab {
		padding: 8px 10px;
		font-size: 12px;
	}

	.sdh-kv-filter {
		padding: 5px 10px;
		font-size: 12px;
	}
}

/* ============================================
   Meine Händler Widget (Handwerker-Sicht)
   ============================================ */

.sdh-mh-widget {
	background: #fff;
	border: 1px solid var(--sdh-gray-200);
	border-radius: var(--sdh-radius-lg);
	overflow: hidden;
}

/* Header (analog Bestellungen-Widget) */
.sdh-mh-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--sdh-gray-200);
}

.sdh-mh-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

.sdh-mh-count {
	font-size: 0.8125rem;
	color: var(--sdh-gray-500);
}

/* Loading */
.sdh-mh-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 0;
	color: #888;
	font-size: 14px;
}

/* ============================================
   Verknüpfungscode-Leiste
   ============================================ */

.sdh-mh-linkcode {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	background: var(--sdh-gray-50, #fafafa);
	border-bottom: 1px solid var(--sdh-gray-200);
	font-size: 13px;
	flex-wrap: wrap;
}

.sdh-mh-linkcode-label {
	color: var(--sdh-gray-500, #888);
}

.sdh-mh-linkcode-value {
	font-family: monospace;
	font-size: 14px;
	font-weight: 600;
	color: var(--sdh-primary, #0073aa);
	background: #f0f7ff;
	border: 1px solid #cce0f0;
	padding: 2px 10px;
	border-radius: 4px;
	letter-spacing: 1px;
}

.sdh-mh-linkcode-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--sdh-gray-300, #ddd);
	border-radius: 4px;
	background: #fff;
	color: var(--sdh-gray-500, #888);
	cursor: pointer;
	transition: all 0.15s;
	padding: 0;
}

.sdh-mh-linkcode-copy:hover {
	border-color: var(--sdh-gray-400);
	color: var(--sdh-gray-700);
	background: var(--sdh-gray-100);
}

.sdh-mh-linkcode-copied {
	border-color: #22c55e;
	color: #22c55e;
	background: #f0fdf4;
}

.sdh-mh-linkcode-hint {
	color: var(--sdh-gray-400, #aaa);
	font-size: 12px;
}

/* ============================================
   Pending Card (Verknüpfungsanfrage als Card)
   ============================================ */

.sdh-mh-card-pending {
	border-left: 3px solid #f59e0b;
}

.sdh-mh-card-pending .sdh-mh-card-header {
	background: #fffbeb;
}

.sdh-mh-card-pending-body {
	padding: 16px 20px;
}

.sdh-mh-card-pending-text {
	margin: 0;
	font-size: 13px;
	color: var(--sdh-gray-600, #555);
	line-height: 1.5;
}

/* ============================================
   Toolbar: Suche + Marken-Filter
   ============================================ */

.sdh-mh-toolbar {
	display: flex;
	gap: 12px;
	padding: 16px 24px;
	border-bottom: 1px solid var(--sdh-gray-200);
	background: var(--sdh-gray-100);
}

.sdh-mh-search {
	flex: 1;
	min-width: 0;
	position: relative;
}

.sdh-mh-search .sdh-input {
	padding-left: 36px;
	width: 100%;
}

.sdh-mh-search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sdh-gray-400);
	pointer-events: none;
}

.sdh-mh-filter-select {
	flex-shrink: 0;
	width: auto;
	max-width: 180px;
}

/* ============================================
   Händler Cards
   ============================================ */

.sdh-mh-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	padding: 20px 24px;
}

/* grid-template-columns und gap werden via Elementor-Selectors gesteuert */

.sdh-mh-card {
	background: #fff;
	border: 1px solid var(--sdh-gray-200, #e0e0e0);
	border-radius: var(--sdh-radius-lg, 10px);
	padding: 0;
	transition: border-color 0.2s, box-shadow 0.2s;
	overflow: hidden;
}

.sdh-mh-card:hover {
	border-color: var(--sdh-gray-300, #ccc);
}

/* Card Header */
.sdh-mh-card-header {
	padding: 16px 20px;
	background: var(--sdh-gray-50, #fafafa);
	border-bottom: 1px solid var(--sdh-gray-200, #e9ecef);
}

.sdh-mh-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 2px;
	line-height: 1.3;
}

.sdh-mh-card-date {
	font-size: 12px;
	color: var(--sdh-gray-500, #999);
}

/* Card Body */
.sdh-mh-card-body {
	padding: 16px 20px;
}

/* Vertragsmarken-Logos */
.sdh-mh-card-marken {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	padding: 12px 20px;
	border-bottom: 1px solid var(--sdh-gray-200, #e9ecef);
}

.sdh-mh-card-marke-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
	border-radius: 4px;
	border: 1px solid var(--sdh-gray-200, #e0e0e0);
	padding: 2px;
	background: #fff;
}

.sdh-mh-card-marke-text {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	border: 1px solid var(--sdh-gray-200, #e0e0e0);
	background: var(--sdh-gray-100, #f5f5f5);
	font-size: 11px;
	font-weight: 700;
	color: var(--sdh-gray-500, #666);
	text-transform: uppercase;
}

/* Kontaktdaten */
.sdh-mh-card-contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 20px;
}

.sdh-mh-card-contact-row {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--sdh-gray-600, #555);
}

.sdh-mh-card-contact-row svg {
	flex-shrink: 0;
	color: var(--sdh-gray-400, #999);
}

.sdh-mh-card-contact-row a {
	color: var(--sdh-primary, #0073aa);
	text-decoration: none;
}

.sdh-mh-card-contact-row a:hover {
	text-decoration: underline;
}

/* Action Buttons */
.sdh-mh-card-actions {
	display: flex;
	gap: 8px;
	padding: 12px 20px;
	background: var(--sdh-gray-50, #fafafa);
	border-top: 1px solid var(--sdh-gray-200, #e9ecef);
}

.sdh-mh-card-contact-btn,
.sdh-mh-card-phone-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	padding: 8px 14px;
	text-decoration: none;
	border-radius: var(--sdh-radius, 6px);
	transition: background-color 0.15s, border-color 0.15s;
}

/* Kontaktieren: SDH Rot (Spezifität über .sdh-button-outline) */
.sdh-mh-card-actions .sdh-mh-card-contact-btn {
	background: var(--sdh-accent, #be1623);
	border: 1px solid var(--sdh-accent, #be1623);
	color: #fff;
}

.sdh-mh-card-actions .sdh-mh-card-contact-btn svg {
	color: #fff;
}

.sdh-mh-card-actions .sdh-mh-card-contact-btn:hover {
	background: var(--sdh-accent-hover, #a81420);
	border-color: var(--sdh-accent-hover, #a81420);
	color: #fff;
}

/* Anrufen: Outline mit subtlem Hover */
.sdh-mh-card-phone-btn {
	background: transparent;
	border: 1px solid var(--sdh-gray-300);
	color: var(--sdh-gray-600);
}

.sdh-mh-card-phone-btn:hover {
	background: var(--sdh-gray-100);
	border-color: var(--sdh-gray-400);
	color: var(--sdh-gray-800);
}

/* ============================================
   No Results / Empty State
   ============================================ */

.sdh-mh-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #888;
	font-size: 14px;
}

.sdh-mh-no-results svg {
	display: block;
	margin: 0 auto 10px;
	color: #ccc;
}

.sdh-mh-empty {
	text-align: center;
	padding: 48px 20px;
}

.sdh-mh-empty-icon {
	color: #ccc;
	margin-bottom: 16px;
}

.sdh-mh-empty-text {
	font-size: 15px;
	color: #666;
	margin: 0 0 12px;
}

.sdh-mh-empty-hint {
	font-size: 13px;
	color: #888;
	margin: 0;
}

.sdh-mh-member-id {
	display: inline-block;
	font-family: monospace;
	font-size: 14px;
	background: #f0f7ff;
	border: 1px solid #cce0f0;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 1px;
	color: var(--sdh-primary, #0073aa);
	margin-left: 4px;
}

/* ============================================
   Pagination
   ============================================ */

.sdh-mh-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e8e8e8;
}

.sdh-mh-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	color: #333;
	cursor: pointer;
	transition: all 0.15s;
}

.sdh-mh-page-btn:hover:not(:disabled) {
	border-color: var(--sdh-primary, #0073aa);
	color: var(--sdh-primary, #0073aa);
}

.sdh-mh-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.sdh-mh-page-info {
	font-size: 13px;
	color: #666;
	min-width: 60px;
	text-align: center;
}

/* ============================================
   Meine Händler: Responsive
   ============================================ */

@media (max-width: 768px) {
	.sdh-mh-header {
		padding: 16px;
	}

	.sdh-mh-linkcode {
		padding: 10px 16px;
	}

	.sdh-mh-linkcode-hint {
		flex-basis: 100%;
	}

	.sdh-mh-toolbar {
		flex-direction: column;
		padding: 12px 16px;
	}

	.sdh-mh-filter-select {
		max-width: none;
	}
}

@media (max-width: 480px) {
	.sdh-mh-card {
		padding: 16px;
	}

	.sdh-mh-card-title {
		font-size: 15px;
	}

	.sdh-mh-card-actions {
		flex-direction: column;
	}

	.sdh-mh-card-contact-btn,
	.sdh-mh-card-phone-btn {
		justify-content: center;
	}

}
