/* Dealer Locator — front-end styles. All rules scoped under #glad-dealer-locator so nothing bleeds into the theme. */

:root {
--primary-color: #26a9e0;
--primary-hover: #1e82ad;
--text-dark: #242424;
--text-medium: #636363;
--text-light: #fff;
--border-color: #e0e0e0;
--background-gray: #e8e8e8;
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
--hero-background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
url('https://harperturfequipment.com/wp-content/uploads/2025/12/VersaVac-42.jpg');
}

#glad-dealer-locator * {
margin: 0;
padding: 0;
box-sizing: border-box;
}

#glad-dealer-locator {
position: relative;
margin-top: var(--glad-offset, 0px);
font-family: var(--font-family);
font-size: 16px;
line-height: 1.4;
background: var(--background-gray);
color: #333;
min-height: var(--glad-height, 100vh);
overflow-x: hidden;
}

#glad-dealer-locator.glad-fullbleed {
width: 100vw;
max-width: 100vw;
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
}

#glad-dealer-locator .hero-section {
position: relative;
background: var(--hero-background);
background-size: cover;
background-position: center;
min-height: var(--glad-height, 100vh);
display: flex;
align-items: center;
justify-content: center;
padding: 80px 20px;
transition: all 0.5s ease;
}

#glad-dealer-locator .hero-section.hidden {
display: none;
}

#glad-dealer-locator .search-container {
max-width: 700px;
width: 100%;
text-align: center;
}

#glad-dealer-locator .pin-icon {
width: 50px;
height: 50px;
margin: 0 auto 20px;
background: var(--primary-color);
border-radius: 50% 50% 50% 0;
transform: rotate(-45deg);
position: relative;
display: flex;
align-items: center;
justify-content: center;
}

#glad-dealer-locator .pin-icon::before {
content: '';
width: 20px;
height: 20px;
background: white;
border-radius: 50%;
transform: rotate(45deg);
}

#glad-dealer-locator h1 {
font-size: 40px;
font-weight: 700;
margin-bottom: 30px;
color: white;
text-transform: uppercase;
letter-spacing: 1px;
}

#glad-dealer-locator .search-card {
background: white;
border-radius: 0;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 0;
overflow: hidden;
}

#glad-dealer-locator .search-form {
display: flex;
align-items: stretch;
}

#glad-dealer-locator .input-wrapper {
flex: 1;
display: flex;
}

#glad-dealer-locator input[type="text"] {
flex: 1;
padding: 18px 20px;
border: none;
font-size: 16px;
background: white;
}

#glad-dealer-locator input[type="text"]::placeholder {
color: #999;
}

#glad-dealer-locator input[type="text"]:focus {
outline: none;
}

#glad-dealer-locator .search-btn {
padding: 18px 50px;
background: var(--primary-color);
color: white;
border: none;
font-size: 16px;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 0.5px;
white-space: nowrap;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
}

#glad-dealer-locator .search-btn:hover {
background: var(--primary-hover);
}

#glad-dealer-locator .search-btn:active {
transform: scale(0.98);
}

#glad-dealer-locator .map-view {
position: relative;
width: 100%;
height: var(--glad-height, 100vh);
display: none;
z-index: 1;
}

#glad-dealer-locator .map-view.active {
display: block;
}

#glad-dealer-locator #glad-map {
width: 100%;
height: 100%;
}

#glad-dealer-locator .overlay-search {
position: absolute;
top: 20px;
left: calc(5% + 400px + 20px);
right: 20px;
z-index: 1000;
max-width: 700px;
}

#glad-dealer-locator .overlay-search .search-card {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#glad-dealer-locator .results-panel {
position: absolute;
top: 2.5%;
left: 5%;
width: 380px;
height: 95%;
background: white;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
z-index: 1000;
display: none;
overflow: hidden;
flex-direction: column;
}

#glad-dealer-locator .results-panel.active {
display: flex;
}

#glad-dealer-locator .results-section {
flex: 1;
overflow-y: auto;
padding: 30px 25px;
}

