/* Reviews Map — public styles */

.reviews-map-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    margin: 0 0 2rem;
}

/* ── Stats bar ─────────────────────────────────────────────────────────── */
.rm-public-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.rm-public-stat {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}
.rm-public-stat strong {
    font-size: 22px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1.1;
}
.rm-public-stat span {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

/* ── Toolbar ───────────────────────────────────────────────────────────── */
.rm-map-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.rm-view-btn,
.rm-filter-btn {
    /* Fixed height via flex-centering, not padding + line-height — a color
       emoji glyph (📍 🔥) has taller intrinsic metrics than plain text at the
       same font-size, and line-height alone doesn't reliably stop that from
       pushing the box taller in every browser. An explicit height with the
       content centered inside it can't grow no matter what glyphs are in it. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
}
.rm-view-btn:hover,
.rm-filter-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}
.rm-view-btn.active,
.rm-filter-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.rm-review-count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
}

/* ── "default-simplified-1" style: stats + toolbar share one row ─────────
   .rm-top-row is a plain stacking container for every other style (no rules
   needed — .rm-public-stats and .rm-map-toolbar already stack as block
   siblings). This is the only style that changes it into a single flex row,
   with a more compact stat presentation so the numbers don't dominate a row
   they're now sharing with the filter buttons. Wraps to two lines on narrow
   viewports rather than overflowing. */
.rm-style-default-simplified-1 .rm-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* not space-between — that dumps all leftover
        width into one gap, which is exactly what looked uneven */
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}
.rm-style-default-simplified-1 .rm-public-stats,
.rm-style-default-simplified-1 .rm-map-toolbar {
    margin-bottom: 0; /* .rm-top-row owns the row's bottom margin now */
    gap: 12px; /* match .rm-top-row's gap so every cluster in the row —
        stats, view buttons, rating buttons, count — is evenly spaced */
}
.rm-style-default-simplified-1 .rm-review-count {
    margin-left: 0; /* was auto (flush to the far right) — that's what made the
        right-hand gap different from the left; now it's just another item
        in the row with the same gap as everything else */
}
.rm-style-default-simplified-1 .rm-public-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 6px;
}
.rm-style-default-simplified-1 .rm-public-stat strong {
    font-size: 15px;
}
.rm-style-default-simplified-1 .rm-public-stat span {
    margin-top: 0;
    font-size: 11px;
    white-space: nowrap;
}

/* ── "default-simplified-2" style: no top bar at all ──────────────────────
   Stats and toolbar markup still renders (same as every style — kept as one
   code path rather than a server-side fork) but is fully hidden here. With
   no view/filter buttons the map just stays on its default state (Pins,
   all ratings) — there's nothing left to switch it. */
.rm-style-default-simplified-2 .rm-top-row {
    display: none;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.rm-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    align-items: start;
}
@media (max-width: 700px) {
    .rm-layout { grid-template-columns: 1fr; }
}

/* ── Map canvas ────────────────────────────────────────────────────────── */
#reviews-map-canvas {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    width: 100%;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.rm-sidebar {
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.rm-sidebar-head {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.rm-card {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.1s;
}
.rm-card:last-child { border-bottom: none; }
.rm-card:hover { background: #f8faff; }
.rm-card-active { background: #eff6ff !important; border-left: 3px solid #2271b1; }
.rm-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.rm-card-name {
    font-weight: 600;
    font-size: 13px;
    color: #111;
}
.rm-card-stars { font-size: 12px; letter-spacing: 1px; }
.rm-card-text {
    font-size: 12px;
    color: #4b5563;
    margin: 0 0 6px;
    line-height: 1.5;
}
.rm-no-text { font-style: italic; color: #9ca3af; }
.rm-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.rm-card-date { font-size: 11px; color: #9ca3af; }
.rm-empty { padding: 16px; color: #9ca3af; font-style: italic; }

/* ── Info window ───────────────────────────────────────────────────────── */
.rm-info-window {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    max-width: 240px;
    line-height: 1.5;
}
.rm-info-window strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.rm-iw-stars { font-size: 13px; letter-spacing: 1px; display: block; }
.rm-iw-date  { font-size: 11px; color: #9ca3af; display: block; margin-bottom: 6px; }
.rm-iw-text  { margin: 0 0 6px; color: #374151; }
.rm-iw-service { margin: 0; font-size: 12px; color: #6b7280; }

/* ── Heat-zone drill-down banner ──────────────────────────────────────── */
.rm-zone-banner {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    font-size: 12px;
    color: #1e40af;
}
.rm-zone-clear {
    flex-shrink: 0;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
    background: #fff;
    border: 1px solid #93c5fd;
    border-radius: 5px;
    cursor: pointer;
}
.rm-zone-clear:hover {
    background: #dbeafe;
}

/* ── Attribution ───────────────────────────────────────────────────────────
   Now pinned just under the "Reviews" heading rather than at the bottom of
   the list, and styled to actually be noticed there — a plain muted-gray
   footer note would get lost sitting right under a heading. */
.rm-attribution {
    padding: 8px 14px;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.rm-attribution a { color: inherit; font-weight: 600; }
