/**
 * WC Request a Quote — modal styling.
 *
 * Theme-agnostic, low-specificity. Override in your theme as needed.
 */

/* Helper text below the Request Quote button */
.wcrq-button-wrap {
	margin-top: 1rem;
}

/* Injected into page-builder modules — slightly tighter spacing */
.wcrq-button-wrap--injected {
	margin-top: 1rem;
	width: 100%;
}

.wcrq-button-wrap--injected .wcrq-request-quote-btn {
	display: inline-block;
}

.wcrq-helper-text {
	font-size: 0.85rem;
	color: #666;
	margin-top: 0.5rem;
	margin-bottom: 0;
}

/* Lock body scroll when modal is open */
body.wcrq-modal-open {
	overflow: hidden;
}

/* Modal container */
.wcrq-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 2rem 1rem;
	overflow-y: auto;
}

.wcrq-modal.is-open {
	display: flex;
}

.wcrq-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.wcrq-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	max-width: 640px;
	width: 100%;
	padding: 2rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	z-index: 1;
	margin: auto;
}

.wcrq-modal-content h2 {
	margin-top: 0;
	margin-bottom: 1.25rem;
	padding-right: 2rem;
	font-size: 1.5rem;
}

.wcrq-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: transparent;
	border: 0;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0.25rem 0.5rem;
}

.wcrq-modal-close:hover,
.wcrq-modal-close:focus {
	color: #000;
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Selection summary block */
.wcrq-selection-summary {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

.wcrq-selection-summary h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.wcrq-selection-summary .wcrq-product-name {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
}

.wcrq-selection-summary .wcrq-attrs {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
}

.wcrq-selection-summary .wcrq-attrs li {
	margin: 0.25rem 0;
	text-transform: capitalize;
}

.wcrq-selection-summary .wcrq-qty {
	margin: 0.5rem 0;
}

.wcrq-selection-summary .wcrq-price {
	margin: 0.5rem 0 0;
	font-size: 1.1rem;
}

.wcrq-selection-summary .wcrq-price .price {
	font-weight: 600;
}

/* Gravity Form inside the modal — inherit theme styling but tighten spacing */
.wcrq-form-wrap .gform_wrapper {
	margin: 0;
}

.wcrq-form-wrap .gform_wrapper .gform_footer {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

/* Disabled quote button */
.wcrq-request-quote-btn[disabled],
.wcrq-request-quote-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Hide native Add to Cart buttons that we've replaced with Request Quote.
 * Uses !important because some themes/builders apply inline styles or
 * higher-specificity selectors to the button on hover/state changes.
 */
.wcrq-hidden,
.wcrq-hidden.single_add_to_cart_button,
button.wcrq-hidden {
	display: none !important;
	visibility: hidden !important;
}

/* Responsive — narrow viewports */
@media (max-width: 600px) {
	.wcrq-modal {
		padding: 1rem 0.5rem;
	}

	.wcrq-modal-content {
		padding: 1.25rem;
	}

	.wcrq-modal-content h2 {
		font-size: 1.25rem;
	}
}
