/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ── Get Directions button – popup (template_1) + store card ── */
.easy-map-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    background: #1a73e8;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.easy-map-directions-btn:hover,
.easy-map-directions-btn:focus {
    background: #1558b0;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Store card social links row ── */
.easy-map-store-social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.easy-map-social-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.4;
    transition: opacity 0.15s ease;
}

.easy-map-social-link:hover,
.easy-map-social-link:focus {
    opacity: 0.82;
    text-decoration: none !important;
}

.easy-map-social-facebook {
    background: #e7f0ff;
    color: #1877f2 !important;
}

.easy-map-social-instagram {
    background: #fce4ec;
    color: #c13584 !important;
}

.easy-map-social-website {
    background: #e8f5e9;
    color: #2e7d32 !important;
}

/* ── Store card action row ── */
.easy-map-store-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

/* ── Directions button inside the store card ── */
.easy-map-store-actions .easy-map-directions-btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* ── Proximity / Near Me button ── */
.easy-map-near-me-btn {
    padding: 6px 14px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.easy-map-near-me-btn:hover,
.easy-map-near-me-btn:focus {
    background: #1558b0;
}

/* ── Proximity controls row ── */
.easy-map-proximity-controls {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0f6ff;
    border: 1px solid #c5d9f5;
    border-radius: 6px;
    margin-top: 6px;
}

.easy-map-radius-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.easy-map-radius-slider {
    width: 160px;
    accent-color: #1a73e8;
    cursor: pointer;
}

.easy-map-unit-toggle {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.easy-map-clear-proximity {
    padding: 4px 10px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.easy-map-clear-proximity:hover,
.easy-map-clear-proximity:focus {
    background: #b71c1c;
}

/* ── Distance badge in store cards ── */
.easy-map-distance-badge {
    display: inline-block;
    padding: 2px 7px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
    white-space: nowrap;
}

/* ── User location marker (pulsing dot) ── */
.easy-map-user-dot {
    width: 16px;
    height: 16px;
    background: #1a73e8;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.35);
}

/* ══════════════════════════════════════════════
   Template: default
   ══════════════════════════════════════════════ */
.easy-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.easy-map-filters input[type="text"],
.easy-map-filters select {
    flex: 1 1 200px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    color: #333;
}

.easy-map-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.easy-map-sidebar {
    flex: 0 0 22%;
    max-width: 22%;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
}

.easy-map-sidebar > label {
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 5px;
    font-size: 16px;
    color: #1a1a1a;
}

.easy-map-category > label {
    font-weight: 600;
    display: flex;
    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: #f5f8ff;
}

.easy-map-content {
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    box-sizing: border-box;
}

.easy-map-content .easy-map {
    width: 100%;
    display: block;
}

.easy-map-store-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease;
}

.easy-map-store-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.easy-map-store-thumb {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.easy-map-store-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.easy-map-store-desc {
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
}

.easy-map-store-info {
    font-size: 12px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 8px;
}

.easy-map-store-info .dashicons {
    color: #1a73e8;
    margin-right: 4px;
    vertical-align: middle;
}

.easy-map-store-btn {
    background: #1a73e8;
    color: #fff !important;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.easy-map-store-btn:hover,
.easy-map-store-btn:focus {
    background: #1558b0;
    color: #fff !important;
    text-decoration: none !important;
}

.easy-map-default-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.easy-map-default-list .easy-map-store-card {
    flex: 1 1 260px;
    min-width: 0;
}

.easy-map-default-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.easy-map-default-pagination button {
    min-width: 38px;
    padding: 6px 12px;
    background: #fff;
    color: #33475b;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.easy-map-default-pagination button.active {
    background: #0d3b66;
    color: #fff;
    border-color: #0d3b66;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 59, 102, 0.35);
    cursor: default;
}

.easy-map-default-pagination button:hover:not(.active) {
    background: #f0f4f9;
    color: #0d3b66;
    border-color: #0d3b66;
}

.easy-map-default-pagination button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.25);
    border-color: #0d3b66;
}

@media (min-width: 768px) and (max-width: 991px) {
    .easy-map-sidebar {
        flex: 0 0 28%;
        max-width: 28%;
    }
}

@media (max-width: 767px) {
    .easy-map-container {
        flex-direction: column;
    }

    .easy-map-sidebar {
        flex: 0 0 auto;
        max-width: 100%;
        border-radius: 8px 8px 0 0;
    }
}

/* ══════════════════════════════════════════════
   Template: card-grid
   ══════════════════════════════════════════════ */
.easy-map-tpl-card-grid {
    font-family: inherit;
}

.easy-map-card-grid-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px 0;
}

@media (max-width: 900px) {
    .easy-map-card-grid-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .easy-map-card-grid-list {
        grid-template-columns: 1fr;
    }
}

.easy-map-card-grid-list .easy-map-store-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

.easy-map-card-grid-list .easy-map-store-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.easy-map-card-grid-list .easy-map-store-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.easy-map-card-grid-list .easy-map-store-desc {
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
}

.easy-map-card-grid-list .easy-map-store-info {
    font-size: 12px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 8px;
    flex: 1;
}

.easy-map-card-grid-list .easy-map-store-actions {
    margin-top: auto;
}

.easy-map-grid-pagination {
    display: flex;
    gap: 6px;
    padding: 10px 0 4px;
    flex-wrap: wrap;
}

.easy-map-grid-pagination button {
    min-width: 38px;
    padding: 6px 12px;
    background: #fff;
    color: #33475b;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.easy-map-grid-pagination button.active {
    background: #0d3b66;
    color: #fff;
    border-color: #0d3b66;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 59, 102, 0.35);
    cursor: default;
}

.easy-map-grid-pagination button:hover:not(.active) {
    background: #f0f4f9;
    color: #0d3b66;
    border-color: #0d3b66;
}

.easy-map-grid-pagination button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.25);
    border-color: #0d3b66;
}

