/* VMS Request a Quote — Frontend styles */

/* Quote button */
.vms-raq-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background: #2c6ecb;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.vms-raq-button:hover {
	background: #1a5bb5;
	color: #fff;
}

.vms-raq-button:disabled,
.vms-raq-button.vms-raq-added {
	opacity: 0.7;
	cursor: default;
}

.vms-raq-button.vms-raq-in-list {
	/* Color set via JS from backend setting (vars.addedBgColor). */
	opacity: 1;
	cursor: pointer;
}

.vms-raq-button.vms-raq-loading {
	opacity: 0.6;
	pointer-events: none;
}

.vms-raq-btn-icon {
	flex-shrink: 0;
	vertical-align: middle;
}

/* Quote list table */
.vms-raq-list-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}

.vms-raq-list-table th,
.vms-raq-list-table td {
	padding: 12px 8px;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
	vertical-align: middle;
}

.vms-raq-list-table thead th {
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #555;
	border-bottom: 2px solid #ddd;
}

.vms-raq-col-image {
	width: 70px;
}

.vms-raq-col-image img {
	display: block;
	max-width: 60px;
	height: auto;
	border-radius: 3px;
}

.vms-raq-col-qty {
	width: 80px;
	text-align: center;
}

.vms-raq-col-price {
	width: 110px;
	text-align: right;
	white-space: nowrap;
}

.vms-raq-col-remove {
	width: 40px;
	text-align: center;
}

.vms-raq-list-table tfoot td {
	border-bottom: 1px solid #e5e5e5;
}

.vms-raq-total-row td {
	border-top: 2px solid #ddd;
	padding-top: 14px;
	font-weight: 700;
}

.vms-raq-total-label {
	text-align: right !important;
}

.vms-raq-total-value {
	text-align: right !important;
	white-space: nowrap;
}

/* Price summary box */
.vms-raq-price-summary {
	margin: 20px 0;
	padding: 16px 20px;
	background: #f8f9fa;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	max-width: 360px;
	margin-left: auto;
}

.vms-raq-price-summary dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 16px;
	margin: 0;
}

.vms-raq-price-summary dt {
	color: #555;
	font-size: 14px;
}

.vms-raq-price-summary dd {
	text-align: right;
	margin: 0;
	font-size: 14px;
	white-space: nowrap;
}

.vms-raq-price-summary dt.vms-raq-summary-discount,
.vms-raq-price-summary dd.vms-raq-summary-discount {
	color: #d32f2f;
}

.vms-raq-price-summary dt.vms-raq-summary-total,
.vms-raq-price-summary dd.vms-raq-summary-total {
	font-weight: 700;
	font-size: 16px;
	border-top: 1px solid #ddd;
	padding-top: 10px;
	margin-top: 6px;
}

.vms-raq-qty-input {
	width: 60px;
	text-align: center;
	padding: 4px 6px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.vms-raq-remove-item {
	background: none;
	border: none;
	color: #999;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
	transition: color 0.15s ease;
}

.vms-raq-remove-item:hover {
	color: #d32f2f;
}

/* Variation and add-on details */
.vms-raq-variation {
	font-size: 12px;
	color: #777;
	margin-top: 3px;
}

.vms-raq-addons {
	margin-top: 6px;
	font-size: 12px;
	color: #666;
}

.vms-raq-addon-line {
	padding-left: 12px;
	position: relative;
}

.vms-raq-addon-line::before {
	content: "\2514";
	position: absolute;
	left: 0;
	color: #bbb;
}

.vms-raq-addon-price {
	color: #999;
}

/* Quote form */
.vms-raq-form {
	max-width: 600px;
}

.vms-raq-field {
	margin-bottom: 16px;
}

.vms-raq-field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 14px;
}

.vms-raq-required {
	color: #d32f2f;
}

.vms-raq-field input[type="text"],
.vms-raq-field input[type="email"],
.vms-raq-field input[type="tel"],
.vms-raq-field input[type="number"],
.vms-raq-field select,
.vms-raq-field textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

.vms-raq-field textarea {
	resize: vertical;
}

