/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* =========================================================
   Wrapper
   ========================================================= */
.easy-map-store-locator-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================
   Filters bar
   ========================================================= */
.easy-map-filters {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.easy-map-filters input[type="text"],
.easy-map-filters select {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 200px;
    -ms-flex: 1 1 200px;
    flex: 1 1 200px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333;
}

.easy-map-filters select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* =========================================================
   Map + Sidebar container
   ========================================================= */
.easy-map-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================
   Sidebar
   ========================================================= */
.easy-map-sidebar {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 22%;
    -ms-flex: 0 0 22%;
    flex: 0 0 22%;
    max-width: 22%;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 500px;
    border: 1px solid #e5e5e5;
    border-radius: 8px 0 0 8px;
}

.easy-map-sidebar > label {
    font-weight: bold;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 5px;
    font-size: 16px;
    color: #222;
}

/* =========================================================
   Category toggle items
   ========================================================= */
.easy-map-category {
    padding-bottom: 5px;
}

.easy-map-category > label {
    font-weight: 600;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 2px;
    color: #333;
}

.easy-map-locations {
    list-style: none;
    margin: 2px 0 6px 18px;
    padding: 0;
    display: none;
}

.easy-map-locations li {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #444;
}

.easy-map-locations li:hover {
    background: #e9ecef;
}

/* =========================================================
   Map content area
   ========================================================= */
.easy-map-content {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    box-sizing: border-box;
}

.easy-map-content .easy-map {
    width: 100%;
    display: block;
}

/* =========================================================
   Store list grid
   ========================================================= */
#easy-map-store-list {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

/* =========================================================
   Store card
   ========================================================= */
.easy-map-store-card {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 260px;
    -ms-flex: 1 1 260px;
    flex: 1 1 260px;
    min-width: 0;
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.easy-map-store-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
}

.easy-map-store-desc {
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.easy-map-store-info {
    font-size: 14px;
}

.easy-map-store-info div {
    margin: 4px 0;
    color: #444;
}

.easy-map-store-info i,
.easy-map-store-info .dashicons {
    color: #2b73ff;
    margin-right: 5px;
    vertical-align: middle;
}

.easy-map-store-btn {
    margin-top: 12px;
    background: #2b73ff;
    color: #fff;
    padding: 9px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.easy-map-store-btn:hover {
    background: #1d5edc;
}

/* =========================================================
   Pagination
   ========================================================= */
#easy-map-pagination {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

#easy-map-pagination button {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
}

/* Prevent theme global link styles (Astra, OceanWP, etc.) from adding
   underlines to Leaflet zoom controls and popup close button */
.leaflet-container .leaflet-bar a,
.leaflet-container .leaflet-bar a:hover,
.leaflet-container .leaflet-bar a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.leaflet-container a.leaflet-popup-close-button,
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

#easy-map-pagination button.active {
    background: #0d3b66;
    color: #fff;
    border-color: #0d3b66;
}

#easy-map-pagination button:hover:not(.active) {
    background: #eee;
}

/* =========================================================
   Tablet (768px – 991px): narrower sidebar
   ========================================================= */
@media (min-width: 768px) and (max-width: 991px) {
    .easy-map-sidebar {
        -webkit-flex: 0 0 28%;
        -ms-flex: 0 0 28%;
        flex: 0 0 28%;
        max-width: 28%;
    }

    .easy-map-content {
        -webkit-flex: 1 1 72%;
        -ms-flex: 1 1 72%;
        flex: 1 1 72%;
    }
}

/* =========================================================
   Mobile (< 768px): stack vertically
   ========================================================= */
@media (max-width: 767px) {
    .easy-map-container {
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .easy-map-sidebar {
        -webkit-flex: 0 0 auto;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        max-width: 100%;
        max-height: 200px;
        border-radius: 8px 8px 0 0;
    }

    .easy-map-content .easy-map {
        height: 280px !important;
    }

    .easy-map-store-card {
        -webkit-flex: 1 1 100%;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}

/* =========================================================
   Small mobile (< 480px)
   ========================================================= */
@media (max-width: 479px) {
    .easy-map-content .easy-map {
        height: 240px !important;
    }

    .easy-map-filters input[type="text"],
    .easy-map-filters select {
        -webkit-flex: 1 1 100%;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}
