/**
 * Webcodexworld Car Buying & Selling
 * Dealer profile page (`[carbs_dealer_profile]`) styles - banner header,
 * contact panel, stats row, sidebar, listings toolbar, pagination and
 * empty state. The car grid itself reuses `.carbs-listing-card` /
 * `.carbs-listing-grid` / `.carbs-listing-view-list` from
 * carbs-car-listing.css (enqueued alongside this file as a dependency)
 * so a dealer's cars match the main listing grid exactly in both Grid
 * and List view.
 *
 * Brand colors (accent, ink, borders, white surfaces) come directly from
 * the theme's shared --tpc-* custom properties (tpc-custom.css) rather
 * than a local copy. Only genuinely page-specific, non-brand tokens
 * (the pale card-surface tint, the "verified/valid" green, and the
 * distinct blue/green/purple accents used to tell the four stat tiles
 * apart) are still declared locally below.
 *
 * @package Webcodexworld Car Buying & Selling
 * @since 1.8.0
 */

.carbs-dealer-profile-wrap {
	--carbs-dp-surface-soft: var(--tpc-surface-soft);
	--carbs-dp-good: var(--tpc-success);

	max-width: 1280px;
	margin: 24px auto;
	font-family: var(--tpc-font-body);
	color: var(--tpc-black);
	padding: 0 16px;
}

.carbs-dealer-profile-wrap *,
.carbs-dealer-profile-wrap *::before,
.carbs-dealer-profile-wrap *::after {
	box-sizing: border-box;
}

.carbs-dealer-profile-wrap svg {
	display: block;
	flex-shrink: 0;
}

.carbs-dealer-profile-empty,
.carbs-listing-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--tpc-gray);
}

/* ---------- Banner ---------- */

.carbs-dp-banner {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 20px;
	background: #0f172a center/cover no-repeat;
}

.carbs-dp-banner-default {
	background: linear-gradient(120deg, #101828 0%, #1f2937 55%, #33210f 140%);
}

.carbs-dp-banner-scrim {
	background: linear-gradient(180deg, rgba(16, 24, 40, 0.55) 0%, rgba(16, 24, 40, 0.82) 100%);
	padding: 28px 28px 32px;
	min-height: 168px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.carbs-dp-banner-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}

.carbs-dp-identity {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	min-width: 0;
	flex: 1 1 320px;
}

.carbs-dp-logo {
	flex-shrink: 0;
	width: 84px;
	height: 84px;
	border-radius: 14px;
	background: var(--tpc-white);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: var(--tpc-gray);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.carbs-dp-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
}

.carbs-dp-logo svg,
.carbs-dp-logo i {
	font-size: 34px;
	width: 34px;
	height: 34px;
}

.carbs-dp-identity-text {
	min-width: 0;
	color: var(--tpc-white);
}

.carbs-dp-name {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 2px 0 8px;
	font-family: var(--tpc-font-heading);
	font-size: 26px;
	font-weight: 700;
	color: var(--tpc-white);
}

.carbs-dp-verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--tpc-white);
	background: var(--carbs-dp-good);
	border-radius: 20px;
	padding: 4px 10px;
}

.carbs-dp-submeta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 10px;
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.78);
}

.carbs-dp-submeta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.carbs-dp-submeta svg,
.carbs-dp-submeta i {
	color: rgba(255, 255, 255, 0.6);
}

.carbs-dp-bio {
	margin: 4px 0 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	max-width: 560px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.carbs-dp-bio p {
	margin: 0 0 6px;
}

.carbs-dp-contact-panel {
	flex-shrink: 0;
	background: rgba(16, 24, 40, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	padding: 16px;
	min-width: 240px;
}

.carbs-dp-contact-list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.carbs-dp-contact-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
}

.carbs-dp-contact-list svg,
.carbs-dp-contact-list i {
	color: var(--tpc-red);
	width: 14px;
}

.carbs-dp-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.carbs-dp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 200ms ease;
	flex: 1 1 auto;
	white-space: nowrap;
}

.carbs-dp-btn:hover {
	opacity: 0.9;
}

.carbs-dp-btn-light {
	background: rgba(255, 255, 255, 0.14);
	color: var(--tpc-white);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.carbs-dp-btn-primary {
	background: var(--tpc-red);
	color: var(--tpc-white);
}

/* ---------- Stats row ---------- */

.carbs-dp-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 24px;
}

