/*
 * Ventureheap Builder - quote requests.
 */

.vhb-quote-button-wrap { display: block; }
.vhb-quote-note { margin: .6rem 0 0; font-size: .86rem; color: var(--vhb-muted); }

.vhb-price-on-request {
	display: inline-block;
	font-weight: 600;
	color: var(--vhb-primary);
}

.woocommerce ul.products li.product .vhb-quote-button--loop {
	display: block;
	width: 100%;
	margin-top: auto;
	padding: .6rem 1rem;
	font-size: .9rem;
	font-weight: 600;
	text-align: center;
	color: #fff;
	background: var(--vhb-primary);
	border: 0;
	border-radius: var(--vhb-radius-btn);
	cursor: pointer;
}

.vhb-quote-button--loop:hover { filter: brightness(.92); }

/* Modal ------------------------------------------------------------------- */
body.vhb-quote-open { overflow: hidden; }

.vhb-quote-modal { position: fixed; inset: 0; z-index: 99999; }
.vhb-quote-modal[hidden] { display: none; }

.vhb-quote-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .6);
	animation: vhb-quote-fade .2s ease;
}

.vhb-quote-modal__dialog {
	position: relative;
	width: min(94vw, 620px);
	max-height: 92vh;
	margin: 4vh auto;
	padding: 28px;
	overflow-y: auto;
	background: var(--vhb-bg);
	border-radius: var(--vhb-radius);
	box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
	animation: vhb-quote-rise .22s ease;
}

@keyframes vhb-quote-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vhb-quote-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.vhb-quote-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--vhb-muted);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.vhb-quote-modal__close:hover { background: var(--vhb-alt); color: var(--vhb-secondary); }

.vhb-quote-modal__title { margin: 0 0 .4rem; font-size: 1.35rem; color: var(--vhb-secondary); }

.vhb-quote-modal__item {
	margin: 0 0 1rem;
	padding: .6rem .9rem;
	font-size: .92rem;
	color: var(--vhb-secondary);
	background: var(--vhb-alt);
	border-radius: var(--vhb-radius-btn);
	border-left: 3px solid var(--vhb-primary);
}

.vhb-quote-modal__item[hidden] { display: none; }
.vhb-quote-modal__item strong { font-weight: 700; }

.vhb-quote-modal__message:empty { display: none; }
.vhb-quote-modal__message p { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--vhb-radius-btn); }

.vhb-quote-modal__consent { margin: .8rem 0 0; font-size: .82rem; color: var(--vhb-muted); }

.vhb-quote-modal .vhb-form-actions { margin-top: 1.2rem; }
.vhb-quote-modal .vhb-form-submit { width: 100%; }

.vhb-quote-modal.is-done .vhb-quote-form { display: none; }
.vhb-quote-modal.is-done .vhb-quote-modal__item { display: none; }

@media (prefers-reduced-motion: reduce) {
	.vhb-quote-modal__backdrop,
	.vhb-quote-modal__dialog { animation: none; }
}

/* Admin dashboard --------------------------------------------------------- */
.vhb-quotes-search { margin: 12px 0; display: flex; gap: 8px; align-items: center; }
.vhb-quotes-table { margin-top: 8px; }
.vhb-quotes-export { margin-top: 16px; }

.vhb-quote-status {
	display: inline-block;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 999px;
	background: #f0f0f1;
	color: #50575e;
}

.vhb-quote-status--new { background: #eef4ff; color: #1a56db; }
.vhb-quote-status--contacted { background: #fcf9e8; color: #8a6d1f; }
.vhb-quote-status--quoted { background: #f3e8ff; color: #6b21a8; }
.vhb-quote-status--won { background: #edfaef; color: #00622c; }
.vhb-quote-status--lost { background: #fcf0f1; color: #a02222; }

/* ------------------------------------------------------------ Mobile pass */
@media (max-width: 600px) {
	.vhb-quote-modal__dialog {
		width: 100%;
		max-height: 100%;
		margin: 0;
		padding: 20px 16px 28px;
		border-radius: 0;
		min-height: 100%;
	}

	.vhb-quote-modal__title { font-size: 1.15rem; padding-right: 36px; }
	.vhb-quote-modal .vhb-form-grid { grid-template-columns: 1fr; }
}

/* Field types added by the form builder -------------------------------- */
.vhb-quote-modal select {
	width: 100%;
	font: inherit;
	color: var(--vhb-text);
	padding: .7rem .9rem;
	background: var(--vhb-bg);
	border: 1px solid var(--vhb-border);
	border-radius: var(--vhb-radius-btn);
}

.vhb-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	cursor: pointer;
}

.vhb-field--check input { margin-top: .25rem; flex: 0 0 auto; }

.vhb-field-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vhb-field-radios label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-weight: 400;
	cursor: pointer;
}

.vhb-field.has-error input,
.vhb-field.has-error select,
.vhb-field.has-error textarea { border-color: #dc2626; }
