/* ==========================================================================
   Freshpaint Location Finder — Main Layout
   ========================================================================== */

.fplf-wrapper {
    /* background: #0d1b2e; */
    padding: 40px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.fplf-container {
    display: flex;
    /* max-width: 1280px; */
    margin: 0 auto;
    /* background: #fff; */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    height: 600px;
    gap: 22px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.fplf-sidebar {
    width: 34%;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8ecf0;
    background: #fff;
    border-radius: 16px;
}

/*popup box*/
.maplibregl-popup-content {
    width: 300px !important;
}
.popup-data {
    display: flex;
    gap: 5px;
    justify-content: space-between;
    padding: 8px 0;
}
.popup-data .popup-address a {
    background: none;
    color: #19B5FE;
    padding: 0;
    border: none !important;
    outline: unset;
}
.popup-data .popup-address a:hover {
    background: none !important;
}
.popup-img {
    width: 100px;
    height: auto;
}
.more_information a {
    font-weight: 500;
}
.more_information a:hover {
    background: #19B5FE !important;
    color: #000 !important;
}


/* ==========================================================================
   Search Bar
   ========================================================================== */
    button#fplf-clear-btn svg {
        width: 18px;
        height: 18px;
    }
.fplf-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #e8ecf0;
    flex-shrink: 0;
    border-radius: 16px;
}
.fplf-search button#fplf-clear-btn {
    background: #19b5fe;
    border-color: #19b5fe;
    color: #fff;
}
button.maplibregl-popup-close-button {
    background: #fff;
    border: none;
    color: #000;
    font-size: 22px;
    padding: 0 10px;
    /* width: 20px; */
}

.fplf-search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

input#fplf-search-input {
    border: 1px solid #ced4da;
}

.fplf-search input {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1.5px solid #d0d7de;
    border-radius: 10px;
    font-size: 14px;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.fplf-search input::placeholder {
    color: #9aa5b1;
}

.fplf-search input:focus {
    border-color: #0095ff;
}

.fplf-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9aa5b1;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s;
}

.fplf-clear-btn:hover {
    color: #1a1a2e;
}

.fplf-clear-btn.visible {
    display: flex;
}

.fplf-geo-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #0095ff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}

.fplf-geo-btn:hover {
    background: #0077cc;
}

.fplf-geo-btn:active {
    transform: scale(0.96);
}

.fplf-geo-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ==========================================================================
   Location List
   ========================================================================== */

#fplf-location-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: #0095ff #f0f4f8;
}

#fplf-location-list::-webkit-scrollbar {
    width: 5px;
}

#fplf-location-list::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 4px;
}

#fplf-location-list::-webkit-scrollbar-thumb {
    background: #0095ff;
    border-radius: 4px;
}

.fplf-loading {
    padding: 40px 20px;
    text-align: center;
    color: #9aa5b1;
    font-size: 15px;
}

.fplf-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9aa5b1;
}

.fplf-empty h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #4a5568;
}

.fplf-empty p {
    margin: 0;
    font-size: 14px;
}

/* ==========================================================================
   Location Cards
   ========================================================================== */

.fplf-card {
    background: #fff;
    border: 1.5px solid #e0e6ed;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fplf-card:last-child {
    margin-bottom: 0;
}

.fplf-card:hover,
.fplf-card.hover {
    border-color: #b3d9ff;
    box-shadow: 0 4px 16px rgba(0, 149, 255, 0.1);
}

.fplf-card.active,
.fplf-card.selected {
    border-color: #0095ff;
    background: #f5faff;
    box-shadow: 0 4px 16px rgba(0, 149, 255, 0.15);
}

.fplf-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fplf-image {
    flex-shrink: 0;
    width: 100%;
    max-width: 144px;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f4f8;
    padding: 8px 10px !important;
    border: 1px solid #e3e3e3 !important;
}

.fplf-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fplf-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f4ff;
}

.fplf-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}
.fplf-card-body h3.fplf-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00405C;
    margin-bottom: 5px;
}
.fplf-card-body p.fplf-phone a {
    color: #666 ;
}
.fplf-card-body p.fplf-address {
    color: #666;
    padding-bottom: 8px;
}

/* .fplf-card-body {
    margin-bottom: 14px;
    padding-left: 68px;
} */

.fplf-address,
.fplf-phone {
    margin: 0 0 4px;
    font-size: 13px;
    color: #6b7a8d;
    line-height: 1.5;
}

.fplf-phone {
    margin-bottom: 0;
    display: inline-block;
}

/* ==========================================================================
   Card Buttons
   ========================================================================== */

.fplf-buttons {
    display: flex;
    gap: 10px;
}

.fplf-direction,
.fplf-book {
    flex: 1;
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
    line-height: 1.2;
}

.fplf-direction {
    background: #00ADF1;
    color: #fff;
    border: 1px solid #00ADF1;
}

.fplf-direction:hover {
    background: #fff;
    border-color: #00ADF1;
    color: #00ADF1;
}
.fplf-book{
    background: #fff;
    color: #00ADF1;
    border: 1px solid #00ADF1 !important;
}
.fplf-book:hover{
    background: #00ADF1 !important;
    color: #fff !important;
    border: 1px solid #00ADF1;
}


/* Prevent card click when clicking buttons */
.fplf-buttons a {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Map Area
   ========================================================================== */

.fplf-map-wrapper {
    flex: 1;
    position: relative;
    height: 100%;
}

#fplf-map {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.fplf-geo-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #fde8e8;
    color: #c0392b;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f5c6c6;
}

/* ==========================================================================
   Map Popup
   ========================================================================== */

.fplf-popup {
    min-width: 220px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fplf-popup h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #19b5fe;
    font-weight: 600;
}

.fplf-popup p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #6b7a8d;
}

.fplf-popup a {
    display: inline-block;
    background: #19b5fe;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.fplf-popup a:hover {
    background: #0077cc;
}

.popup {
    width: 230px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.popup img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.popup h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.popup a {
    display: inline-block;
    padding: 10px 18px;
    background: #0095ff;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   Map Markers
   ========================================================================== */

.fplf-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0095ff;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: 0.3s;
}

.fplf-marker.active {
    background: #ff3b30;
    transform: scale(1.35);
}

.fplf-marker span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

#fplf-map.loading,
#fplf-location-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 991px) {

    .fplf-wrapper {
        padding: 20px 12px;
    }

    .fplf-container {
        flex-direction: column;
        min-height: auto;
        height: auto;
    }

    .fplf-sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e8ecf0;
    }

    #fplf-location-list {
        max-height: 380px;
    }

    .fplf-map-wrapper,
    #fplf-map {
        min-height: 420px;
        height: 420px;
    }

    .fplf-card-body {
        padding-left: 0;
    }
}

/* Exact-coordinate marker: the SVG tip is anchored to the supplied lat/lng. */
.fplf-exact-marker {
    width: 34px;
    height: 46px;
    cursor: pointer;
    line-height: 0;
}

.fplf-exact-marker svg {
    display: block;
    width: 34px;
    height: 46px;
    overflow: visible;
}
