/* Citybeach.de – Beach-Karte Map Styles */

/* ── Layout ─────────────────────────────────────────────────── */
#cb-map-page {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
    font-family: var(--cb-font-body, 'Nunito', sans-serif);
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#cb-map-sidebar {
    width: 380px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #EEE9E2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
    box-shadow: 2px 0 12px rgba(24,120,200,0.06);
}

#cb-map-sidebar-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid #EEE9E2;
    flex-shrink: 0;
}

#cb-map-search {
    display: flex;
    align-items: center;
    background: #F8F6F2;
    border-radius: 999px;
    padding: 0 14px;
    gap: 8px;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    margin-bottom: 10px;
}
#cb-map-search:focus-within {
    background: #fff;
    border-color: #2DD4C0;
    box-shadow: 0 0 0 3px rgba(45,212,192,0.15);
}
#cb-map-search svg { color: #8890A8; flex-shrink: 0; }
#cb-map-search input {
    flex: 1; border: none; outline: none;
    background: transparent;
    font-family: var(--cb-font-body, 'Nunito', sans-serif);
    font-size: 14px; color: #1A1C2E;
    padding: 10px 0;
}
#cb-map-search input::placeholder { color: #8890A8; }

#cb-map-filter-pills {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
#cb-map-filter-pills::-webkit-scrollbar { display: none; }

.cb-map-pill {
    background: #F8F6F2;
    border: none;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--cb-font-body, 'Nunito', sans-serif);
    color: #4A5068;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s;
}
.cb-map-pill:hover { background: #EEE9E2; }
.cb-map-pill.active {
    background: linear-gradient(90deg,#F15252,#F5844A,#2DD4C0,#1878C8);
    color: #fff;
    box-shadow: 0 3px 10px rgba(241,82,82,0.28);
}

#cb-map-result-count {
    padding: 8px 18px;
    font-size: 12px;
    color: #8890A8;
    border-bottom: 1px solid #EEE9E2;
    flex-shrink: 0;
}
#cb-map-result-count strong { color: #F15252; }

#cb-map-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #EEE9E2 transparent;
}
#cb-map-list::-webkit-scrollbar { width: 4px; }
#cb-map-list::-webkit-scrollbar-thumb { background: #EEE9E2; border-radius: 4px; }

/* Location List Item */
.cb-loc-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    border: 1.5px solid transparent;
    margin-bottom: 6px;
}
.cb-loc-item:hover { background: #F8F6F2; }
.cb-loc-item.active {
    background: #F8F6F2;
    border-color: #2DD4C0;
    box-shadow: 0 2px 12px rgba(24,120,200,0.12);
}

.cb-loc-icon {
    width: 48px; height: 44px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cb-loc-body { flex: 1; min-width: 0; }
.cb-loc-name {
    font-family: var(--cb-font-head, 'Urbanist', sans-serif);
    font-weight: 700;
    font-size: 13px;
    color: #1A1C2E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.cb-loc-meta {
    font-size: 11px;
    color: #8890A8;
    display: flex; align-items: center; gap: 4px;
}
.cb-loc-cat {
    display: inline-block;
    background: #F8F6F2;
    color: #4A5068;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
}

/* ── Map ─────────────────────────────────────────────────────── */
#cb-map-container {
    flex: 1;
    position: relative;
    z-index: 1;
}

#cb-leaflet-map {
    width: 100%;
    height: 100%;
}

