/**
 * Front-end styles for vehicle archive, single and the Vehicle Posts widget.
 *
 * Self-contained so vehicles render correctly on any theme (no Bootstrap or
 * theme grid required).
 *
 * @package Webinane_Vehicle_Booking
 */

/* -------------------------------------------------------------------------
 * Layout helpers
 * ---------------------------------------------------------------------- */
.wb-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 16px;
}

.wb-archive-header {
	margin-bottom: 32px;
	text-align: center;
}

.wb-archive-title {
	margin: 0 0 8px;
	font-size: 2rem;
	line-height: 1.2;
}

.wb-archive-description {
	color: #6b7280;
	max-width: 720px;
	margin: 0 auto;
}

/* -------------------------------------------------------------------------
 * Archive grid + card
 * ---------------------------------------------------------------------- */
.wb-vehicle-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.wb-vehicle-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wb-vehicle-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.wb-vehicle-image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.wb-vehicle-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wb-vehicle-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 12px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff;
	background: var(--wbvb-secondary, #111827);
	border-radius: 999px;
}

.wb-vehicle-content {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	flex: 1;
}

.wb-vehicle-title {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.3;
}

.wb-vehicle-title a {
	color: inherit;
	text-decoration: none;
}

.wb-vehicle-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	color: #4b5563;
	font-size: 0.9rem;
}

.wb-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wb-meta-item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #9ca3af;
}