.carbs-dp-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--tpc-white);
	border: 1px solid var(--tpc-border);
	border-radius: 14px;
	padding: 16px;
	min-width: 0;
}

.carbs-dp-stat-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(131, 36, 30, 0.1);
	color: var(--tpc-red);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
}

/* Each stat gets its own accent color so the row reads at a glance
   instead of four identical orange circles. */
.carbs-dp-stat-icon--cars {
	background: rgba(131, 36, 30, 0.12);
	color: var(--tpc-red);
}

.carbs-dp-stat-icon--enquiries {
	background: rgba(37, 99, 235, 0.12);
	color: #2563EB;
}

.carbs-dp-stat-icon--years {
	background: rgba(18, 135, 90, 0.12);
	color: var(--carbs-dp-good);
}

.carbs-dp-stat-icon--status {
	background: rgba(124, 58, 237, 0.12);
	color: #7C3AED;
}

.carbs-dp-stat-text {
	min-width: 0;
}

.carbs-dp-stat strong {
	display: block;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.carbs-dp-stat-text span {
	display: block;
	font-size: 12px;
	color: var(--tpc-gray);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Body: sidebar + main ---------- */

.carbs-dp-body {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
	align-items: start;
}

.carbs-dp-sidebar {
	background: var(--tpc-white);
	border: 1px solid var(--tpc-border);
	border-radius: 16px;
	padding: 20px;
	position: sticky;
	top: 16px;
}

.carbs-dp-sidebar h3 {
	margin: 0 0 14px;
	font-family: var(--tpc-font-heading);
	font-size: 15px;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--tpc-red);
}

.carbs-dp-info-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.carbs-dp-info-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.carbs-dp-info-icon {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--carbs-dp-surface-soft);
	color: var(--tpc-red);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	margin-top: 1px;
}

.carbs-dp-info-list small {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tpc-gray);
	margin-bottom: 2px;
}

.carbs-dp-info-list span,
.carbs-dp-info-list a {
	display: block;
	font-size: 13.5px;
	color: var(--tpc-black);
	word-break: break-word;
}

.carbs-dp-info-list a {
	text-decoration: none;
	color: var(--tpc-red);
}

.carbs-dp-info-list a:hover {
	text-decoration: underline;
}

.carbs-dp-social {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--tpc-border);
}

.carbs-dp-social h4 {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tpc-gray);
}

.carbs-dp-social-icons {
	display: flex;
	gap: 8px;
}

.carbs-dp-social-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--carbs-dp-surface-soft);
	color: var(--tpc-black);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 200ms ease, color 200ms ease;
}

.carbs-dp-social-icon:hover {
	background: var(--tpc-red);
	color: var(--tpc-white);
}

.carbs-dp-main {
	min-width: 0;
}

/* ---------- Listings toolbar ---------- */

.carbs-dp-listings-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}

.carbs-dp-listings-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-family: var(--tpc-font-heading);
	font-size: 20px;
	font-weight: 700;
}

.carbs-dp-count-badge {
	display: inline-flex;
	align-items: center;
	background: var(--tpc-red);
	color: var(--tpc-white);
	font-size: 12px;
	font-weight: 600;
	border-radius: 20px;
	padding: 3px 12px;
}

.carbs-dp-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.carbs-dp-toolbar select {
	appearance: none;
	background: var(--tpc-white);
	border: 1px solid var(--tpc-border);
	border-radius: 10px;
	padding: 9px 32px 9px 14px;
	font-size: 13px;
	color: var(--tpc-black);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236B7280'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 14px;
	cursor: pointer;
}

.carbs-dp-view-toggle {
	display: flex;
	border: 1px solid var(--tpc-border);
	border-radius: 10px;
	overflow: hidden;
}

.carbs-dp-view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: var(--tpc-white);
	border: none;
	color: var(--tpc-gray);
	cursor: pointer;
}

.carbs-dp-view-btn + .carbs-dp-view-btn {
	border-left: 1px solid var(--tpc-border);
}

.carbs-dp-view-btn.is-active {
	background: var(--tpc-red);
	color: var(--tpc-white);
}