/* ── Marker ──────────────────────────────────────────────────── */
.cb-pin {
    width: 34px; height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.cb-pin.active { width: 42px; height: 42px; }
.cb-pin-inner {
    transform: rotate(45deg);
    font-size: 13px;
    line-height: 1;
}

/* ── Cluster ─────────────────────────────────────────────────── */
.marker-cluster { background-clip: padding-box; border-radius: 50%; }
.marker-cluster div {
    text-align: center; border-radius: 50%;
    font-family: var(--cb-font-head, 'Urbanist', sans-serif);
    font-weight: 800; color: white;
    display: flex; align-items: center; justify-content: center;
    margin: 5px;
}
.marker-cluster-small  { width: 38px !important; height: 38px !important; }
.marker-cluster-medium { width: 46px !important; height: 46px !important; }
.marker-cluster-large  { width: 54px !important; height: 54px !important; }
.marker-cluster-small div  { width: 28px; height: 28px; font-size: 12px; background: linear-gradient(135deg,#F15252,#F5844A); box-shadow: 0 2px 8px rgba(241,82,82,0.45); }
.marker-cluster-medium div { width: 36px; height: 36px; font-size: 13px; background: linear-gradient(135deg,#F5844A,#2DD4C0); box-shadow: 0 2px 10px rgba(245,132,74,0.45); }
.marker-cluster-large div  { width: 44px; height: 44px; font-size: 15px; background: linear-gradient(135deg,#1878C8,#0D2E5A); box-shadow: 0 3px 12px rgba(24,120,200,0.45); }

/* ── Info Panel (active location) ────────────────────────────── */
#cb-map-info {
    position: absolute;
    top: 16px; right: 16px;
    width: 270px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(24,120,200,0.22);
    overflow: hidden;
    z-index: 500;
    display: none;
    animation: cbSlideIn 0.3s ease;
}
#cb-map-info.visible { display: block; }
@keyframes cbSlideIn {
    from { opacity:0; transform:translateY(-12px); }
    to   { opacity:1; transform:none; }
}
#cb-map-info-img {
    height: 110px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    position: relative;
}
#cb-map-info-close {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%; width: 28px; height: 28px;
    cursor: pointer; font-size: 16px; color: white;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
#cb-map-info-body { padding: 14px 16px 16px; }
#cb-map-info-name {
    font-family: var(--cb-font-head, 'Urbanist', sans-serif);
    font-weight: 800; font-size: 15px;
    color: #1A1C2E; margin-bottom: 3px;
}
#cb-map-info-meta {
    font-size: 12px; color: #8890A8;
    display: flex; align-items: center; gap: 4px;
    margin-bottom: 10px;
}
#cb-map-info-cat {
    display: inline-block;
    border-radius: 999px; padding: 3px 10px;
    font-size: 11px; font-weight: 700;
    color: white; margin-bottom: 12px;
}
#cb-map-info-links { display: flex; flex-direction: column; gap: 7px; }
#cb-map-info-links a {
    display: block; text-align: center;
    padding: 9px; border-radius: 10px;
    font-family: var(--cb-font-head, 'Urbanist', sans-serif);
    font-weight: 700; font-size: 13px;
    text-decoration: none; transition: filter 0.2s;
}
.cb-info-link-primary {
    background: linear-gradient(90deg,#F15252,#F5844A,#2DD4C0,#1878C8);
    color: white !important;
}
.cb-info-link-primary:hover { filter: brightness(1.08); }
.cb-info-link-secondary {
    background: #F8F6F2;
    color: #4A5068 !important;
}
.cb-info-link-secondary:hover { background: #EEE9E2; }

/* ── Locate Button ───────────────────────────────────────────── */
#cb-map-locate {
    position: absolute; bottom: 24px; left: 24px; z-index: 500;
    background: white; border: none; cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    font-family: var(--cb-font-body, 'Nunito', sans-serif);
    font-weight: 600; font-size: 13px; color: #4A5068;
    transition: all 0.2s;
}
#cb-map-locate:hover { color: #2DD4C0; box-shadow: 0 4px 16px rgba(24,120,200,0.18); }

/* ── Empty State ─────────────────────────────────────────────── */
.cb-map-empty {
    text-align: center; padding: 40px 20px;
    color: #8890A8;
}
.cb-map-empty-icon { font-size: 40px; margin-bottom: 12px; }
.cb-map-empty-title { font-weight: 700; font-size: 15px; color: #1A1C2E; margin-bottom: 6px; }
.cb-map-empty-sub { font-size: 13px; }

/* ── Leaflet overrides ───────────────────────────────────────── */
.leaflet-control-zoom a {
    font-family: var(--cb-font-head,'Urbanist',sans-serif) !important;
    font-weight: 700 !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    #cb-map-page { flex-direction: column-reverse; height: calc(100vh - 60px); }
    #cb-map-sidebar {
        width: 100%; height: 45%;
        border-right: none; border-top: 1px solid #EEE9E2;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
    }
    #cb-map-container { flex: 1; }
    #cb-map-info { top: auto; bottom: 50%; right: 8px; left: 8px; width: auto; }
    #cb-map-locate { bottom: 16px; left: 16px; }
}
