/* ============================================================
   Contactar con el Vendedor – Estilos
   ============================================================ */

/* --- Botón principal --- */
.cv-btn-contactar {
	display: inline-flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	margin-top: 8px;
	background-color: #fff;
	color: #9ED92D;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid #9ED92D;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
	line-height: 1.3;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.cv-btn-contactar:hover {
	background-color: #759f24;
	color: #fff;
}

.cv-btn-contactar:active {
	transform: scale(0.98);
}

/* --- Overlay --- */
.cv-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.cv-overlay[hidden] {
	display: none !important;
}

/* --- Modal --- */
.cv-modal {
	background: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 660px;
	max-height: 92vh;
	overflow-y: auto;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
	position: relative;
	box-sizing: border-box;
	padding: 28px 32px 32px;
	animation: cv-modal-in 0.22s ease;
}

@keyframes cv-modal-in {
	from { opacity: 0; transform: translateY(-16px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* --- Cabecera del modal --- */
.cv-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.cv-modal__title {
	color: #9ED92D;
	font-size: 22px;
	font-weight: 700;
	margin: 0;
	padding: 0;
	border: none;
}

.cv-modal__close {
	background: none;
	border: none;
	font-size: 20px;
	color: #666;
	cursor: pointer;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 4px;
	flex-shrink: 0;
	transition: color 0.15s, background 0.15s;
}

.cv-modal__close:hover {
	color: #333;
	background: #f0f0f0;
}

/* --- Divider --- */
.cv-divider {
	border: none;
	border-top: 1px solid #e5e5e5;
	margin: 16px 0;
}

/* --- Datos del vendedor --- */
.cv-vendor-info {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 4px;
}

.cv-vendor-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid #ddd;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafafa;
}

.cv-vendor-avatar svg {
	width: 52px;
	height: 52px;
}

.cv-vendor-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cv-vendor-name {
	font-weight: 700;
	font-size: 16px;
	color: #222;
}

.cv-vendor-phone {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #444;
	font-size: 14px;
}

.cv-icon-phone {
	width: 16px;
	height: 16px;
	color: #555;
	flex-shrink: 0;
}

/* --- Secciones del formulario --- */
.cv-form-section {
	margin-bottom: 20px;
}

.cv-form-section:last-child {
	margin-bottom: 0;
}

.cv-form-step {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 16px;
	color: #222;
}

.cv-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	background: #9ED92D;
	color: #fff;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.cv-label-secondary {
	display: block;
	font-size: 13px;
	color: #555;
	margin-bottom: 10px;
}

/* --- Textarea --- */
.cv-textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 14px;
	color: #333;
	resize: vertical;
	min-height: 100px;
	outline: none;
	transition: border-color 0.2s;
}

.cv-textarea:focus {
	border-color: #9ED92D;
}

.cv-textarea::placeholder {
	color: #aaa;
}

/* --- Input email --- */
.cv-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	color: #333;
	outline: none;
	transition: border-color 0.2s;
}

.cv-input:focus {
	border-color: #9ED92D;
}

.cv-input::placeholder {
	color: #aaa;
}

/* --- Slots de imágenes --- */
.cv-image-slots {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.cv-image-slot {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cv-image-preview {
	position: relative;
	background: #f2f2f2;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 4/3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cv-car-placeholder {
	width: 90%;
	height: auto;
}

.cv-image-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cv-image-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0,0,0,0.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 11px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: background 0.15s;
}

.cv-image-remove:hover {
	background: rgba(0,0,0,0.8);
}

.cv-btn-upload {
	display: block;
	text-align: center;
	padding: 6px 4px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 12px;
	color: #444;
	cursor: pointer;
	background: #fff;
	transition: background 0.15s, border-color 0.15s;
}

.cv-btn-upload:hover {
	background: #f5f0fa;
	border-color: #9ED92D;
	color: #9ED92D;
}

/* --- Checkbox --- */
.cv-form-section--checkbox {
	margin-bottom: 16px;
}

.cv-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: #444;
	cursor: pointer;
	line-height: 1.5;
}

.cv-checkbox {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-top: 2px;
	accent-color: #9ED92D;
	cursor: pointer;
}

/* --- Feedback --- */
.cv-feedback {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 16px;
}

.cv-feedback.cv-feedback--success {
	background: #edf7ed;
	color: #1e6f26;
	border: 1px solid #a8d8a9;
}

.cv-feedback.cv-feedback--error {
	background: #fdecea;
	color: #b71c1c;
	border: 1px solid #f5c0bc;
}

/* --- Botón submit --- */
.cv-form-section--submit {
	display: flex;
	justify-content: center;
}

.cv-btn-submit {
	background: #9ED92D;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 14px 48px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	min-width: 220px;
}

.cv-btn-submit:hover {
	background: #759f24;
}

.cv-btn-submit:active {
	transform: scale(0.98);
}

.cv-btn-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* --- Responsive --- */
@media (max-width: 500px) {
	.cv-modal {
		padding: 20px 16px 24px;
	}

	.cv-image-slots {
		grid-template-columns: repeat(2, 1fr);
	}

	.cv-btn-submit {
		width: 100%;
		padding: 14px 24px;
	}
}
