/* DriveBook public booking flow. Inherits the theme's font. */

.dbk-search { --dbk-accent: #2456e6; --dbk-border: #e2e8f0; --dbk-muted: #64748b; }

.dbk-search *,
.dbk-search *::before,
.dbk-search *::after { box-sizing: border-box; }

/* ---------- Search form ---------- */

.dbk-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
	padding: 18px;
	background: #f8fafc;
	border: 1px solid var(--dbk-border);
	border-radius: 12px;
	margin-bottom: 24px;
}

.dbk-field { display: flex; flex-direction: column; gap: 4px; }
.dbk-search-form .dbk-field { flex: 1; min-width: 200px; }

.dbk-field label { font-size: 0.8em; font-weight: 600; }

.dbk-field input,
.dbk-field select,
.dbk-field textarea {
	padding: 10px 12px;
	border: 1px solid var(--dbk-border);
	border-radius: 8px;
	font: inherit;
	width: 100%;
	background: #fff;
}

.dbk-field input:focus,
.dbk-field textarea:focus {
	border-color: var(--dbk-accent);
	box-shadow: 0 0 0 3px rgba(36, 86, 230, 0.15);
	outline: none;
}

.dbk-btn {
	padding: 11px 22px;
	background: var(--dbk-accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s;
}

.dbk-btn:hover { filter: brightness(0.92); color: #fff; }
.dbk-btn:disabled { opacity: 0.6; cursor: wait; }

.dbk-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--dbk-accent);
	font: inherit;
	cursor: pointer;
	margin-bottom: 8px;
}

/* ---------- Results grid ---------- */

.dbk-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.dbk-card {
	border: 1px solid var(--dbk-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s, transform 0.15s;
}

.dbk-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1); transform: translateY(-2px); }

.dbk-card-img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

.dbk-card-img--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	background: #f1f5f9;
}

.dbk-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dbk-card-title { margin: 0; font-size: 1.05em; }

.dbk-cats { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.dbk-cats span {
	background: #eef2ff;
	color: #3730a3;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.75em;
	font-weight: 600;
}

.dbk-specs { margin: 0; color: var(--dbk-muted); font-size: 0.85em; }

.dbk-price { margin-top: auto; display: flex; flex-direction: column; }
.dbk-price-total { font-size: 1.35em; font-weight: 700; }
.dbk-price-days { color: var(--dbk-muted); font-size: 0.8em; }

.dbk-card .dbk-btn { margin-top: 10px; width: 100%; }

/* ---------- Booking form ---------- */

.dbk-booking {
	max-width: 560px;
	padding: 24px;
	border: 1px solid var(--dbk-border);
	border-radius: 12px;
	background: #fff;
}

.dbk-booking h3 { margin: 0 0 4px; }
.dbk-summary { margin: 0 0 16px; color: var(--dbk-muted); }

.dbk-booking-form { display: flex; flex-direction: column; gap: 12px; }

.dbk-extras { display: flex; flex-direction: column; gap: 6px; }

.dbk-extra {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	font-weight: 400;
	cursor: pointer;
}

.dbk-field .dbk-extra { font-size: 0.95em; font-weight: 400; }

/* Checkboxes and radios keep their natural size (text inputs are full width). */
.dbk-field input[type="checkbox"],
.dbk-field input[type="radio"] {
	width: 18px;
	height: 18px;
	flex: none;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	accent-color: var(--dbk-accent);
}

/* Honeypot: visually hidden, still fillable by bots. */
.dbk-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* ---------- Feedback ---------- */

.dbk-muted { color: var(--dbk-muted); }

.dbk-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 10px 14px;
	border-radius: 8px;
	margin: 0;
}

.dbk-success {
	text-align: center;
	padding: 48px 24px;
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
	border-radius: 12px;
}

.dbk-success-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #16a34a;
	color: #fff;
	border-radius: 50%;
	font-size: 24px;
	font-weight: 700;
}

.dbk-success h3 { margin: 0 0 6px; }
.dbk-success p { margin: 0 0 4px; }

@media (max-width: 640px) {
	.dbk-search-form { flex-direction: column; align-items: stretch; }
	.dbk-btn--search { width: 100%; }
}

/* ---------- Photo gallery ---------- */

.dbk-card-media { position: relative; }

.dbk-photo-count {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 2px 8px;
	background: rgba(15, 23, 42, 0.7);
	color: #fff;
	border-radius: 999px;
	font-size: 0.75em;
}

.dbk-gallery { margin: 4px 0 16px; }

.dbk-gallery-main {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.dbk-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }

.dbk-gallery-thumbs button {
	flex: 0 0 auto;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	background: none;
	cursor: pointer;
	overflow: hidden;
}

.dbk-gallery-thumbs button.is-active { border-color: var(--dbk-accent); }

.dbk-gallery-thumbs img { width: 72px; height: 50px; object-fit: cover; display: block; }

.dbk-success--pending .dbk-success-icon { background: #fef3c7; color: #92400e; }

/* Driver documents heading and the terms checkbox (Settings → Booking form). */
.dbk-subtitle { margin: 8px 0 0; font-size: 0.95em; font-weight: 700; }
.dbk-terms { flex-wrap: wrap; align-items: flex-start; }
.dbk-terms input { margin-top: 3px; }