.wb-vehicle-pricing {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.wb-price-item {
	display: flex;
	flex-direction: column;
}

.wb-price-label {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #9ca3af;
}

.wb-price-value {
	font-weight: 700;
	color: #111827;
}

.wb-vehicle-actions {
	margin-top: 4px;
}

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */
.wb-btn {
	display: inline-block;
	padding: 10px 22px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-align: center;
	border: 0;
	border-radius: var(--wbvb-btn-radius, 10px);
	cursor: pointer;
}

.wb-btn-lg {
	padding: 14px 30px;
	font-size: 1.05rem;
}

.wb-btn-primary {
	color: var(--wbvb-btn-text, #fff);
	background: var(--wbvb-primary, #2563eb);
	transition: background 0.2s ease;
}

.wb-btn-primary:hover {
	background: var(--wbvb-primary-hover, #1d4ed8);
	color: var(--wbvb-btn-text, #fff);
}

.wb-btn-disabled {
	color: #6b7280;
	background: #e5e7eb;
	cursor: not-allowed;
}

.wb-pagination {
	margin-top: 36px;
	text-align: center;
}

.wb-no-vehicles {
	text-align: center;
	color: #6b7280;
}

/* -------------------------------------------------------------------------
 * Single vehicle
 * ---------------------------------------------------------------------- */
.wbvb-single-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 36px;
	align-items: start;
}

.wbvb-single-media img {
	width: 100%;
	height: auto;
	border-radius: 16px;
	display: block;
}

.wbvb-single-title {
	margin: 0 0 20px;
	font-size: 2rem;
	line-height: 1.2;
}

.wbvb-vehicle-specs {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: grid;
	gap: 12px;
}

.wbvb-spec-item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wbvb-spec-item .dashicons {
	color: var(--wbvb-primary, #2563eb);
}

.wbvb-spec-label {
	color: #6b7280;
	min-width: 110px;
}

.wbvb-spec-value {
	font-weight: 600;
	color: #111827;
}

.wbvb-vehicle-pricing-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}

.wbvb-vehicle-pricing-table th,
.wbvb-vehicle-pricing-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
	text-align: left;
}

.wbvb-vehicle-pricing-table th {
	color: #6b7280;
	font-weight: 500;
}

.wbvb-vehicle-pricing-table td {
	font-weight: 700;
	color: #111827;
	text-align: right;
}

.wbvb-availability.wbvb-unavailable {
	color: #dc2626;
	font-weight: 600;
}

.wbvb-single-content {
	margin-top: 36px;
	line-height: 1.7;
}

/* -------------------------------------------------------------------------
 * Elementor "Vehicle Posts" widget
 * ---------------------------------------------------------------------- */
.wbvb-vehicle-posts {
	display: grid;
	grid-template-columns: repeat(var(--wbvb-cols, 3), minmax(0, 1fr));
	gap: 28px;
}

.wbvb-vehicle-posts .vehicle-post {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
}

.wbvb-vehicle-posts .vehicle-img {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.wbvb-vehicle-posts .vehicle-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wbvb-vehicle-posts .vehicle-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 12px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: var(--wbvb-secondary, #111827);
	border-radius: 999px;
}

.wbvb-vehicle-posts .vehicle-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	flex: 1;
}

.wbvb-vehicle-posts .vehicle-title {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.3;
}

.wbvb-vehicle-posts .vehicle-title a {
	color: inherit;
	text-decoration: none;
}

.wbvb-vehicle-posts .meta-boxes-info {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	color: #4b5563;
	font-size: 0.9rem;
}

.wbvb-vehicle-posts .meta-box-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wbvb-vehicle-posts .meta-box-item svg,
.wbvb-vehicle-posts .meta-box-item i {
	width: 16px;
	height: 16px;
	color: #9ca3af;
}

.wbvb-vehicle-posts .vehicle-price {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.wbvb-vehicle-posts .price-label h3 {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
}

.wbvb-vehicle-posts .price-amount span {
	font-size: 1.2rem;
	font-weight: 700;
	color: #111827;
}

.wbvb-no-vehicles {
	color: #6b7280;
}

/* List layout (skin) ------------------------------------------------------ */
.wbvb-vehicle-posts.wbvb-layout-list {
	grid-template-columns: 1fr;
	gap: 20px;
}

.wbvb-vehicle-posts.wbvb-layout-list .vehicle-post {
	display: grid;
	grid-template-columns: minmax(220px, 320px) 1fr;
	align-items: stretch;
}

.wbvb-vehicle-posts.wbvb-layout-list .vehicle-img {
	aspect-ratio: auto;
	height: 100%;
	min-height: 210px;
}

.wbvb-vehicle-posts.wbvb-layout-list .vehicle-card {
	justify-content: center;
}

.wbvb-vehicle-posts.wbvb-layout-list .meta-boxes-info {
	gap: 8px 24px;
}

.wbvb-vehicle-posts.wbvb-layout-list .vehicle-price {
	justify-content: flex-start;
}

/* -------------------------------------------------------------------------
 * Fare Estimator widget
 * ---------------------------------------------------------------------- */
.wbvb-fare-estimator {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 24px;
	max-width: 480px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.wbvb-fe-head {
	margin-bottom: 18px;
}

.wbvb-fe-title {
	margin: 0 0 6px;
	font-size: 1.4rem;
	line-height: 1.2;
}

.wbvb-fe-subtitle {
	margin: 0;
	color: #6b7280;
	font-size: 0.95rem;
}

.wbvb-fe-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wbvb-fe-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wbvb-fe-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #374151;
}

.wbvb-fe-form select,
.wbvb-fe-form input[type="text"] {
	width: 100%;
	height: 46px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f9fafb;
	font-size: 0.95rem;
	color: #111827;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.wbvb-fe-form select:focus,
.wbvb-fe-form input[type="text"]:focus {
	outline: none;
	background: #fff;
	border-color: var(--wbvb-primary, #2563eb);
}

.wbvb-fe-submit {
	margin-top: 4px;
}

.wbvb-fe-error {
	margin: 0;
	color: #dc2626;
	font-size: 0.9rem;
}

.wbvb-fe-result {
	margin-top: 6px;
	padding-top: 16px;
	border-top: 1px dashed #e5e7eb;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wbvb-fe-row {
	display: flex;
	justify-content: space-between;
	font-size: 0.95rem;
	color: #4b5563;
}

.wbvb-fe-row-label {
	color: #6b7280;
}

.wbvb-fe-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 12px 0 4px;
}

.wbvb-fe-total-label {
	font-weight: 600;
	color: #111827;
}

.wbvb-fe-amount {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--wbvb-primary, #2563eb);
}

.wbvb-fe-note {
	margin: 0;
	font-size: 0.8rem;
	color: #9ca3af;
}

.wbvb-fe-book {
	text-align: center;
}

.wbvb-fe-empty {
	color: #6b7280;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.wb-vehicle-grid,
	.wbvb-vehicle-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wbvb-single-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.wb-vehicle-grid,
	.wbvb-vehicle-posts {
		grid-template-columns: 1fr;
	}

	.wbvb-vehicle-posts.wbvb-layout-list .vehicle-post {
		grid-template-columns: 1fr;
	}

	.wbvb-vehicle-posts.wbvb-layout-list .vehicle-img {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
}