.vms-raq-field input:focus,
.vms-raq-field select:focus,
.vms-raq-field textarea:focus {
	border-color: #2c6ecb;
	outline: none;
	box-shadow: 0 0 0 2px rgba(44, 110, 203, 0.15);
}

.vms-raq-field.vms-raq-field-error input,
.vms-raq-field.vms-raq-field-error select,
.vms-raq-field.vms-raq-field-error textarea {
	border-color: #d32f2f;
}

.vms-raq-form-footer {
	margin-top: 20px;
}

.vms-raq-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	background: #2c6ecb;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.vms-raq-submit:hover {
	background: #1a5bb5;
	color: #fff;
}

.vms-raq-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Messages */
.vms-raq-form-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
}

.vms-raq-form-message.vms-raq-success {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #c8e6c9;
}

.vms-raq-form-message.vms-raq-error {
	background: #ffebee;
	color: #c62828;
	border: 1px solid #ffcdd2;
}

/* WC notice after adding to list */
.vms-raq-notice {
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #c8e6c9;
	border-radius: 4px;
	font-size: 14px;
}

.vms-raq-notice a {
	color: #1b5e20;
	font-weight: 600;
}

/* Empty list */
.vms-raq-empty-message {
	text-align: center;
	padding: 50px 20px;
	color: #999;
}

.vms-raq-empty-icon {
	margin-bottom: 12px;
	color: #ccc;
}

.vms-raq-empty-message p {
	margin: 4px 0;
	font-size: 15px;
}

.vms-raq-empty-hint {
	font-size: 13px !important;
	color: #aaa;
}

/* Loading state */
.vms-raq-loading {
	text-align: center;
	padding: 30px;
	color: #999;
}

/* Button link */
.vms-raq-btn-link {
	margin-top: 6px;
	font-size: 13px;
}

.vms-raq-btn-link a {
	color: #2c6ecb;
	text-decoration: none;
	font-weight: 600;
}

/* Section headings */
.vms-raq-section-heading {
	margin: 0 0 16px;
}

/* Quote page wrapper */
.vms-raq-quote-page {
	display: flex;
	flex-direction: column;
	margin-bottom: 40px;
}

/* Reorder: form first */
.vms-raq-quote-page.vms-raq-order-form-first .vms-raq-list-section {
	order: 2;
}

.vms-raq-quote-page.vms-raq-order-form-first .vms-raq-form-container {
	order: 1;
}

.vms-raq-quote-page.vms-raq-order-form-first .vms-raq-empty-message {
	order: 3;
}

/* 2-column layout */
.vms-raq-quote-page.vms-raq-layout-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: start;
}

.vms-raq-quote-page.vms-raq-layout-2col .vms-raq-empty-message {
	grid-column: 1 / -1;
}

.vms-raq-quote-page.vms-raq-layout-2col .vms-raq-form {
	max-width: 100%;
}

/* Mini quote widget */
.vms-raq-mini {
	position: fixed;
	bottom: 20px;
	z-index: 999;
}

.vms-raq-mini-right {
	right: 20px;
}

.vms-raq-mini-left {
	left: 20px;
}

.vms-raq-mini-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #2c6ecb;
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 12px 18px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease;
}

.vms-raq-mini-toggle:hover {
	background: #1a5bb5;
}

.vms-raq-mini-count {
	background: #fff;
	color: #2c6ecb;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
}

.vms-raq-mini-dropdown {
	position: absolute;
	bottom: 56px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	padding: 16px;
	min-width: 280px;
	max-height: 300px;
	overflow-y: auto;
}

.vms-raq-mini-right .vms-raq-mini-dropdown {
	right: 0;
}

.vms-raq-mini-left .vms-raq-mini-dropdown {
	left: 0;
}

.vms-raq-mini-link {
	margin: 12px 0 0;
	text-align: center;
}

.vms-raq-mini-link a {
	color: #2c6ecb;
	font-weight: 600;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
	.vms-raq-col-image {
		display: none;
	}

	.vms-raq-list-table th,
	.vms-raq-list-table td {
		padding: 8px 4px;
		font-size: 13px;
	}

	.vms-raq-form {
		max-width: 100%;
	}

	.vms-raq-quote-page.vms-raq-layout-2col {
		grid-template-columns: 1fr;
	}
}
