/* ── Inquiry CTA button (ExposeInquiryButtonWidget) ─────────────────────── */

.roark-inquiry-cta {
	width: 100%;
	margin: 20px 0;
	text-align: center;
}

.roark-inquiry-cta-button {
	display: inline-block;
	cursor: pointer;
	border: 1px solid var(--roark-btn-primary-bg, #2563eb);
	border-radius: var(--roark-radius-btn, 6px);
	background-color: var(--roark-btn-primary-bg, #2563eb);
	color: var(--roark-btn-primary-fg, #fff);
	text-align: center;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.roark-inquiry-cta-button:hover,
.roark-inquiry-cta-button:focus-visible {
	background-color: var(--roark-btn-primary-bg-hover, #1d4ed8);
	border-color: var(--roark-btn-primary-bg-hover, #1d4ed8);
	color: var(--roark-btn-primary-fg, #fff);
}

.roark-inquiry-cta-button:focus-visible {
	outline: 2px solid var(--roark-btn-primary-bg, #2563eb);
	outline-offset: 2px;
}

.roark-inquiry-cta-button--sm {
	padding: 10px 18px;
	font-size: 0.9rem;
}

.roark-inquiry-cta-button--md {
	padding: 13px 24px;
	font-size: 1rem;
}

.roark-inquiry-cta-button--lg {
	padding: 17px 32px;
	font-size: 1.1rem;
	font-weight: 600;
}

/* ── Hidden source: the ExposeInquiryFormWidget instance rendered once,
   moved into the modal body on first open (see inquiry-modal.js). Hidden
   both before the move (sitting wherever the template placed it) and if,
   for any reason, JS never ran. ─────────────────────────────────────────── */
.roark-inquiry-modal-source--pending {
	display: none;
}

/* ── Modal shell (built entirely by inquiry-modal.js) ───────────────────── */

.roark-inquiry-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.roark-inquiry-modal[hidden] {
	display: none;
}

.roark-inquiry-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.roark-inquiry-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: var(--roark-radius-card, 10px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.roark-inquiry-modal__close {
	position: sticky;
	top: 0;
	left: 100%;
	margin: 8px 8px -32px auto;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: var(--roark-radius-pill, 999px);
	background: rgba(255, 255, 255, 0.9);
	color: #6b7280;
	box-shadow: none;
	cursor: pointer;
	z-index: 2;
}

/* The theme styles every `button:hover/:focus/:active` with its own button
   background (Kadence: `--global-palette-btn-bg-hover`, a saturated blue), which
   turned this light icon button into a blue disc with a dark cross on hover.
   Pin all three states here — the selector carries the pseudo-class too, so it
   outranks the theme's bare `button:hover`. */
.roark-inquiry-modal__close:hover,
.roark-inquiry-modal__close:focus,
.roark-inquiry-modal__close:active {
	background: #f3f4f6;
	color: #1f2937;
	box-shadow: none;
}

.roark-inquiry-modal__close:focus-visible {
	outline: 2px solid #1f2937;
	outline-offset: 2px;
}

/* The cross is drawn, not typed: a text "×" sits wherever the font's own
   metrics put it, which is never quite the middle of a 32px circle (and moves
   with the theme's font). Two 14×2 bars centred on the button are exact.
   The <span>&times;</span> from inquiry-modal.js stays for no-CSS fallback
   and is hidden here; the button's aria-label carries the name. */
.roark-inquiry-modal__close > span {
	display: none;
}

.roark-inquiry-modal__close::before,
.roark-inquiry-modal__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
}

.roark-inquiry-modal__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.roark-inquiry-modal__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.roark-inquiry-modal__body {
	padding: 36px 40px 32px;
}

/* ── The dialog IS the card ─────────────────────────────────────────────── */
/* ExposeInquiryFormWidget styles `.roark-inquiry-wrap` as a card (background,
   border, shadow, padding — Elementor CardStylingTrait, per-site customizable).
   Inside the dialog that produces a card within a card, so the wrapper is
   flattened here — scoped to the modal only, so the same widget placed inline
   on a page keeps whatever card look the site configured. `!important`
   because the widget's card values are emitted as Elementor inline CSS. */
.roark-inquiry-modal__body .roark-inquiry-wrap,
.roark-inquiry-modal__body .elementor-widget-roark_expose_inquiry_form > .elementor-widget-container {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ── Breathing room inside the dialog ───────────────────────────────────── */
.roark-inquiry-modal__body .roark-inquiry-title,
.roark-inquiry-modal__body .roark-inquiry-form > h2,
.roark-inquiry-modal__body .roark-inquiry-form > h3 {
	margin: 0 0 20px;
}

.roark-inquiry-modal__body .roark-inquiry-field {
	margin-bottom: 20px;
}

.roark-inquiry-modal__body .roark-inquiry-label {
	margin-bottom: 4px;
	font-weight: 500;
}

.roark-inquiry-modal__body .roark-inquiry-field--consent,
.roark-inquiry-modal__body .roark-inquiry-field--legal {
	margin: 4px 0 24px;
}

.roark-inquiry-modal__body .roark-inquiry-field--captcha {
	margin-bottom: 20px;
}

.roark-inquiry-modal__body .roark-inquiry-field--submit {
	margin-top: 4px;
}

.roark-inquiry-modal__body .roark-inquiry-privacy-note {
	margin-top: 12px;
}

.roark-inquiry-modal__body .roark-inquiry-wrap {
	width: 100%;
}

/* Prevent the background page from scrolling behind the open modal. */
body.roark-inquiry-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.roark-inquiry-modal {
		padding: 12px;
	}

	.roark-inquiry-modal__body {
		padding: 28px 18px 20px;
	}
}
