/* =========================================================================
   RentDrive Pro — Vehicle Registration & Upload UI (v2.5.2)
   Car photo uploads (1 mandatory + 2 optional), document uploads
   (license, NID, driver photo), previews, progress bar, plus the
   single-vehicle gallery for approved cars.
   ========================================================================= */

/* ---------- Section titles inside the registration form ------------------ */
.rdp-reg-section-title {
	font-size: var(--rdp-text-base);
	font-weight: 700;
	margin: 26px 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--rdp-primary);
	color: var(--rdp-text);
}
.rdp-reg-section-title:first-of-type { margin-top: 8px; }

.rdp-req { color: #d64545; font-weight: 700; }

/* ---------- Upload grid --------------------------------------------------- */
.rdp-upload-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 8px;
}
@media (max-width: 640px) {
	.rdp-upload-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
	.rdp-upload-grid { grid-template-columns: 1fr; }
}

.rdp-upload-box {
	position: relative;
}

.rdp-upload-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 120px;
	padding: 14px 10px;
	border: 2px dashed var(--rdp-line);
	border-radius: var(--rdp-radius-sm);
	background: var(--rdp-surface);
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s var(--rdp-ease), background 0.2s var(--rdp-ease);
}
.rdp-upload-label:hover {
	border-color: var(--rdp-primary);
	background: color-mix(in srgb, var(--rdp-primary) 6%, var(--rdp-surface));
}
.rdp-upload-text {
	font-size: var(--rdp-text-sm);
	font-weight: 600;
	color: var(--rdp-text);
	line-height: 1.35;
}
.rdp-upload-label input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}
.rdp-upload-hint {
	font-size: var(--rdp-text-2xs);
	color: var(--rdp-text-muted);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Preview thumbnail after a file is chosen. */
.rdp-upload-preview {
	margin-top: 8px;
}
.rdp-upload-preview img {
	width: 100%;
	height: 90px;
	object-fit: cover;
	border-radius: var(--rdp-radius-sm);
	border: 1px solid var(--rdp-line);
}
.rdp-upload-filetag {
	display: inline-block;
	padding: 6px 12px;
	background: var(--rdp-primary);
	color: #fff;
	border-radius: var(--rdp-radius-sm);
	font-size: var(--rdp-text-xs);
	font-weight: 700;
}

/* ---------- Upload progress bar ------------------------------------------ */
.rdp-upload-progress {
	margin-top: 14px;
	height: 8px;
	background: var(--rdp-line);
	border-radius: 4px;
	overflow: hidden;
}
.rdp-upload-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--rdp-primary);
	transition: width 0.2s ease;
}

/* ---------- Success message styling -------------------------------------- */
.rdp-inline-msg-success {
	margin-top: 16px;
	padding: 14px 16px;
	background: #edfaef;
	border: 1px solid #b6e6bf;
	border-radius: var(--rdp-radius-sm);
	color: #1a7a33;
	font-weight: 500;
}

/* ---------- Single-vehicle gallery (approved cars: photos 2 & 3) --------- */
.rdp-vehicle-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.rdp-vehicle-gallery-item {
	display: block;
	border-radius: var(--rdp-radius-sm);
	overflow: hidden;
	border: 1px solid var(--rdp-line);
	transition: transform 0.2s var(--rdp-ease), box-shadow 0.2s var(--rdp-ease);
}
.rdp-vehicle-gallery-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--rdp-shadow-soft);
}
.rdp-vehicle-gallery-item img {
	width: 100%;
	height: 90px;
	object-fit: cover;
	display: block;
}
