/*
 Theme Name: Avada Child Theme
 Theme URI: https://example.com
 Description: Child theme for Avada
 Author: Your Name
 Author URI: https://example.com
 Template: Avada
 Version: 1.0.0
 Text Domain: avada-child
*/

/* Child theme tweaks for IDEA search map layout */

/* Ensure the results block and map clear floats and have spacing */
#dealer-search-locations,
#map {
	display: block;
	clear: both;
	width: 100%;
}

/* Map + results layout */
.idea-search-map {
	width: 100%;
	margin: 24px 0 40px;
	border: 1px solid #cfd3da;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 18px 45px rgba(0, 33, 80, 0.08);
	background: #ffffff;
}

#map {
	height: 520px;
	margin-bottom: 48px;
}

.idea-search-map #map {
	margin-bottom: 0;
}

.idea-search-results {
	margin-bottom: 48px;
}

.idea-search-results-title,
.idea-search-results > h2 {
	font-size: 26px;
	font-weight: 600;
	color: #0b63b6;
	margin: 0 0 24px;
}

.technician-search-results {
	margin-bottom: 24px;
}
.idea-search-results .technician-search-results {
	margin-bottom: 0;
}

/* Add margin under the search form */
.dealer-search-wrapper {
	margin-bottom: 40px;
	max-width: 100%;
}

/* Ensure the footer starts on a new line after map/results in Avada layouts */
.fusion-footer,
#footer,
.fusion-footer-widget-area {
	clear: both;
	position: relative;
	z-index: 1;
}

/* Explicit clearfix element inserted by the template */
.idea-search-clearfix { clear: both; }

/* Align form fields and labels in dealer search */
#idea-dealer-search-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	font-size: 15px;
	color: #0f1f33;
}
#idea-dealer-search-form .form-group { margin-bottom: 25px; }
#idea-dealer-search-form #address { width: 100%; }
#idea-dealer-search-form #radius {
	width: 100%;
}

#idea-dealer-search-form .form-group-submit {
	display: flex;
	align-items: center;
	height: 100%;
	margin-top: 32px;
}

/* Dealer/Technician list UX tweaks */
.technician-search-results,
.dealer-location,
.technician-result,
.tech-address {
	cursor: default; /* do not show hand cursor on non-links */
}

/* Ensure only real links show pointer */
.technician-result a { cursor: pointer; }

/* Remove all hover effects on result cards */
.technician-result:hover {
	background-color: #f7f7f7 !important;
	border-color: #666666 !important;
	box-shadow: none;
}

/* Prevent global theme hover color from turning all result text blue */
/* Prevent container hover from changing child text/link colors */
.technician-result:hover .tech-name,
.technician-result:hover .tech-company,
.technician-result:hover .tech-address,
.technician-result:hover .tech-phone,
.technician-result:hover .tech-distance,
.technician-result:hover a {
	color: inherit !important;
}

/* Disable link hover styling inside result cards */
.technician-result a { color: inherit; text-decoration: none; }
.technician-result a:hover { color: inherit !important; text-decoration: none; }

/* Equal-height cards for results using flex rows */
/* Deterministic 3-up grid for results */
#dealer-search-locations,
.technician-search-results {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 60px !important;
	row-gap: 60px !important;
	column-gap: 60px !important;
	align-items: stretch;
	justify-items: stretch;
}

/* Remove side padding for dealer cards only */
.dealer-results .technician-result {
	padding-left: 0;
	padding-right: 0;
}
/* Remove Bootstrap column gutter padding inside dealer results */
.dealer-results [class*="col-"] {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Keep 3 columns until tablet width; then 2, then 1 on phones */
@media (max-width: 767.98px) {
	#dealer-search-locations,
	.technician-search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
	#dealer-search-locations,
	.technician-search-results { grid-template-columns: 1fr; }
}

.dealer-location { 
	display: flex; 
	flex-direction: column;
	box-sizing: border-box; 
	padding: 0; 
	width: 100%; 
	margin: 0 !important; 
}

/* Tech search submit button styling */
#idea-tech-search-form #tech-submit,
#idea-dealer-search-form #dealer-search-button {
	display: block;
	width: 100%;
	background-color: #be2f37;
	color: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 16px 24px;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	line-height: 1.2;
}
#idea-tech-search-form #address,
#idea-dealer-search-form #address {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}

