/* ── Sección "Cerca de mí" ─────────────────────────────────────────────
 * Depende de bc_esri_map.css (variables, popup, basemap bar, map-container…).
 * Aquí sólo se sobreescriben los valores que difieren: sin panel de filtros,
 * sin mosaico, altura reducida.
 * ─────────────────────────────────────────────────────────────────────── */

.bc-esri-nearby__title {
    font-family: var(--sans, Inter, sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark, #1d1e1c);
    margin-bottom: 16px;
}

/* Altura compacta (vs 820px del explorador) */
.bc-esri-wrapper--nearby {
    height: 550px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .bc-esri-wrapper--nearby {
        height: 320px;
    }
}

calcite-action[data-action-id="popup-dock-action"],
.bc-esri-nearby .header-actions--end,
.bc-esri-nearby .header-actions,
.bc-esri-nearby .esri-popup__header,
.bc-esri-nearby .esri-popup__header-title-container,
.bc-esri-nearby .esri-popup__header-buttons,
.bc-esri-nearby .esri-popup__button,
.bc-esri-nearby .esri-popup__button--close,
.bc-esri-nearby .esri-features__header,
.bc-esri-nearby .esri-features__header-actions {
    display: none;
}

.bc-esri-nearby calcite-action-bar {
    display: none;
}

.bc-esri-nearby calcite-panel,
.bc-esri-nearby calcite-flow-item {
    --calcite-panel-header-background-color: transparent;
    --calcite-panel-header-content-space: 0;
    --calcite-flow-header-background-color: transparent;
    --calcite-flow-header-content-space: 0;
}

.bc-esri-nearby .esri-popup__main-container {
    width: 220px !important;
    border-radius: 13px;
}

.bc-esri-nearby .bc-esri-popup {
    width: 100%;
}

.bc-esri-nearby .esri-popup {
    box-shadow: 0px 4px 4px 0px #00000040;
}

.bc-esri-nearby .bc-esri-popup .bc-esri-popup__image {
    border-radius: 13px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    height: 120px;
}

.bc-esri-nearby .esri-features__container {
    padding: 3px !important;
}

.bc-esri-nearby .bc-esri-popup__title {
    line-height: normal;
}

.bc-esri-nearby .bc-esri-popup__title a {
    line-height: normal;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark, #1d1e1c);
}

.bc-esri-nearby .bc-esri-popup__title a:hover {
    text-decoration: underline;
}

.bc-esri-nearby .bc-esri-popup__body {
    width: 85%;
    margin: auto;
    margin-bottom: 20px;
    margin-top: 15px;
    overflow: hidden;
}

.bc-esri-nearby .bc-esri-popup__tags {
    display: none;
}

.bc-esri-nearby .bc-esri-popup__type {
    background: #FFFF1F !important;
    color: black;
    border-radius: 0;
    font-size: 10px;
    letter-spacing: 0;
}

.bc-esri-map-error {
    max-width: 320px;
    text-align: center;
    color: #6b6b6b;
    font-size: 14px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d9d9d9;
    border-radius: 10px;
}

.bc-esri-nearby .esri-popup {
    z-index: 1;
    pointer-events: none;
    position: absolute;
    flex-flow: column;
    background-color: white;
    pointer-events: all;
}

.bc-esri-nearby .esri-ui:first-child {
    display: none;
}

.bc-esri-nearby .esri-popup__pointer[role="presentation"] {
    top: 100%;
    left: 50%;
    margin: 0px 0px 0px -6px;
    width: 0px;
    height: 0px;
    position: absolute;
}

.bc-esri-nearby .esri-popup__pointer[role="presentation"] .esri-popup__pointer-direction {
    content: "";
    background-color: rgb(255, 255, 255);
    width: 12px;
    height: 12px;
    position: absolute;
    transform: scale(0.75, 2) rotate(45deg);
    top: -6px;
    left: 0px;
}

/* ── Cluster Popup styling ── */
.bc-esri-nearby .esri-popup__main-container:has(.bc-esri-popup--cluster) {
    width: 280px !important;
}

.bc-esri-nearby .bc-esri-popup--cluster {
    display: flex;
    flex-direction: column;
    max-height: 380px;
    background: var(--white, #ffffff);
}

.bc-esri-nearby .bc-esri-popup__cluster-header {
    font-family: var(--primary, Montserrat, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark, #1d1e1c);
    padding: 10px 12px;
    border-bottom: 1px solid var(--grey-line, #d9d9d9);
    background: var(--grey-background, #f9f9f9);
    letter-spacing: 0.05em;
}

.bc-esri-nearby .bc-esri-popup__cluster-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-line, #d9d9d9) transparent;
}

.bc-esri-nearby .bc-esri-popup__cluster-list::-webkit-scrollbar {
    width: 4px;
}

.bc-esri-nearby .bc-esri-popup__cluster-list::-webkit-scrollbar-thumb {
    background: var(--grey-line, #d9d9d9);
    border-radius: 4px;
}

.bc-esri-nearby .bc-esri-popup__cluster-item {
    border-bottom: 1px solid var(--grey, #f2f2f2);
    padding: 10px 12px;
    transition: background-color 0.2s ease;
}

.bc-esri-nearby .bc-esri-popup__cluster-item:last-child {
    border-bottom: none;
}

.bc-esri-nearby .bc-esri-popup__cluster-item:hover {
    background-color: var(--grey-background, #f9f9f9);
}

.bc-esri-nearby .bc-esri-popup__cluster-item-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-type {
    display: inline-block;
    align-self: flex-start;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white, #ffffff);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.1;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-city {
    font-size: 10px;
    color: var(--grey-text, #6b6b6b);
}

.bc-esri-nearby .bc-esri-popup__cluster-item-title {
    font-family: var(--primary, Montserrat, sans-serif);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark, #1d1e1c);
    margin: 0;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-title a {
    color: var(--dark, #1d1e1c) !important;
    text-decoration: none;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.bc-esri-nearby .bc-esri-popup__cluster-item-title a:hover {
    text-decoration: underline;
}