/* ---------- Cars grid ---------- */

.carbs-dealer-profile-cars-grid {
	margin-bottom: 24px;
}

/* ---------- Pagination ---------- */

.carbs-dealer-profile-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.carbs-dealer-profile-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--tpc-border);
	background: var(--tpc-white);
	color: var(--tpc-black);
	font-size: 13.5px;
	text-decoration: none;
}

.carbs-dealer-profile-pagination .page-numbers.current {
	background: var(--tpc-red);
	border-color: var(--tpc-red);
	color: var(--tpc-white);
}

.carbs-dealer-profile-pagination .page-numbers.dots {
	border: none;
	background: none;
}

/* ---------- Car card "View Details" button ----------
   The card markup/classes are shared with the main listing grid
   (carbs-car-listing.css), but that stylesheet doesn't give
   `.carbs-listing-btn-outline` real button chrome in every context, so
   this page gives it its own explicit button styling, matching the
   `.carbs-dp-btn` family used elsewhere on this page. */

.carbs-dealer-profile-wrap .carbs-listing-card-actions {
	margin-top: 12px;
}

.carbs-dealer-profile-wrap .carbs-dp-card-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 16px;
	border: 1.5px solid var(--tpc-red);
	border-radius: 10px;
	background: var(--tpc-white);
	color: var(--tpc-red);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	transition: background 180ms ease, color 180ms ease;
}

.carbs-dealer-profile-wrap .carbs-dp-card-btn:hover {
	background: var(--tpc-red);
	color: var(--tpc-white);
}

/* ---------- "Get Dealers Details" lead modal ---------- */

.carbs-dp-lead-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 10, 10, 0.6);
}

.carbs-dp-lead-modal[hidden] {
	display: none;
}

.carbs-dp-lead-modal-panel {
	width: 100%;
	max-width: 400px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--tpc-white);
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 24px 60px rgba(10, 10, 10, 0.3);
}

.carbs-dp-lead-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.carbs-dp-lead-modal-head h3 {
	margin: 0;
	font-size: 17px;
	font-family: var(--tpc-font-heading);
	font-weight: 700;
	color: var(--tpc-black);
}

.carbs-dp-lead-modal-close {
	flex: none;
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--carbs-dp-surface-soft);
	color: var(--tpc-gray);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.carbs-dp-lead-modal-close:hover {
	background: var(--tpc-red);
	color: var(--tpc-white);
}

.carbs-dp-lead-modal-sub {
	margin: 0 0 16px;
	font-size: 13px;
	color: var(--tpc-gray);
}

.carbs-dp-lead-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.carbs-dp-lead-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.carbs-dp-lead-form input[type="text"],
.carbs-dp-lead-form input[type="email"],
.carbs-dp-lead-form input[type="tel"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--tpc-border);
	border-radius: 8px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--tpc-black);
	background: var(--tpc-white);
}

.carbs-dp-lead-alert {
	display: none;
	margin-bottom: 4px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 700;
}

.carbs-dp-lead-alert.is-visible {
	display: block;
}

.carbs-dp-lead-alert.carbs-dp-lead-alert--success {
	background: rgba(18, 135, 90, 0.12);
	color: var(--carbs-dp-good);
}

.carbs-dp-lead-alert.carbs-dp-lead-alert--error {
	background: #fdecea;
	color: #b3261e;
}

.carbs-dp-lead-submit {
	width: 100%;
}

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

@media (max-width: 900px) {
	.carbs-dp-body {
		grid-template-columns: 1fr;
	}

	.carbs-dp-sidebar {
		position: static;
	}

	.carbs-dp-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.carbs-dp-banner-top {
		flex-direction: column;
	}

	.carbs-dp-contact-panel {
		width: 100%;
	}

	.carbs-dp-identity {
		flex-direction: column;
		align-items: flex-start;
	}

	.carbs-dp-stats {
		grid-template-columns: 1fr 1fr;
	}

	.carbs-dp-toolbar {
		width: 100%;
	}

	.carbs-dp-toolbar select {
		flex: 1 1 auto;
	}
}

@media (max-width: 420px) {
	.carbs-dp-stats {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.carbs-dp-stat {
		padding: 12px;
		gap: 10px;
	}

	.carbs-dp-stat-icon {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}
}