#idea-tech-search-form .form-control,
#idea-dealer-search-form .form-control {
	border: none;
	box-shadow: 0 0 0 1px #cfd3da;
	border-radius: 10px;
	height: 56px;
	line-height: 1.25;
	padding: 14px 16px;
	background-color: #fff;
}

#idea-tech-search-form .form-control:focus,
#idea-dealer-search-form .form-control:focus {
	box-shadow: 0 0 0 1px #0b63b6 !important;
	outline: none !important;
}

#idea-tech-search-form .form-control:focus-visible,
#idea-dealer-search-form .form-control:focus-visible {
	box-shadow: 0 0 0 1px #0b63b6 !important;
	outline: none !important;
}

#idea-tech-search-form select.form-control::-moz-focus-inner,
#idea-dealer-search-form select.form-control::-moz-focus-inner,
#idea-tech-search-form select.form-control::-moz-focus-outer,
#idea-dealer-search-form select.form-control::-moz-focus-outer,
#idea-tech-search-form select.form-control::-webkit-focus-inner,
#idea-dealer-search-form select.form-control::-webkit-focus-inner {
	border: 0 !important;
}

#idea-tech-search-form select.form-control:-moz-focusring,
#idea-dealer-search-form select.form-control:-moz-focusring {
	outline: none !important;
}

#idea-tech-search-form select.form-control,
#idea-dealer-search-form select.form-control {
	padding-right: 48px;
	appearance: none;
	-moz-appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 18px;
}
#idea-tech-search-form #tech-submit:hover,
#idea-dealer-search-form #dealer-search-button:hover,
#idea-tech-search-form #tech-submit:focus,
#idea-dealer-search-form #dealer-search-button:focus {
	background-color: #00578e;
	color: #ffffff;
	outline: none;
	box-shadow: none;
}
#idea-tech-search-form #tech-submit:active,
#idea-dealer-search-form #dealer-search-button:active {
	background-color: #00466c;
}

/**
 * Gravity Forms buttons (IDEA brand)
 * - Default: IDEA red
 * - Hover/Focus/Active: IDEA blue (with darker active)
 */
