/* Dealer Locator Styles */

.mapLocationHeading {
    font-size: clamp(2rem, 1.5385rem + 1.0513vw, 3rem);
    font-family: "Montserrat", Sans-serif;
    font-weight: 600;
    color: #3D3D3D !important;
    margin-bottom: 20px;
}

.dealers-slide h3 {
    font-family: "Montserrat", Sans-serif !important;
    font-size: 25px;
    letter-spacing: 1.5px;
}

.dealers-slide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.dealers-slide .location {
    border: 1px solid #EEEEEE;
    padding: 20px 25px;
    height: 100%;
}

.dealers-slide .location h3 {
    text-transform: uppercase;
}

.dealers-slide .location span{
    background: #c5a47e;
    color: #fff;
    padding: 5px 20px;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 14px;
    font-family: "Montserrat", Sans-serif;
}

.dealers-slide .location a {
    display: block;
    color: #000;
}

.dealers-slide .location p {
    margin-top: 12px;
    font-family: "Montserrat", Sans-serif;
    color: #747474;
}

.dealers-carousel .owl-dots {
    margin-top: 30px;
    text-align: center;
}

.dealers-carousel .owl-dot {
    width: 12px;
    height: 12px;
    margin: 0 6px;
}

.dealers-carousel .owl-dot span {
    width: 12px;
    height: 12px;
    background: #ccc;
    display: block;
    border-radius: 50%;
}

.dealers-carousel .owl-dot.active span {
    background: #5f6f5a; /* your green */
}

/* Search Container */
.dealer-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 100%;
    width: 100%;
}

.dealer-search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px; /* Prevent zoom on iOS */
    outline: none;
    transition: border-color 0.3s ease;
    background-color: #ffffff;
    color: #333333;
}

/* Desktop: Limit search input to 33% width */
@media (min-width: 769px) {
    .dealer-search-container {
        justify-content: flex-start;
    }
    
}

.dealer-search-input:focus {
    border-color: #2271b1;
}

.dealer-search-btn {
    padding: 12px 10px !important;
    background-color: #c5a47e !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    box-shadow: none !important;
    min-width: 50px;
}

.dealer-search-btn:hover {
    background-color:  #323232 !important;
    color: white !important;
}

.dealer-search-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

/* Show all dealers button */
.dealer-show-all-btn {
    background-color: #f0f0f0 !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    padding: 10px 15px !important;
    cursor: pointer;
    font-size: 14px;
    color: #666 !important;
    margin-left: 10px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dealer-show-all-btn:hover {
    background-color: #e0e0e0 !important;
    color: #333 !important;
    border-color: #999 !important;
}

.dealer-show-all-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Wrapper */
.dealer-locator-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 15px;
}

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

#dealer-map {
    flex: 1;
}

/* Filter Buttons */
.dealer-filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.dealer-filter-buttons::-webkit-scrollbar {
    height: 6px;
}

.dealer-filter-buttons::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dealer-filter-buttons::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.dealer-filter-btn {
    padding: 10px 20px;
    background-color: #fff !important;
    border: 2px solid #c5a47e !important;
    border-radius: 0px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #c5a47e !important;
    white-space: nowrap;
    outline: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing:18%;
    line-height:100%;
    font-family: "Montserrat", Sans-serif !important;
    font-size: 16px;
    font-weight: 500 !important;
    letter-spacing: 3px !important;

}


.dealer-filter-btn.active , .dealer-filter-btn:hover {
    background-color: #c5a47e !important;
    color: white !important;
    border-color: #c5a47e !important;
    font-weight: 600 !important;
}

/* Map Container */
#dealer-map {
    width: 100%;
    min-height: 400px;
    overflow: hidden;
}

/* Info Window */
.dealer-info-window {
    padding: 20px;
    min-width: 280px;
    max-width: 350px;
}

/* Google Maps InfoWindow max-width override */
.gm-style-iw-c {
    max-width: 350px !important;
    max-height: 400px !important;
    overflow: visible !important;
}

.gm-style-iw-d {
    overflow: auto !important;
    max-height: 350px !important;
}

/* Force info window to stay within map bounds */
.gm-style-iw {
    max-width: 300px !important;
    max-height: 300px !important;
}

.gm-style-iw-t::after {
    display: none !important;
}