#glad-dealer-locator .results-header {
font-weight: 700;
margin-bottom: 20px;
color: var(--text-dark);
font-size: 17.6px;
text-transform: uppercase;
letter-spacing: 0.5px;
padding-bottom: 15px;
border-bottom: 2px solid var(--primary-color);
}

#glad-dealer-locator .dealer-card {
padding: 20px;
margin-bottom: 15px;
background: #f8f8f8;
border: 1px solid var(--border-color);
cursor: pointer;
transition: all 0.2s ease;
border-radius: 4px;
display: flex;
gap: 15px;
}

#glad-dealer-locator .dealer-card:hover {
background: #fff;
border-color: var(--primary-color);
box-shadow: 0 2px 8px rgba(38, 169, 224, 0.15);
transform: translateX(5px);
}

#glad-dealer-locator .dealer-logo {
width: 80px;
height: 80px;
object-fit: contain;
flex-shrink: 0;
background: white;
padding: 8px;
border-radius: 4px;
}

#glad-dealer-locator .dealer-info {
flex: 1;
min-width: 0;
}

#glad-dealer-locator .dealer-name {
font-weight: 700;
font-size: 17.6px;
color: var(--text-dark);
margin-bottom: 8px;
}

#glad-dealer-locator .dealer-address {
font-size: 15.2px;
color: var(--text-medium);
margin-bottom: 8px;
line-height: 1.6;
}

#glad-dealer-locator .dealer-contact {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 10px;
}

#glad-dealer-locator .dealer-contact-item {
font-size: 14.4px;
color: var(--text-medium);
display: flex;
align-items: center;
gap: 8px;
}

#glad-dealer-locator .dealer-contact-item svg {
width: 14px;
height: 14px;
flex-shrink: 0;
}

#glad-dealer-locator .dealer-contact-item a {
color: var(--primary-color);
text-decoration: none;
transition: color 0.2s;
}

#glad-dealer-locator .dealer-contact-item a:hover {
color: var(--primary-hover);
text-decoration: underline;
}

#glad-dealer-locator .dealer-distance {
font-size: 14.4px;
color: var(--primary-color);
font-weight: 700;
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #e8e8e8;
}

#glad-dealer-locator .results-section::-webkit-scrollbar {
width: 8px;
}

#glad-dealer-locator .results-section::-webkit-scrollbar-track {
background: #f1f1f1;
}

#glad-dealer-locator .results-section::-webkit-scrollbar-thumb {
background: var(--primary-color);
}

#glad-dealer-locator .results-section::-webkit-scrollbar-thumb:hover {
background: var(--primary-hover);
}

#glad-dealer-locator .leaflet-popup-content-wrapper {
border-radius: 0;
padding: 4px;
}

#glad-dealer-locator .leaflet-popup-content {
margin: 12px;
}

#glad-dealer-locator .leaflet-top.leaflet-left {
top: auto;
bottom: 20px;
left: auto;
right: 20px;
}

#glad-dealer-locator .leaflet-control-zoom {
border: none;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1200px) {
    #glad-dealer-locator .overlay-search {
    left: calc(5% + 400px + 20px);
    right: 20px;
    max-width: 600px;
    }
}

@media (max-width: 1024px) {
    #glad-dealer-locator .overlay-search {
    left: 20px;
    right: 20px;
    max-width: none;
    }

#glad-dealer-locator .results-panel {
width: 320px;
}
}

@media (max-width: 768px) {
    #glad-dealer-locator .search-form {
    flex-direction: column;
    }

#glad-dealer-locator .input-wrapper {
border-right: none;
border-bottom: 1px solid #ddd;
}

#glad-dealer-locator h1 {
font-size: 32px;
}

#glad-dealer-locator .results-panel {
width: calc(100% - 40px);
height: 40%;
top: auto;
bottom: 0;
left: 20px;
z-index: 1000;
}

#glad-dealer-locator .overlay-search {
width: calc(100% - 40px);
max-width: none;
left: 20px;
right: 20px;
top: 10px;
}

#glad-dealer-locator .map-view {
z-index: 1;
}
}

