/* ─── Dealer Locator — Front End ─────────────────────────────────────── */

.dl-locator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ─── Search Bar ─────────────────────────────────────────────────────── */

.dl-search-bar {
    background: #2c3e50;
    padding: 16px 20px;
}

.dl-search-inner {
    display: flex !important;
    gap: 8px;
    flex-wrap: nowrap !important;
    align-items: center;
}

#dl-locator #dl-search-input,
.dl-locator #dl-search-input,
#dl-search-input {
    width: 70% !important;
    flex: 0 1 70% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box !important;
    margin: 0 !important;
    height: auto !important;
}

#dl-search-input:focus {
    border-color: #3498db !important;
}

#dl-locator #dl-radius-select,
.dl-locator #dl-radius-select,
#dl-radius-select {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px 8px !important;
    font-size: 14px !important;
    border: none !important;
    border-radius: 6px !important;
    background: #fff !important;
    cursor: pointer;
    box-sizing: border-box !important;
    margin: 0 !important;
    height: auto !important;
}

.dl-search-buttons {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 8px;
    margin-left: auto;
}

#dl-search-btn {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    background: #e67e22;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

#dl-search-btn:hover {
    background: #d35400;
}

#dl-reset-btn {
    padding: 10px 16px;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

#dl-reset-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* ─── Layout ─────────────────────────────────────────────────────────── */

.dl-content {
    display: flex;
    min-height: 500px;
}

.dl-map-wrap {
    flex: 1;
    min-height: 500px;
}

#dl-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.dl-results-wrap {
    width: 360px;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

#dl-results-count {
    padding: 12px 16px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.dl-no-results {
    color: #999;
    font-style: italic;
}

#dl-results-list {
    flex: 1;
    overflow-y: auto;
    max-height: 488px;
}

/* ─── Result Cards ───────────────────────────────────────────────────── */

.dl-result-card {
    padding: 14px 16px;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.dl-result-card:hover {
    background: #eef3f7;
}

.dl-result-featured {
    background: #b6d893;
    border-left: 4px solid #f1c40f;
}

.dl-result-featured:hover {
    background: #b7e18c;
}

.dl-result-badge {
    display: inline-block;
    background: #FFF;
    color: #7d6608;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
}

.dl-result-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.dl-result-addr {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
}

.dl-result-phone {
    font-size: 13px;
    margin-bottom: 4px;
}

.dl-result-phone a {
    color: #2980b9;
    text-decoration: none;
}

.dl-result-distance {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
}

.dl-result-link {
    margin-top: 4px;
    font-size: 13px;
}

.dl-result-link a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 600;
}

.dl-result-link a:hover {
    text-decoration: underline;
}

/* ─── Map Popups ─────────────────────────────────────────────────────── */

.dl-popup {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.dl-popup-badge {
    display: inline-block;
    background: #f1c40f;
    color: #7d6608;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.dl-popup-name {
    display: block;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.dl-popup-addr {
    color: #666;
    margin-bottom: 4px;
}

.dl-popup-phone a {
    color: #2980b9;
    text-decoration: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
    .dl-search-inner {
        flex-wrap: wrap !important;
    }

    /* Row 1: search input + dropdown side by side */
    #dl-locator #dl-search-input,
    #dl-search-input {
        flex: 1 1 0% !important;
        width: auto !important;
    }

    #dl-locator #dl-radius-select,
    #dl-radius-select {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Row 2: buttons full width */
    .dl-search-buttons {
        flex: 1 1 100% !important;
    }

    #dl-search-btn,
    #dl-reset-btn {
        flex: 1;
    }
}

/* Mobile — map and results stack */
@media (max-width: 768px) {
    .dl-content {
        flex-direction: column;
    }

    .dl-results-wrap {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    #dl-results-list {
        max-height: 840px;
    }

    .dl-map-wrap,
    #dl-map {
        min-height: 350px;
    }

    /* Keep input + dropdown on same row */
    #dl-locator #dl-search-input,
    #dl-search-input {
        flex: 1 1 0% !important;
        width: auto !important;
    }

    #dl-locator #dl-radius-select,
    #dl-radius-select {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    /* Still same row for input + dropdown */
    #dl-locator #dl-search-input,
    #dl-search-input {
        flex: 1 1 0% !important;
        width: auto !important;
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    #dl-locator #dl-radius-select,
    #dl-radius-select {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        font-size: 13px !important;
        padding: 8px 4px !important;
    }

    .dl-search-buttons {
        flex: 1 1 100% !important;
    }

    #dl-search-btn,
    #dl-reset-btn {
        flex: 1;
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
}