.dealer-info-window .dealer-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.dealer-info-window .dealer-address {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.dealer-info-window .dealer-distance {
    margin: 5px 0 10px 0;
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* Category Tags */
.dealer-categories {
    margin-bottom: 10px;
}

.dealer-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.dealer-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: #f0f0f0;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
}

/* Contact Links - Text style instead of buttons */
.dealer-contact-links {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.dealer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 24px;
}

.dealer-contact-item:last-child {
    margin-bottom: 0;
}

.dealer-contact-item .dashicons {
    color: #666;
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    flex-shrink: 0;
}

.dealer-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.dealer-link:hover {
    color: #666;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Wrapper adjustments */
    .dealer-locator-wrapper {
        padding: 0;
        flex-direction: column;
    }
    
    /* Search container voor mobiel */
    .dealer-search-container {
        margin: 0 10px 15px 10px;
        gap: 8px;
    }
    
    .dealer-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 15px;
        min-width: 0;
    }
    
    .dealer-search-btn {
        padding: 10px 15px !important;
        min-width: 44px; /* iOS touch target */
    }
    
    /* Filter buttons voor mobiel - verticaal gestapeld */
    .dealer-filter-buttons {
        flex-direction: column;
        margin: 0 10px 15px 10px;
        padding: 0;
        gap: 8px;
        overflow-x: visible;
    }
    
    .dealer-filter-btn {
        font-size: 14px !important;
        padding: 10px 16px;
        width: 100%;
        text-align: center;
    }
    
    /* Map voor mobiel - full width */
    #dealer-map {
        min-height: 400px;
        height: 60vh !important;
        max-height: 500px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0 -10px;
        width: calc(100% + 20px);
    }
    
    /* Info window voor mobiel */
    .dealer-info-window {
        min-width: 260px;
        max-width: 300px;
        padding: 15px;
    }
    
    /* Google Maps InfoWindow mobiel fixes */
    .gm-style-iw-c {
        max-width: 300px !important;
        padding: 0 !important;
    }
    
    .gm-style-iw-d {
        overflow: visible !important;
    }
    
    .dealer-info-window .dealer-name {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .dealer-info-window .dealer-address {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    /* Contact links voor mobiel */
    .dealer-contact-links {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .dealer-contact-item {
        margin-bottom: 8px;
    }
    
    .dealer-link {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .dealer-filter-buttons {
        padding: 8px;
    }
    
    .dealer-filter-btn {
        font-size: 12px !important;
        padding: 6px 12px;
    }
    
    #dealer-map {
        min-height: 350px;
        height: 50vh !important;
    }
    
    .dealer-search-container {
        margin: 0 8px 12px 8px;
    }
    
    .dealer-search-input {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .dealer-search-btn {
        padding: 8px 12px !important;
    }
}

/* Elementor compatibility */
.elementor-widget-container .dealer-locator-wrapper {
    width: 100%;
}

.elementor-widget-container #dealer-map {
    margin: 0;
    width: 100%;
}

/* Google Maps controls adjustments for mobile */
@media (max-width: 768px) {
    /* Move zoom controls to right side */
    .gm-bundled-control {
        right: 10px !important;
        left: auto !important;
    }
    
    /* Adjust map type controls */
    .gm-style-mtc {
        top: 10px !important;
    }
}

/* Google Autocomplete dropdown styling */
.pac-container {
    font-family: inherit;
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10000; /* Ensure it's above other elements */
}

.pac-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
}

.pac-item:hover {
    background-color: #f5f5f5;
}

/* Touch support voor mobiele apparaten */
@media (hover: none) and (pointer: coarse) {
    .dealer-filter-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .dealer-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .dealer-search-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Laad animatie */
#dealer-map.loading {
    background: #f5f5f5 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><path fill="%232271b1" d="M25 5v10l-8.7-5z"><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/></path></svg>') center center no-repeat;
}

/* Print styles */
@media print {
    .dealer-filter-buttons,
    .dealer-search-container {
        display: none;
    }
    
    #dealer-map {
        height: 400px !important;
        border: 1px solid #000;
    }
}

/* Fix for iOS viewport issues */
@supports (-webkit-touch-callout: none) {
    .dealer-locator-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

/* Ensure map is responsive in all containers */
.dealer-locator-wrapper > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Additional mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    #dealer-map {
        height: 50vh !important;
        min-height: 300px;
    }
}


.dealer-location-search{
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}


#dealer-region-search{
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 1px solid #ffffff;
    background-color: transparent;
    border-radius: 0;

    /* SEARCH ICON */
    background-image: url("/wp-content/uploads/2026/03/49d488f8a6056ad94819f173a393c42dae1dac5d.png");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 18px;

    color: #ffffff;
    font-size: 18px;
    outline: none;

    /* make icon opacity similar to placeholder */
    filter: opacity(0.6);
}

#dealer-region-search::placeholder{
    color: rgba(255,255,255,0.6);
}

#dealer-region-search:focus{
    border-color:#ffffff;
    box-shadow:0 0 0 2px rgba(255,255,255,0.2);
}


#dealer-region-dropdown{
    position:absolute;
    top:100%;
    left:0;
    width:100%;
    background:#ffffff;
    border:1px solid #ddd;
    display:none;
    z-index:999;
}



.dealer-region-item{
    padding:12px 16px;
    cursor:pointer;
    transition:background 0.2s ease;
}

.dealer-region-item:hover{
    background:#f5f5f5;
}



.dealer-result-item{
    display:flex;
    align-items:center;
    gap:12px;
}


.dealer-result-image img{
    width:28px;
    height:auto;
    display:block;
}


.dealer-result-text{
    display:flex;
    flex-direction:column;
}

.dealer-result-text strong{
    font-size:14px;
    color:#000;
    font-family: "larken" , Sans-serif;
}

.dealer-result-text span{
    font-size:13px;
    color:#666;
}