/* Quicksure mobile tweaks. Loaded after the theme and skin CSS.
   Mostly phones (< 768px): readable form fields, finger-sized tap targets,
   less empty space, no sideways scrolling. */

/* Quote form popup mask: JS sizes it once on load, so it leaves gaps after a resize or rotate. Cover the screen instead. */
#mask {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

@media (max-width: 767px) {

	/* No sideways scroll from carousels or wide inline content */
	body {
		overflow-x: clip;
	}

	img {
		max-width: 100%;
		height: auto;
	}

	/* Forms: 16px text stops iOS from zooming on focus; 44px height is a comfortable tap target */
	.form-control,
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="number"],
	input[type="date"],
	select,
	textarea {
		font-size: 16px !important;
		min-height: 44px;
	}

	textarea.form-control,
	textarea {
		min-height: 96px;
	}

	.form-group label,
	label {
		font-size: 15px;
		line-height: 1.4;
	}

	.radio-inline,
	.checkbox-inline {
		padding-top: 8px;
		padding-bottom: 8px;
		margin-right: 12px;
	}

	input[type="radio"],
	input[type="checkbox"] {
		width: 20px;
		height: 20px;
		vertical-align: middle;
		margin-top: 0;
	}

	/* Mobile menu button: finger-sized */
	.slicknav_btn {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Not the round stepper markers (.btn-circle): they must stay 30px circles */
	.btn:not(.btn-circle),
	button[type="submit"],
	input[type="submit"] {
		min-height: 44px;
	}

	/* Home "speak your language" boxes: compact instead of five tall blocks */
	.features .features-single {
		padding: 18px 16px;
	}

	/* Info popup on quote forms is 450px wide by default: fit it to the phone */
	#boxes .window,
	#boxes1 .window,
	#boxes #dialog,
	#boxes1 #dialog {
		width: calc(100vw - 32px) !important;
		max-width: 450px;
		left: 16px !important;
		box-sizing: border-box;
		font-size: 16px;
	}

	/* Footer Quick Links / Quotation Forms: bigger tap area (only these lists, so the
	   Head Office phone/email rows and the social icons keep their layout) */
	.footer .single-widget.links li a {
		display: inline-block;
		padding: 8px 0;
	}

	/* Long text blocks: comfortable reading size */
	.services p,
	.section p {
		font-size: 15px;
		line-height: 1.6;
	}
}

/* Quote form stepper labels: four labels on a phone need smaller text and room to wrap */
@media (max-width: 767px) {
	.stepwizard-step {
		padding: 0 4px;
		vertical-align: top;
	}
	.stepwizard-step p {
		font-size: 12px;
		line-height: 1.3;
		white-space: normal;
	}
}

/* Home hero under 992px: keep the same layout as desktop. The slide takes the image's own 3:2 shape so the
   whole picture shows, and the text stays in the empty half (col-xs-6), scaled with the screen width so it
   never reaches the vehicle. Carousel dots move below the image. */
@media (max-width: 991px) {
	/* responsive.css fixes these at 450-500px with overflow hidden */
	.hero-area {
		height: auto;
	}
	.hero-area .qs-slide {
		height: auto;
		aspect-ratio: 3 / 2;
		background-size: cover;
		background-position: center;
	}
	.hero-area .qs-slide .container,
	.hero-area .qs-slide .row,
	.hero-area .qs-slide .row > div {
		height: 100%;
	}
	.hero-area .qs-slide .slide-text,
	.hero-area .qs-slide .slide-text.right {
		height: 100%;
		min-height: 0;
		padding: 0;
	}
	.hero-area .qs-slide .slide-text h1 {
		font-size: clamp(17px, 4.6vw, 44px);
		line-height: 1.15;
		margin-bottom: clamp(6px, 1.4vw, 16px);
		padding-bottom: clamp(6px, 1.4vw, 16px);
	}
	.hero-area .qs-slide .slide-text h1 .short {
		font-size: clamp(11px, 2.4vw, 24px);
		letter-spacing: clamp(1px, 0.4vw, 4px);
		margin-bottom: clamp(2px, 0.8vw, 8px);
	}
	.hero-area .qs-slide .slide-text h1:before {
		width: 60%;
	}
	.hero-area .qs-slide .qs-slide-sub {
		font-size: clamp(10px, 1.9vw, 16px);
		line-height: 1.3;
	}
	.hero-area .qs-slide .slide-btn {
		margin-top: clamp(8px, 2vw, 20px);
	}
	.hero-area .qs-slide .slide-btn .btn {
		font-size: clamp(10px, 1.8vw, 14px);
		padding: clamp(6px, 1.4vw, 12px) clamp(8px, 2vw, 24px);
		min-height: 0;
		line-height: 1.2;
		white-space: normal;
	}
	.hero-area .owl-controls .owl-dots {
		position: static;
		margin: 10px 0 14px;
		text-align: center;
	}
}
@media (max-width: 767px) {
	/* responsive.css forces slide text to white with !important; light slides need dark text */
	.owl-item .single-slider.qs-slide h1 {
		color: #2F3A2C !important;
	}
	.owl-item .single-slider.qs-slide h1 span.short {
		color: #4F5D4B !important;
	}
	.owl-item .single-slider.qs-slide p {
		color: #353535 !important;
	}
	.breadcrumbs .bread-list {
		padding: 12px 24px;
	}
}

/* Long words and URLs (legal text, real addresses, emails) must wrap instead of pushing the page wider */
.container {
	max-width: 100%;
}
@media (max-width: 767px) {
	h1, h2, h3, h4, p, li, a {
		overflow-wrap: break-word;
		word-wrap: break-word;
	}
	p a, li a {
		overflow-wrap: anywhere;
	}
}
@media (max-width: 400px) {
	.section h1 {
		font-size: 24px;
		line-height: 30px;
	}
}
