/*
 * Bareilly Taxi Core 5.2.7
 * Frontend compatibility safeguards.
 * Keeps existing markup/booking logic intact while preventing
 * theme-level CSS from collapsing the booking form and footer.
 */

/* ---------------------------------------------------------
   BOOKING FORM: protect desktop/tablet grid dimensions
--------------------------------------------------------- */
html body #bt-booking.bt-booking-v9,
html body #bt-booking.bt-booking-v9 * {
	box-sizing:border-box;
}

html body #bt-booking.bt-booking-v9 .bt-booking-wrapper {
	display:grid !important;
	grid-template-columns:minmax(0,1fr) 320px !important;
	align-items:start !important;
	width:100% !important;
}

html body #bt-booking.bt-booking-v9 .bt-booking-form,
html body #bt-booking.bt-booking-v9 .bt-booking-side {
	min-width:0 !important;
	width:100% !important;
}

html body #bt-booking.bt-booking-v9 .bt-form-grid {
	display:grid !important;
	grid-template-columns:repeat(3,minmax(0,1fr)) !important;
	width:100% !important;
	min-width:0 !important;
}

html body #bt-booking.bt-booking-v9 .bt-form-group {
	display:flex !important;
	flex-direction:column !important;
	min-width:0 !important;
	width:100% !important;
}

html body #bt-booking.bt-booking-v9 .bt-form-group input,
html body #bt-booking.bt-booking-v9 .bt-form-group select,
html body #bt-booking.bt-booking-v9 .bt-form-group textarea {
	display:block !important;
	width:100% !important;
	max-width:100% !important;
	min-width:0 !important;
	box-sizing:border-box !important;
}

html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
	display:grid !important;
	grid-template-columns:1.3fr 1fr 1fr !important;
	width:100% !important;
	min-width:0 !important;
}

html body #bt-booking.bt-booking-v9 .bt-booking-buttons > .bt-book-btn,
html body #bt-booking.bt-booking-v9 .bt-booking-buttons > .bt-call-btn,
html body #bt-booking.bt-booking-v9 .bt-booking-buttons > .bt-whatsapp-btn {
	display:flex !important;
	align-items:center !important;
	justify-content:center !important;
	width:100% !important;
	min-width:0 !important;
	min-height:54px !important;
	height:auto !important;
	writing-mode:horizontal-tb !important;
	transform:none;
	white-space:normal !important;
}

/* ---------------------------------------------------------
   FOOTER: protect the existing site's footer readability.
   No footer markup is changed here.
--------------------------------------------------------- */
html body .bt-footer {
	color:#ffffff !important;
}

html body .bt-footer h1,
html body .bt-footer h2,
html body .bt-footer h3,
html body .bt-footer h4,
html body .bt-footer h5,
html body .bt-footer h6 {
	color:#ffffff !important;
}

html body .bt-footer p,
html body .bt-footer li {
	color:#cbd5e1 !important;
}

html body .bt-footer a {
	color:#f8fafc !important;
}

html body .bt-footer a:hover {
	color:#f59e0b !important;
}

html body .bt-footer strong,
html body .bt-footer .label,
html body .bt-footer .bt-label {
	color:#f59e0b !important;
}

html body .bt-footer-bottom,
html body .bt-footer-bottom p,
html body .bt-footer-bottom a {
	color:#94a3b8 !important;
}

/* Astra/child-theme footer compatibility, if those wrappers are active. */
html body .site-footer .widget-title,
html body .site-footer .widget-title a,
html body .site-footer h1,
html body .site-footer h2,
html body .site-footer h3,
html body .site-footer h4,
html body .site-footer h5,
html body .site-footer h6 {
	color:#ffffff !important;
}

html body .site-footer p,
html body .site-footer li,
html body .site-footer .footer-widget-area {
	color:#cbd5e1 !important;
}

html body .site-footer a {
	color:#f8fafc !important;
}

html body .site-footer a:hover {
	color:#f59e0b !important;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */
@media (max-width:1100px) {
	html body #bt-booking.bt-booking-v9 .bt-booking-wrapper {
		grid-template-columns:minmax(0,1fr) 290px !important;
	}
	html body #bt-booking.bt-booking-v9 .bt-form-grid {
		grid-template-columns:repeat(2,minmax(0,1fr)) !important;
	}
}

@media (max-width:900px) {
	html body #bt-booking.bt-booking-v9 .bt-booking-wrapper {
		grid-template-columns:1fr !important;
	}
	html body #bt-booking.bt-booking-v9 .bt-booking-side {
		max-width:700px !important;
		margin:0 auto !important;
	}
}

@media (max-width:640px) {
	html body #bt-booking.bt-booking-v9 .bt-form-grid {
		grid-template-columns:1fr !important;
	}
	html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
		grid-template-columns:1fr !important;
	}
}


/* =========================================================
   5.2.8 FINAL UI SAFETY LAYER
   These rules intentionally target only the existing public
   booking/footer wrappers. Booking logic and markup remain intact.
========================================================= */

html body #bt-booking.bt-booking-v9 #btBookingForm {
	width:100% !important;
	max-width:none !important;
	min-width:0 !important;
	float:none !important;
	writing-mode:horizontal-tb !important;
}