.gform_wrapper input[type="submit"].gform_button,
.gform_wrapper input[type="submit"].gform_button_submit,
.gform_wrapper button.gform_button,
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_page_footer input[type="submit"],
.gform_wrapper .gform_footer button,
.gform_wrapper .gform_page_footer button {
	background-color: #C8102E !important;
	border-color: #C8102E !important;
	color: #ffffff !important;
	box-shadow: none !important;
	text-decoration: none !important;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.gform_wrapper input[type="submit"].gform_button:hover,
.gform_wrapper input[type="submit"].gform_button_submit:hover,
.gform_wrapper button.gform_button:hover,
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_page_footer input[type="submit"]:hover,
.gform_wrapper .gform_footer button:hover,
.gform_wrapper .gform_page_footer button:hover,
.gform_wrapper input[type="submit"].gform_button:focus,
.gform_wrapper input[type="submit"].gform_button_submit:focus,
.gform_wrapper button.gform_button:focus,
.gform_wrapper .gform_footer input[type="submit"]:focus,
.gform_wrapper .gform_page_footer input[type="submit"]:focus,
.gform_wrapper .gform_footer button:focus,
.gform_wrapper .gform_page_footer button:focus {
	background-color: #00466c !important;
	border-color: #00466c !important;
	color: #ffffff !important;
	outline: none !important;
}

.gform_wrapper input[type="submit"].gform_button:active,
.gform_wrapper input[type="submit"].gform_button_submit:active,
.gform_wrapper button.gform_button:active,
.gform_wrapper .gform_footer input[type="submit"]:active,
.gform_wrapper .gform_page_footer input[type="submit"]:active,
.gform_wrapper .gform_footer button:active,
.gform_wrapper .gform_page_footer button:active {
	background-color: #00466c !important;
	border-color: #00466c !important;
}

.technician-search-results .technician-result-wrapper { display: flex; flex: 1 1 auto; }
.technician-search-results .technician-result {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	position: relative;
	width: 100%;
	height: auto; /* auto height; rows match tallest */
	padding: 30px 30px 20px 30px; /* top: 30px, right: 30px, bottom: 20px, left: 30px */
	margin-bottom: 0; /* use flex gap for vertical spacing */
	border: 1px solid #666666; /* darker gray border around each card */
	border-radius: 6px;
	background: #f7f7f7; /* light gray background */
	color: #333; /* base text color to prevent theme hover recolor */
}
/* Top and bottom sections within each card */
.technician-result .tech-top { flex: 1 1 auto; }
.technician-result .tech-bottom { margin-top: auto; display: flex; flex-direction: column; }
.technician-result .tech-bottom .tech-links { min-height: 24px; }
.technician-result .tech-footer { position: relative; height: 124px; }
/* Anchor distance a fixed offset above the bottom address */
.technician-result .tech-footer .tech-distance { position: absolute; left: 0; right: 0; bottom: 74px; min-height: 22px; }
/* Address anchored to bottom; allow wrapping */
.technician-result .tech-footer .tech-address { position: absolute; left: 0; right: 0; bottom: 0; min-height: 48px; overflow: visible; }
.technician-search-results .dealer-location:hover,
.technician-search-results .dealer-location:hover *,
.technician-search-results .technician-result:hover,
.technician-search-results .technician-result:hover * {
	color: inherit !important; /* stop blue-on-hover from theme */
}

/* Column widths (override to flex-based responsive) */
/* Width is governed by the grid columns above; remove flex sizing fallbacks */
.dealer-location { flex: initial; max-width: 100%; }

/* No hover shadow */
.technician-search-results .technician-result:hover { box-shadow: none; }

/* No-results message styling */
.technician-search-results .dealer-location.no-results { flex-basis: 100%; }
.technician-search-results .technician-result.no-results {
	text-align: center;
	background: #fff7f0;
	border: 1px solid #f0c8a0;
	font-size: 16pt; /* requested size */
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Kill ALL color/underline changes on hover within cards (high specificity) */
.technician-search-results .technician-result:hover,
.technician-search-results .technician-result:hover *,
.technician-search-results .dealer-location:hover .technician-result,
.technician-search-results .dealer-location:hover .technician-result * {
	color: inherit !important;
	text-decoration: none !important;
}

/* Also neutralize link states explicitly */
.technician-search-results .technician-result a,
.technician-search-results .technician-result a:hover,
.technician-search-results .technician-result a:focus,
.technician-search-results .technician-result a:active,
.technician-search-results .technician-result a:visited {
	color: inherit !important;
	text-decoration: none !important;
}

/* Override common Avada hover utility classes within results */
.technician-search-results .technician-result .fusion-link-wrapper:hover,
.technician-search-results .technician-result .fusion-link-wrapper:hover *,
.technician-search-results .technician-result .fusion-text a:hover,
.technician-search-results .technician-result .fusion-text:hover,
.technician-search-results .technician-result .fusion-text:hover * {
	color: inherit !important;
	background-color: inherit !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

/* Remove transitions that might animate color/background on hover */
.technician-search-results .technician-result,
.technician-search-results .technician-result * {
	transition: none !important;
}

/* Lock base text color inside cards to avoid theme hover recolor */
.technician-search-results .dealer-location .technician-result,
.technician-search-results .dealer-location .technician-result * {
	color: #333 !important;
}

/* Keep headline/name blue at all times */
.technician-search-results .dealer-location .technician-result .tech-name,
.technician-search-results .dealer-location .technician-result .tech-name a {
	color: #0b63b6 !important;
}

/* Do not change colors on hover */
.technician-search-results .dealer-location:hover .technician-result,
.technician-search-results .dealer-location:hover .technician-result * {
	color: inherit !important;
}

/* Allow ONLY the phone link and website icon to turn blue on hover */
.technician-search-results .technician-result .tech-phone a:hover {
	color: #0b63b6 !important;
	text-decoration: underline;
}
.technician-search-results .technician-result .tech-links a:hover i.fa-desktop {
	color: #0b63b6 !important;
}

/* Keep email icon neutral on hover */
.technician-search-results .technician-result .tech-links a:hover i.fa-envelope-o {
	color: inherit !important;
}

/* Ensure company, fax, and address do NOT turn blue on hover */
.technician-search-results .technician-result .tech-company,
.technician-search-results .technician-result .tech-fax,
.technician-search-results .technician-result .tech-address {
	color: #000;
}
.technician-search-results .technician-result:hover .tech-company,
.technician-search-results .technician-result:hover .tech-fax,
.technician-search-results .technician-result:hover .tech-address,
.technician-search-results .dealer-location:hover .technician-result .tech-company,
.technician-search-results .dealer-location:hover .technician-result .tech-fax,
.technician-search-results .dealer-location:hover .technician-result .tech-address {
	color: #000 !important;
}
.technician-result:hover .tech-distance,
.technician-search-results .dealer-location:hover > .tech-distance {
	color: #0b63b6 !important;
}

/* Typography and layout for dealer/technician cards */
/* Set Inter font for all technician search elements, but exclude Font Awesome icons */
#idea-tech-search-form,
#idea-dealer-search-form,
#idea-tech-search-form *:not(.fa):not([class*="fa-"]),
#idea-dealer-search-form *:not(.fa):not([class*="fa-"]),
.technician-search-results,
.technician-search-results *:not(.fa):not([class*="fa-"]),
.technician-result,
.technician-result *:not(.fa):not([class*="fa-"]):not(i[class*="fa-"]) {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Ensure Font Awesome icons use the correct font family */
.technician-result .fa,
.technician-result i.fa,
.technician-result i[class*="fa-"],
.technician-result [class*="fa-"],
.tech-email .fa,
.tech-email i.fa,
.tech-email i[class*="fa-"],
.tech-address .fa,
.tech-address i.fa,
.tech-phone .fa,
.tech-phone i.fa,
.tech-name .fa,
.tech-name i.fa {
	font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", FontAwesome !important;
	font-weight: 900 !important;
	font-style: normal !important;
	display: inline-block !important;
}

/* Set base font size of 16px for all card content */
.technician-result,
.technician-result * {
	font-size: 16px;
}

.technician-result .tech-name {
	display: flex;
	align-items: center;
}

.technician-result .tech-name svg {
	flex-shrink: 0;
}

.technician-result .tech-name > span,
.technician-result .tech-name a {
	flex: 1;
	font-weight: 600;
	color: #0b63b6; /* link blue */
	line-height: 1.25;
}

/* Ensure address, phone, and email use flexbox for icon alignment */
.technician-result .tech-address,
.technician-result .tech-phone,
.technician-result .tech-email {
	display: flex;
	align-items: center;
}

.technician-result .tech-address svg,
.technician-result .tech-phone svg,
.technician-result .tech-email svg {
	flex-shrink: 0;
}

.technician-result .tech-address > span,
.technician-result .tech-phone > span,
.technician-result .tech-email > span {
	flex: 1;
}

.technician-result .tech-company {
	font-weight: bold !important;
	line-height: 1.1;
	margin: 2px 0 0; /* remove bottom margin, use padding instead */
	padding-bottom: 20px;
	font-size: 18px;
}

.technician-result .tech-phone,
.technician-result .tech-fax {
	margin: 2px 0; /* tighter */
}
.technician-result .tech-phone {
	font-style: normal;
}
.technician-result .tech-fax {
	font-style: italic;
}

.technician-result .tech-certification {
	margin-bottom: 8px;
	margin-left: 24px; /* Align with tech name text (16px icon + 8px margin) */
}

.technician-result .tech-email {
	margin-bottom: 12px;
}

/* Force email icon to display */
.technician-result .tech-email i.fa-envelope-o,
.technician-result .tech-email i.fa-envelope,
.technician-result .tech-email .fa-envelope-o,
.technician-result .tech-email .fa-envelope {
	font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", FontAwesome !important;
	font-weight: 900 !important;
	font-style: normal !important;
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.technician-result .tech-distance {
	color: #0b63b6;
	margin: 8px 0 4px;
	font-weight: 700;
}
.technician-search-results .dealer-location .technician-result .tech-distance {
	color: #0b63b6 !important;
}

/* Distance below card */
.dealer-location > .tech-distance {
	color: #0b63b6 !important;
	margin-top: 8px;
	margin-bottom: 0;
	font-size: 16px;
	font-weight: 700;
}

.technician-result .tech-divider { border-top: 1px solid #e6e6e6; margin-top: 12px; padding-top: 12px; }
/* Hide the divider between distance and address per markup change */
.technician-result .tech-bottom > hr { display: none; }
.technician-result hr { margin: 12px 0; }
.technician-result .tech-address { border-top: none; margin-top: 0; padding-top: 0; }

.technician-result .tech-address {
	line-height: 1.45; /* tighter */
}

/* Pin the address to the bottom of the card */
.technician-result {
	min-height: 100%;
}
.technician-result .tech-address {
	margin-top: 12px; /* appear just below distance */
	padding-top: 12px;
	border-top: 1px solid #e6e6e6;
}

.technician-result .tech-actions,
.technician-result .tech-contact {
	margin: 10px 0;
}

/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/
