/* =================================
   BIKE HOSTS OVERVIEW PAGE
   ================================= */

.bhl-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 64px;
    font-family: var(--font-primary, sans-serif);
}

.bhl-back { margin-bottom: 16px; }
.bhl-back__link { font-size: 14px; color: #6b7280; text-decoration: none; }
.bhl-back__link:hover { color: #111; }

/* ── Hero ── */
.bhl-hero {
    text-align: center;
    padding: 40px 0 36px;
    max-width: 700px;
    margin: 0 auto 40px;
}
.bhl-hero__badge { margin-bottom: 12px; }
.bhl-hero__title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}
.bhl-hero__intro {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 14px;
}
.bhl-hero__count {
    font-size: 14px;
    font-weight: 600;
    color: #4c7c59;
    margin: 0;
}

/* =================================
   MAP SECTION
   ================================= */

.bhl-map-section {
    margin-bottom: 48px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#bhl-map-container {
    position: relative;
    height: 520px;
}

#bhl-map {
    height: 100%;
    width: 100%;
}


/* Tighten right-side control container against map edge */
#bhl-map .leaflet-top.leaflet-right {
    top: 8px;
    right: 8px;
}
#bhl-map .leaflet-top.leaflet-right .leaflet-control {
    margin-right: 0;
    margin-top: 0;
}

/* Tighten left-side control container */
#bhl-map .leaflet-top.leaflet-left {
    top: 8px;
    left: 8px;
}
#bhl-map .leaflet-top.leaflet-left .leaflet-control {
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 6px;
}

/* Sidebar open: push left controls right to clear sidebar */
#bhl-sidebar:not(.collapsed) ~ .leaflet-control-container .leaflet-top.leaflet-left,
#bhl-map-container .leaflet-sidebar:not(.collapsed) ~ .leaflet-control-container .leaflet-top.leaflet-left {
    margin-left: 344px;
}

/* Green attribution links (overrides map_shared.css #666) */
.attribution-text a { color: #4c7c59; }

/* =================================
   SIDEBAR TOGGLE BUTTON
   ================================= */

.bhl-list-toggle-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #E9F2EE !important;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}
.bhl-list-toggle-btn:hover,
.bhl-list-toggle-btn.active {
    background: #f3f4f6;
    border-color: rgba(0,0,0,.4) !important;
}

/* =================================
   SIDEBAR
   ================================= */

/* Hide tab strip — we use the custom toggle button instead */
#bhl-sidebar .leaflet-sidebar-tabs { display: none !important; }

#bhl-sidebar {
    font-family: var(--font-primary, sans-serif);
    width: 340px !important;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* Content area: override plugin's left:40px offset from the (hidden) tab strip */
#bhl-sidebar .leaflet-sidebar-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#bhl-sidebar .leaflet-sidebar-pane {
    padding: 0 !important;
}
#bhl-sidebar .leaflet-sidebar-pane.active {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Header bar */
#bhl-sidebar h1.leaflet-sidebar-header {
    flex-shrink: 0;
    width: 100%;
    min-height: 46px;
    padding: 0 38px 0 14px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.3;
    user-select: none;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e7eb;
}

#bhl-sidebar-title {
    display: block;
    width: 100%;
    outline: none;
}
.bhl-sb-back-arrow { color: #4c7c59; }

/* Close × button */
.bhl-sidebar-close {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 1010;
    background: #fff;
    color: #111;
    border-radius: 50%;
    border: 2px solid #e9f2ee;
    font-size: 14px;
    width: 22px;
    height: 22px;
    line-height: 1;
    padding: 0 0 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.bhl-sidebar-close:hover { background: #e9ecef; border-color: #adb5bd; }

/* Scrollable content */
#bhl-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    min-height: 0;
}
#bhl-sidebar-content::-webkit-scrollbar { width: 4px; }
#bhl-sidebar-content::-webkit-scrollbar-track { background: transparent; }
#bhl-sidebar-content::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* =================================
   SIDEBAR — LIST VIEW
   ================================= */

.bhl-sb-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bhl-sb-item {
    display: flex;
    align-items: center;
    border-radius: 8px;
    background: #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 72px;
    overflow: hidden;
}
.bhl-sb-item:hover { background: #e5e7eb; }

.bhl-sb-item__img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    display: block;
}
.bhl-sb-item__img--empty {
    width: 72px;
    height: 72px;
    background: #d1d5db;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
}
.bhl-sb-item__body {
    padding: 8px 10px;
    min-width: 0;
    flex: 1;
}
.bhl-sb-item__badge { margin-bottom: 3px; }
.bhl-sb-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bhl-sb-item__address {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =================================
   SIDEBAR — DETAIL VIEW
   ================================= */

.bhl-sb-detail { display: flex; flex-direction: column; }

.bhl-sb-detail__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}
.bhl-sb-detail__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bhl-sb-detail__badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.bhl-sb-detail__badge img { width: 100%; height: 100%; }

.bhl-sb-detail__body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bhl-sb-detail__name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.3;
}

.bhl-sb-detail__contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bhl-sb-detail__row {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}
.bhl-sb-detail__row img { flex-shrink: 0; margin-top: 1px; }
.bhl-sb-detail__row a { color: #4c7c59; text-decoration: none; }
.bhl-sb-detail__row a:hover { text-decoration: underline; }

/* Facility pills — same look as widget .feature-icon */
.bhl-sb-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.bhl-sb-facility {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #4c7c59;
    padding: 2px 8px 2px 0;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #4c7c59;
    line-height: 1.2;
    white-space: nowrap;
}
.bhl-sb-facility img {
    padding-left: 3px;
    display: block;
    flex-shrink: 0;
}

/* Website button */
.bhl-sb-detail__website {
    display: block;
    padding: 8px 14px;
    background: #4c7c59;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
}
.bhl-sb-detail__website:hover { background: #3a6046; }

/* Full profile link */
.bhl-sb-detail__profile {
    display: block;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    text-align: center;
    transition: color 0.15s;
}
.bhl-sb-detail__profile:hover { color: #4c7c59; }


/* =================================
   CARD GRID (below map)
   ================================= */

.bhl-list__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #111;
}
.bhl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.bhl-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.bhl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: #4c7c59; }

.bhl-card__image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f3f4f6;
}
.bhl-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.bhl-card:hover .bhl-card__image img { transform: scale(1.03); }
.bhl-card__image--empty { background: #e5e7eb; }

.bhl-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.bhl-card__badge { display: flex; align-items: center; }
.bhl-card__name { font-size: 15px; font-weight: 700; margin: 0; color: #111; line-height: 1.3; }
.bhl-card__address { font-size: 13px; color: #6b7280; margin: 0; }
.bhl-card__facilities {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.bhl-card__facilities li {
    font-size: 11px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 2px 6px;
}

/* =================================
   RESPONSIVE
   ================================= */

@media (max-width: 600px) {
    .bhl-grid { grid-template-columns: 1fr; }
    #bhl-map-container { height: 420px; }
    #bhl-sidebar { width: calc(100vw - 56px) !important; }
}
