/* Request-Price mode styles. Loaded only while the mode is ON. */

/* ---------------------------------------------------------------------------
 * Shared enquiry modal (Magnific inline content)
 * ------------------------------------------------------------------------ */
.majliya-rp-modal {
	background: #fff;
	max-width: 540px;
	width: 100%;
	margin: 24px auto;
	padding: 34px 32px;
	position: relative;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.18 );
}

.majliya-rp-modal__title {
	margin: 0 0 22px;
	font-size: 22px;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
 * Theme-native Gravity Form styling (scoped to our modal so the site's other
 * forms are untouched). Overrides Gravity Forms' gravity-theme defaults.
 * ------------------------------------------------------------------------ */
.majliya-rp-modal .gform_wrapper {
	margin: 0;
}

/* Field rhythm — clear space under every field. Gravity Forms renders here in
 * legacy markup (a <ul> of <li> fields, not a grid), so spacing comes from a
 * bottom margin on each field rather than a grid row-gap. */
.majliya-rp-modal .gform_wrapper .gform_fields {
	row-gap: 20px; /* harmless if modern markup is ever used */
	grid-row-gap: 20px;
}
.majliya-rp-modal .gform_wrapper .gfield {
	margin: 0 0 20px !important;
	padding: 0;
}
.majliya-rp-modal .gform_wrapper .gfield:last-child {
	margin-bottom: 0 !important;
}

/* Labels: small, muted, sentence case. */
.majliya-rp-modal .gform_wrapper .gfield_label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
	text-transform: none;
	letter-spacing: 0;
}

/* Required indicator: keep Gravity Forms' single native asterisk, just colour it. */
.majliya-rp-modal .gform_wrapper .gfield_required {
	color: #b32d2e;
	font-weight: 400;
}

/* Text inputs + textarea: clean, full-width, theme-consistent. */
.majliya-rp-modal .gform_wrapper input[type="text"],
.majliya-rp-modal .gform_wrapper input[type="email"],
.majliya-rp-modal .gform_wrapper input[type="tel"],
.majliya-rp-modal .gform_wrapper input[type="number"],
.majliya-rp-modal .gform_wrapper textarea {
	width: 100%;
	border: 1px solid #cfcfcf;
	border-radius: 2px;
	padding: 10px 12px;
	font-size: 15px;
	line-height: 1.4;
	background: #fff;
	color: #333;
	box-sizing: border-box;
}
.majliya-rp-modal .gform_wrapper textarea {
	min-height: 110px;
	resize: vertical;
}
.majliya-rp-modal .gform_wrapper input:focus,
.majliya-rp-modal .gform_wrapper textarea:focus {
	border-color: #000;
	outline: none;
}

/* Radio + checkbox groups: lay out inline/horizontal. */
.majliya-rp-modal .gform_wrapper .gfield_radio,
.majliya-rp-modal .gform_wrapper .gfield_checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
}
.majliya-rp-modal .gform_wrapper .gfield_radio .gchoice,
.majliya-rp-modal .gform_wrapper .gfield_checkbox .gchoice {
	display: flex;
	flex: 0 0 auto; /* keep the choice at content width so the label can't be squeezed */
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	margin: 0;
}
.majliya-rp-modal .gform_wrapper .gfield_radio .gchoice label,
.majliya-rp-modal .gform_wrapper .gfield_checkbox .gchoice label {
	margin: 0;
	max-width: none; /* override Gravity Forms' capped choice-label width */
	white-space: nowrap; /* keep multi-word labels (e.g. "Add a message") on one line */
	font-weight: 400;
	color: #333;
}

/* The "Add a message" checkbox already labels itself on the choice, so hide
 * its redundant field label. */
.majliya-rp-modal .gform_wrapper .majliya-rp-msg-field > .gfield_label {
	display: none;
}

/* Submit button — match the theme's black .btn.btn-primary (style.css:232). */
.majliya-rp-modal .gform_wrapper .gform_footer {
	margin-top: 20px;
	padding: 0;
	text-align: center;
}
.majliya-rp-modal .gform_wrapper .gform_footer input[type="submit"],
.majliya-rp-modal .gform_wrapper .gform_button {
	background: #000;
	color: #fff;
	border: 1px solid #000;
	border-radius: 2px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 14px;
	padding: 12px 30px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	width: auto;
}
.majliya-rp-modal .gform_wrapper .gform_footer input[type="submit"]:hover,
.majliya-rp-modal .gform_wrapper .gform_button:hover {
	background: #bdbdbd;
	color: #000;
	border-color: #bdbdbd;
}

/* Validation message tweaks. */
.majliya-rp-modal .gform_wrapper .gfield_validation_message,
.majliya-rp-modal .gform_wrapper .validation_message {
	font-size: 12px;
	padding: 4px 0 0;
	background: none;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * Buttons / cart visibility while in Request-Price mode
 * ------------------------------------------------------------------------ */
.request-price-button {
	cursor: pointer;
	display: inline-block;
}

/* Hide only the header cart UI (scoped to the header so nothing in the product
 * content is ever affected — the product layout is left exactly as the theme
 * renders it). */
header a[href*="/cart"],
header a[href*="/checkout"],
.site-header-cart,
.cart-contents {
	display: none !important;
}

.majliya-rp-mfp .mfp-close {
	color: #222;
}

/* ---------------------------------------------------------------------------
 * Single product: hide the add-to-cart form (price, variation selectors,
 * quantity, add-to-cart, product-addons total) and show the Request Price
 * button instead. The form stays in the DOM (display:none), so the product
 * gallery and variation scripts keep working exactly as in normal mode — we
 * touch nothing else on the product page.
 * ------------------------------------------------------------------------ */
body.single-product form.cart {
	display: none !important;
}

/* RTL niceties. */
.rtl .majliya-rp-modal {
	direction: rtl;
	text-align: right;
}
