/* Quote request for products without price: pop-up and /devis page */

.ha-quote-popup {
	padding: 1.5rem;
	min-width: min(32rem, 90vw);
}

.ha-quote-popup h2 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ai-primary);
	margin: 0 0 1rem;
	padding-right: 2rem;
}


/* Product lines (pop-up and page) */

.ha-quote-lines {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	border-top: 1px solid #e9ecef;
}

.ha-quote-line {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #e9ecef;
}

.ha-quote-image {
	flex: 0 0 3.5rem;
	width: 3.5rem;
	height: 3.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e9ecef;
	border-radius: 0.5rem;
	background: #fff;
	padding: 0.25rem;
}

.ha-quote-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.ha-quote-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.ha-quote-name {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ai-primary);
	line-height: 1.3;
}

.ha-quote-code {
	font-size: 0.75rem;
	color: #6c757d;
}

.ha-quote-qty {
	font-size: 0.8rem;
	color: #6c757d;
	white-space: nowrap;
}


/* Buttons */

.ha-quote-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.75rem;
}

.ha-quote-btn,
.ha-quote-btn:link,
.ha-quote-btn:visited {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--ai-secondary-alt);
	border-radius: 6px;
	background: var(--ai-secondary-alt);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

.ha-quote-btn:hover {
	filter: brightness(0.92);
	color: #fff;
}

.ha-quote-btn--outline,
.ha-quote-btn--outline:link,
.ha-quote-btn--outline:visited {
	background: #fff;
	color: var(--ai-secondary-alt);
}

.ha-quote-btn--outline:hover {
	filter: none;
	background: var(--ai-secondary-alt);
	color: #fff;
}


/* Page /devis: white card, same inner margins as the form (.ha-auth-form) */

.ha-quote-page .ha-auth-card-header {
	background-color: #fff;
}

.ha-quote-products {
	padding: 1.25rem 1.5rem 0;
}

.ha-quote-page .ha-auth-card > .ha-auth-submit {
	width: calc(100% - 3rem);
	margin: 1.25rem 1.5rem;
}

.ha-quote-qty-input {
	width: 4.5rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	font-size: 0.875rem;
	text-align: center;
}

.ha-quote-remove {
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #adb5bd;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.ha-quote-remove:hover {
	background: #fef2f2;
	color: #dc3545;
}

.ha-quote-update {
	border: none;
	background: none;
	padding: 0;
	color: var(--ai-secondary-alt);
	font-size: 0.8rem;
	text-decoration: underline;
	cursor: pointer;
}

.ha-quote-login {
	font-size: 0.875rem;
	color: #6c757d;
	margin: 1rem 1.5rem 0;
}

.ha-quote-login a {
	color: var(--ai-secondary-alt);
	font-weight: 500;
}

.ha-quote-page textarea {
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	font-size: 0.875rem;
	font-family: inherit;
	resize: vertical;
}

.ha-quote-page textarea:focus {
	outline: none;
	border-color: var(--ai-secondary-alt);
}

/* Missing or invalid field after sending: red frame, the typed values are kept */
.ha-quote-page .ha-field-error input,
.ha-quote-page .ha-field-error textarea {
	border-color: #dc3545 !important;
	background: #fef2f2;
}

.ha-quote-page .ha-auth-checkbox.ha-field-error span {
	color: #dc3545;
}


/* Variant choice pop-up (e.g. memory capacity) */

.ha-quote-choose .ha-quote-line {
	border-top: 1px solid #e9ecef;
}

.ha-quote-fields {
	display: flex;
	gap: 1rem;
	margin: 1rem 0 1.25rem;
}

.ha-quote-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--ai-primary);
}

.ha-quote-field--qty {
	flex: 0 0 6rem;
}

.ha-quote-field select,
.ha-quote-field input {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	background-color: #fff;
	font-size: 0.875rem;
	color: var(--ai-primary);
}

.ha-quote-field select:focus,
.ha-quote-field input:focus {
	outline: none;
	border-color: var(--ai-secondary-alt);
}

button.ha-quote-btn {
	cursor: pointer;
	font-family: inherit;
}