html body #bt-booking.bt-booking-v9 .bt-form-grid,
html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
	align-items:start !important;
	justify-items:stretch !important;
	grid-auto-flow:row !important;
	writing-mode:horizontal-tb !important;
}

html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
	grid-auto-rows:minmax(54px,auto) !important;
}

html body #bt-booking.bt-booking-v9 .bt-booking-buttons > * {
	box-sizing:border-box !important;
	align-self:start !important;
	justify-self:stretch !important;
	width:100% !important;
	max-width:none !important;
	min-width:0 !important;
	height:54px !important;
	min-height:54px !important;
	max-height:54px !important;
	padding:12px 16px !important;
	margin:0 !important;
	writing-mode:horizontal-tb !important;
	text-orientation:mixed !important;
	white-space:nowrap !important;
	overflow:hidden !important;
	transform:none;
}

html body #bt-booking.bt-booking-v9 .bt-booking-buttons > button,
html body #bt-booking.bt-booking-v9 .bt-booking-buttons > a {
	line-height:1.2 !important;
	text-align:center !important;
}

html body #bt-booking.bt-booking-v9 .bt-form-group,
html body #bt-booking.bt-booking-v9 .bt-form-group label,
html body #bt-booking.bt-booking-v9 .bt-form-group input,
html body #bt-booking.bt-booking-v9 .bt-form-group select,
html body #bt-booking.bt-booking-v9 .bt-form-group textarea {
	writing-mode:horizontal-tb !important;
	text-orientation:mixed !important;
}

/* Footer labels must remain readable even when Astra/theme rules
   target generic strong/span elements. */
html body .bt-footer-v9,
html body .bt-footer-v9 * {
	box-sizing:border-box;
}

html body .bt-footer-v9 {
	color:#ffffff !important;
	background:#0f172a !important;
}

html body .bt-footer-v9 .bt-footer-col h3,
html body .bt-footer-v9 .bt-footer-col h4 {
	color:#ffffff !important;
}

html body .bt-footer-v9 .bt-footer-col p,
html body .bt-footer-v9 .bt-footer-col ul li,
html body .bt-footer-v9 .bt-footer-col ul li a,
html body .bt-footer-v9 .bt-footer-contact a,
html body .bt-footer-v9 .bt-footer-contact span {
	color:#e2e8f0 !important;
}

html body .bt-footer-v9 .bt-footer-contact strong {
	color:#f59e0b !important;
}

html body .bt-footer-v9 .bt-footer-bottom,
html body .bt-footer-v9 .bt-footer-bottom p,
html body .bt-footer-v9 .bt-footer-bottom a,
html body .bt-footer-v9 .bt-footer-links a {
	color:#cbd5e1 !important;
}

html body .bt-footer-v9 a:hover {
	color:#f59e0b !important;
}

@media (max-width:900px) {
	html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
		grid-template-columns:repeat(3,minmax(0,1fr)) !important;
	}
}

@media (max-width:640px) {
	html body #bt-booking.bt-booking-v9 .bt-booking-buttons {
		grid-template-columns:1fr !important;
	}
	html body #bt-booking.bt-booking-v9 .bt-booking-buttons > * {
		height:52px !important;
		min-height:52px !important;
		max-height:52px !important;
	}
}

/* =========================================================
   5.2.9 ROOT CAUSE FIX
   The live Astra/child-theme stylesheet applies a generic
   display:grid/flex rule to FORM elements. That makes the
   booking form's own children become grid columns, which is
   exactly why the fields, note and CTA buttons appear squeezed
   side-by-side. The booking form itself must remain a block;
   only its internal wrappers should control their own layout.
========================================================= */
html body #bt-booking.bt-booking-v9 > .bt-container > .bt-booking-wrapper > form#btBookingForm,
html body #bt-booking.bt-booking-v9 form#btBookingForm {
	display:block !important;
	position:relative !important;
	float:none !important;
	grid-column:auto !important;
	grid-row:auto !important;
	grid-template-columns:none !important;
	grid-template-rows:none !important;
	flex:none !important;
	width:100% !important;
	max-width:none !important;
	min-width:0 !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-tabs,
html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-form-grid,
html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-live-fare-box,
html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-note,
html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-buttons,
html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-footer {
	grid-column:1 / -1 !important;
	width:100% !important;
	max-width:none !important;
	min-width:0 !important;
	float:none !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-tabs {
	display:grid !important;
	grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-form-grid {
	display:grid !important;
	grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-note {
	display:flex !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-buttons {
	display:grid !important;
	grid-template-columns:minmax(150px,1.3fr) minmax(120px,1fr) minmax(140px,1fr) !important;
}

html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-footer {
	display:block !important;
}

@media (max-width:1100px) {
	html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-form-grid {
		grid-template-columns:repeat(2,minmax(0,1fr)) !important;
	}
}

@media (max-width:640px) {
	html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-tabs {
		grid-template-columns:repeat(2,minmax(0,1fr)) !important;
	}
	html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-form-grid {
		grid-template-columns:1fr !important;
	}
	html body #bt-booking.bt-booking-v9 form#btBookingForm > .bt-booking-buttons {
		grid-template-columns:1fr !important;
	}
}