/* ══════════════════════════════════════════════
   Template: split-horizontal
   ══════════════════════════════════════════════ */
.easy-map-tpl-split-horizontal {
    font-family: inherit;
}

.easy-map-split-list-panel {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #fff;
}

.easy-map-split-list {
    padding: 0;
}

.easy-map-store-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background 0.12s ease;
}

.easy-map-store-row:last-child {
    border-bottom: none;
}

.easy-map-store-row:hover {
    background: #f5f8ff;
}

.easy-map-store-row-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    font-size: 16px;
}

.easy-map-row-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.easy-map-store-row-body {
    flex: 1;
    min-width: 0;
}

.easy-map-store-row-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.easy-map-store-row-addr {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.easy-map-store-row-meta {
    flex-shrink: 0;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    min-width: 140px;
}

.easy-map-store-row-actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.easy-map-store-row-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #1a73e8;
    color: #fff;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: inherit;
}

.easy-map-store-row-btn:hover {
    background: #1558b0;
    color: #fff;
}

.easy-map-split-pagination {
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    flex-wrap: wrap;
    background: #fafafa;
    border-top: 1px solid #ebebeb;
}

.easy-map-split-pagination button {
    min-width: 38px;
    padding: 6px 12px;
    background: #fff;
    color: #33475b;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.easy-map-split-pagination button.active {
    background: #0d3b66;
    color: #fff;
    border-color: #0d3b66;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 59, 102, 0.35);
    cursor: default;
}

.easy-map-split-pagination button:hover:not(.active) {
    background: #f0f4f9;
    color: #0d3b66;
    border-color: #0d3b66;
}

.easy-map-split-pagination button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.25);
    border-color: #0d3b66;
}

@media (max-width: 640px) {
    .easy-map-store-row {
        flex-wrap: wrap;
    }

    .easy-map-store-row-meta {
        width: 100%;
        min-width: unset;
    }

    .easy-map-store-row-actions {
        width: 100%;
    }
}

/* ── List + Map (Side by Side) Template ─────────────────────── */
.easy-map-tpl-list-map {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.easy-map-lm-panel {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow: hidden;
}

.easy-map-lm-list {
    flex: 1;
    overflow-y: auto;
}

.easy-map-lm-card {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    transition: background 0.12s ease;
}

.easy-map-lm-card:hover {
    background: #f5f8ff;
}

.easy-map-lm-thumb {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.easy-map-lm-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.easy-map-lm-addr {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.easy-map-lm-phone {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.easy-map-lm-type {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    font-style: italic;
}

.easy-map-lm-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.easy-map-lm-btn-primary {
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.easy-map-lm-btn-primary:hover {
    background: #1558b0;
    color: #fff;
}

.easy-map-lm-btn-outline {
    background: #fff;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.easy-map-lm-btn-outline:hover {
    background: #1a73e8;
    color: #fff;
}

.easy-map-lm-pagination {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    flex-wrap: wrap;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.easy-map-lm-pagination button {
    min-width: 32px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s ease;
}

.easy-map-lm-pagination button.active,
.easy-map-lm-pagination button:hover {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.easy-map-lm-map {
    flex: 1;
    min-width: 0;
}

.easy-map-lm-map .easy-map {
    display: block;
}

@media (max-width: 760px) {
    .easy-map-tpl-list-map {
        flex-direction: column;
    }

    .easy-map-lm-panel {
        width: 100%;
        max-height: 420px;
    }
}


/* Spinner inside button */
.easy-map-btn-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: easy-map-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes easy-map-spin {
    to { transform: rotate(360deg); }
}

/* Button disabled state while loading */
#easy-map-near-me-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}