/* JWM Service Estimator - front-end styles.
   Inherits the host theme's font and matches a clean, branded look.
   High-specificity overrides (.jwm-est-app scope + !important on interactive
   states) stop the theme's global button/anchor styles (e.g. dark "mouseover"
   backgrounds) from bleeding into the widget. */

.jwm-est-app {
	--jwm-primary: #011e3e;
	--jwm-accent: #df5f41;
	--jwm-ink: #1f2733;
	--jwm-muted: #74787c;
	--jwm-line: #dce1e7;
	--jwm-card: #ffffff;
	--jwm-soft: #f3f6f9;
	max-width: 640px;
	margin: 0 auto;
	font-family: "Montserrat", inherit, sans-serif;
	color: var(--jwm-ink);
	line-height: 1.5;
	box-sizing: border-box;
}
.jwm-est-app *,
.jwm-est-app button,
.jwm-est-app input,
.jwm-est-app textarea,
.jwm-est-app select {
	font-family: inherit;
	box-sizing: border-box;
}
.jwm-est-card {
	background: var(--jwm-card);
	border: 1px solid var(--jwm-line);
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(1, 30, 62, .07);
}
.jwm-progress {
	height: 5px;
	background: var(--jwm-soft);
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 22px;
}
.jwm-progress-bar { height: 100%; background: var(--jwm-accent); transition: width .3s ease; }
.jwm-headline { margin: 0 0 6px; color: var(--jwm-primary); font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.jwm-intro { margin: 0 0 18px; color: var(--jwm-muted); font-size: .98rem; }
.jwm-q { font-weight: 700; font-size: 1.1rem; color: var(--jwm-primary); margin: 0 0 14px; }
.jwm-label {
	display: block; font-weight: 600; color: var(--jwm-primary);
	margin: 18px 0 8px; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase;
}
.jwm-req { color: var(--jwm-accent); }
.jwm-options { display: flex; flex-direction: column; gap: 10px; }
.jwm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jwm-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.jwm-est-app .jwm-option {
	display: block; width: 100%; text-align: left; margin: 0; padding: 15px 18px;
	border: 1px solid var(--jwm-line) !important; border-radius: 6px;
	background: var(--jwm-card) !important; color: var(--jwm-ink) !important;
	font-size: 1rem; font-weight: 500; line-height: 1.3; cursor: pointer;
	box-shadow: none !important; text-transform: none;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.jwm-est-app .jwm-option.jwm-sm { text-align: center; padding: 13px 12px; }
.jwm-est-app .jwm-option:hover,
.jwm-est-app .jwm-option:focus {
	border-color: var(--jwm-primary) !important; background: var(--jwm-soft) !important;
	color: var(--jwm-primary) !important; outline: none;
}
.jwm-est-app .jwm-option.selected,
.jwm-est-app .jwm-option.selected:hover,
.jwm-est-app .jwm-option.selected:focus {
	border-color: var(--jwm-primary) !important; background: var(--jwm-primary) !important; color: #fff !important;
}
.jwm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jwm-field { display: flex; flex-direction: column; }
.jwm-field:first-child { grid-column: 1 / -1; }
.jwm-est-app .jwm-input {
	width: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--jwm-line);
	border-radius: 6px; background: #fff; color: var(--jwm-ink); font-size: 1rem; line-height: 1.4;
}
.jwm-est-app .jwm-input:focus {
	outline: none; border-color: var(--jwm-primary); box-shadow: 0 0 0 3px rgba(1, 30, 62, .08);
}
.jwm-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.jwm-est-app .jwm-back,
.jwm-est-app .jwm-next,
.jwm-est-app .jwm-submit {
	margin: 0; padding: 13px 26px; border: 1px solid transparent !important; border-radius: 2px;
	font-size: .9rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
	cursor: pointer; box-shadow: none !important; transition: background-color .15s ease, opacity .15s ease;
}
.jwm-est-app .jwm-back { background: #fff !important; color: var(--jwm-primary) !important; border-color: var(--jwm-line) !important; }
.jwm-est-app .jwm-back:hover { background: var(--jwm-soft) !important; color: var(--jwm-primary) !important; }
.jwm-est-app .jwm-next,
.jwm-est-app .jwm-submit { background: var(--jwm-primary) !important; color: #fff !important; margin-left: auto; }
.jwm-est-app .jwm-next:hover,
.jwm-est-app .jwm-submit:hover { background: #00152d !important; color: #fff !important; }
.jwm-est-app .jwm-submit:disabled { opacity: .6; cursor: default; }
.jwm-err { color: #c0392b; font-size: .9rem; margin: 12px 0 0; min-height: 1em; }
.jwm-result { text-align: center; }
.jwm-result-label {
	color: var(--jwm-muted); text-transform: uppercase; letter-spacing: .08em;
	font-size: .78rem; font-weight: 600; margin: 0 0 8px;
}
.jwm-range { font-size: 2.5rem; font-weight: 700; color: var(--jwm-primary); margin: 0 0 16px; line-height: 1.1; }
.jwm-range-text { font-size: 1.15rem; color: var(--jwm-ink); margin: 0 0 16px; }
.jwm-disclaimer {
	font-size: .82rem; color: var(--jwm-muted); border-left: 3px solid var(--jwm-accent);
	text-align: left; padding: 10px 14px; background: var(--jwm-soft);
	border-radius: 0 6px 6px 0; margin: 0 auto 22px; line-height: 1.5;
}
.jwm-booking { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.jwm-est-app .jwm-cta {
	display: inline-block; background: var(--jwm-accent) !important; color: #fff !important;
	padding: 16px 34px; border: none !important; border-radius: 2px; font-weight: 600;
	font-size: .95rem; letter-spacing: .03em; text-transform: uppercase;
	text-decoration: none !important; transition: filter .15s ease;
}
.jwm-est-app .jwm-cta:hover { filter: brightness(.93); color: #fff !important; }
.jwm-est-app .jwm-call { color: var(--jwm-primary) !important; text-decoration: none !important; font-weight: 600; font-size: .95rem; }
.jwm-est-app .jwm-call:hover { color: var(--jwm-accent) !important; }
.jwm-est-loading { text-align: center; color: var(--jwm-muted); padding: 40px; }
@media (max-width: 520px) {
	.jwm-est-card { padding: 22px; }
	.jwm-form-grid, .jwm-grid { grid-template-columns: 1fr; }
	.jwm-range { font-size: 2rem; }
	.jwm-headline { font-size: 1.35rem; }
}

/* ---------- Floating widget (launcher + slide-up panel) ---------- */
.jwm-fab {
	--jwm-primary: #011e3e;
	--jwm-accent: #df5f41;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100000;
	font-family: "Montserrat", inherit, sans-serif;
}
.jwm-fab.jwm-fab-left { right: auto; left: 24px; }
.jwm-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	background: var(--jwm-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 15px 24px;
	font-size: .9rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(1, 30, 62, .30);
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.jwm-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(1, 30, 62, .38); color: #fff; }
.jwm-launcher-icon { display: inline-flex; }
.jwm-launcher-icon svg { width: 19px; height: 19px; display: block; }
.jwm-fab-open .jwm-launcher { opacity: 0; visibility: hidden; transform: scale(.9); pointer-events: none; }

.jwm-fab-panel {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 386px;
	max-width: calc(100vw - 32px);
	max-height: min(82vh, 720px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(1, 30, 62, .32);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 100001;
}
.jwm-fab-left .jwm-fab-panel { right: auto; left: 24px; transform-origin: bottom left; }
.jwm-fab-open .jwm-fab-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.jwm-fab-head {
	flex: 0 0 auto;
	background: var(--jwm-primary);
	color: #fff;
	padding: 15px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.jwm-fab-head span { font-size: 1rem; font-weight: 700; }
.jwm-fab-close {
	background: transparent; border: none; color: #fff; font-size: 24px; line-height: 1;
	cursor: pointer; padding: 0 4px; opacity: .85; transition: opacity .15s ease;
}
.jwm-fab-close:hover { opacity: 1; color: #fff; }
.jwm-fab-body { padding: 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Strip the inline card chrome when inside the panel. */
.jwm-fab-body .jwm-est-app { max-width: none; }
.jwm-fab-body .jwm-est-card { border: none; box-shadow: none; border-radius: 0; padding: 0; }

@media (max-width: 520px) {
	.jwm-fab { right: 16px; bottom: 16px; }
	.jwm-fab.jwm-fab-left { left: 16px; }
	.jwm-launcher { padding: 13px 18px; }
	.jwm-fab-panel { right: 12px; left: 12px; bottom: 12px; width: auto; max-width: none; max-height: 86vh; }
	.jwm-fab-left .jwm-fab-panel { right: 12px; left: 12px; }
}

/* Lift launcher above a theme's corner button (e.g. scroll-to-top) when scrolled. */
.jwm-fab { transition: bottom .25s ease; }
.jwm-fab.jwm-fab-raised { bottom: 92px; }
@media (max-width: 520px) { .jwm-fab.jwm-fab-raised { bottom: 84px; } }

/* Match a third-party booking embed button (e.g. Housecall Pro) to the brand. */
.jwm-est-app .jwm-booking-embed .hcp-button,
.jwm-est-app .jwm-booking-embed button {
	display: inline-block;
	background: var(--jwm-accent) !important;
	color: #fff !important;
	padding: 16px 34px !important;
	border: none !important;
	border-radius: 2px !important;
	font-family: inherit !important;
	font-weight: 600 !important;
	font-size: .95rem !important;
	letter-spacing: .03em;
	text-transform: uppercase;
	line-height: 1.2 !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: filter .15s ease;
}
.jwm-est-app .jwm-booking-embed .hcp-button:hover,
.jwm-est-app .jwm-booking-embed button:hover { filter: brightness(.93); color: #fff !important; }
