.abc3map-page{position:relative;width:100%;max-width:none}.abc3map-toolbar{display:flex;align-items:center;justify-content:flex-end;min-height:24px;margin:0 0 6px;padding:0 2px}.abc3map-count{font-size:13px}.abc3map-canvas{width:100%;height:calc(100vh - 210px);min-height:560px;background:#eef2f5;border:1px solid var(--hh-border-color,#ddd);border-radius:4px}.abc3map-filter-index{display:none!important}.abc3map-popup-title{font-weight:700;margin-bottom:4px}.abc3map-popup-location{font-size:12px;color:#666;margin-top:4px}.abc3map-popup-link{display:inline-block;margin-top:6px}.abc3map-space-modal .modal-dialog{width:min(920px,calc(100vw - 24px))}.abc3map-space-card h3{margin-top:0}.abc3map-space-table th{width:140px;white-space:nowrap}.abc3map-popup .btn{margin-top:6px}

/* Map must reuse the same /cat and /spaces search surface, not a separate boxed overlay. */
.abc3map-page .abc3search-heading{margin-bottom:8px}.abc3map-page .abc3search-search-shell{display:block!important;position:static!important;width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;margin:0 0 8px!important}.abc3map-page .abc3search-search-body{display:block!important;padding:0!important}.abc3map-page .abc3search-mobile-search-header,.abc3map-page .abc3search-mobile-search-footer{display:none}.abc3map-page .abc3search-local .abc3search-advanced-filter{display:block!important}.abc3map-page .abc3search-mobile-advanced-toggle-field{display:none!important}

@media (min-width:768px){.abc3map-page .abc3map-canvas{height:calc(100vh - 195px);min-height:610px}}
@media (max-width:767px){.abc3map-toolbar{justify-content:center;margin-bottom:4px}.abc3map-canvas{height:calc(100vh - 128px);min-height:450px;border-radius:3px}.abc3map-space-table th,.abc3map-space-table td{display:block;width:100%;white-space:normal}.abc3map-page .abc3search-search-shell{display:none!important;position:fixed!important;left:6px!important;right:6px!important;top:56px!important;bottom:8px!important;z-index:1050!important;padding:0!important;border:1px solid var(--hh-border-color,#d7d7d7)!important;border-radius:8px!important;background:var(--hh-background-color-main,#fff)!important;box-shadow:0 10px 30px rgba(0,0,0,.32)!important;overflow:hidden!important}.abc3map-page.abc3search-search-open .abc3search-search-shell{display:flex!important;flex-direction:column}.abc3map-page .abc3search-mobile-search-header{display:flex!important;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-bottom:1px solid var(--hh-border-color,#d7d7d7);background:var(--hh-background-color-page,#f7f7f7)}.abc3map-page .abc3search-search-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:10px 10px 4px!important;background:var(--hh-background-color-main,#fff)!important}.abc3map-page .abc3search-mobile-search-footer{display:block!important;padding:8px 10px;border-top:1px solid var(--hh-border-color,#d7d7d7);background:var(--hh-background-color-page,#f7f7f7)}.abc3map-page .abc3search-mobile-search-footer .btn{width:100%}.abc3map-page .abc3search-mobile-advanced-toggle-field{display:block!important}.abc3map-page form.abc3search-local:not(.abc3search-advanced-open) .abc3search-advanced-filter{display:none!important}.abc3map-page form.abc3search-local.abc3search-advanced-open .abc3search-advanced-filter{display:block!important}.abc3map-page .abc3search-search-launcher{display:inline-flex!important}}

/* v26.06.02.5: readable formatted map preview descriptions. */
.abc3map-rich-description p {
    margin: 0 0 8px;
}
.abc3map-rich-description ul {
    margin: 0 0 8px 20px;
    padding: 0;
}
.abc3map-rich-description h3,
.abc3map-rich-description h4 {
    margin: 10px 0 6px;
    font-size: 16px;
    font-weight: 700;
}
.abc3map-rich-description a {
    word-break: break-word;
}

/* ABC3 compact map toolbar spacing */
.abc3map-page .abc3search-directory-panel {
    margin-top: 0 !important;
    margin-bottom: 3px !important;
}

.abc3map-page .abc3search-directory-panel .panel-body {
    padding: 3px 5px !important;
}

.abc3map-page .abc3map-toolbar {
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
}

.abc3map-page .abc3map-canvas {
    margin-top: 0 !important;
}

/* ABC3 map: remove top gap above unified toolbar */
.abc3map-page.abc3search-spaces-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
    
}

.abc3map-page.abc3search-spaces-page > .abc3search-directory-panel:first-child {
    margin-top: 0 !important;
}

/* ABC3 map: unified toolbar close to top, count overlay inside map */
.abc3map-page > .abc3search-spaces-page.container {
    margin-top: -10px !important;
    margin-bottom: 2px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.abc3map-page > .abc3search-spaces-page.container .panel {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

.abc3map-page > .abc3search-spaces-page.container .panel-body {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.abc3map-page .abc3map-toolbar {
    display: none !important;
}

.abc3map-page .abc3map-canvas-wrap {
    position: relative;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.abc3map-page .abc3map-count-overlay {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 900;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #555;
    font-size: 12px;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.abc3map-page .abc3map-canvas {
    margin-top: 0 !important;
}

/* v26.06.30.1: abc3map category tree layout, matching /cat behavior concept without touching abc3cat. */
.abc3map-layout {
    display: grid;
    grid-template-columns: minmax(210px, 22%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 6px;
}

.abc3map-category-pane,
.abc3map-map-pane {
    min-width: 0;
}

.abc3map-category-pane {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    z-index: 40;
}

.abc3map-category-panel {
    margin-bottom: 0 !important;
    border-radius: 4px;
    box-shadow: none;
}

.abc3map-category-panel .panel-heading {
    padding: 6px 10px !important;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.abc3map-category-panel .panel-body {
    padding: 8px !important;
}

.abc3map-category-tree {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 3px;
    margin: 0;
    padding: 0;
}

.abc3map-category-node {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0;
    margin: 0;
    padding: 0;
    min-height: 0;
}

.abc3map-category-row {
    display: flex;
    align-items: stretch;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #d7e3f3;
    border-left: 4px solid #5b9bd5;
    border-right: 4px solid #d7e3f3;
    border-radius: 4px;
    background: #fff;
    overflow: visible;
}

.abc3map-category-link {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    color: #333;
    line-height: 1.2;
    text-decoration: none;
}

.abc3map-category-link:hover,
.abc3map-category-link:focus {
    background: #f5f8fc;
    color: #111;
    text-decoration: none;
}

.abc3map-category-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.abc3map-category-count {
    margin-left: 5px;
    color: #777;
    font-weight: normal;
    white-space: nowrap;
}

.abc3map-category-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border-left: 1px solid #e5e5e5;
    background: #f7f7f7;
    color: #555;
    line-height: 1;
    font-weight: normal;
    cursor: pointer;
}

.abc3map-category-expand:hover,
.abc3map-category-expand:focus {
    background: #edf3fb;
    color: #111;
}

.abc3map-category-expand-empty {
    cursor: default;
    opacity: .35;
}

.abc3map-category-toggle {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.abc3map-category-children {
    display: none;
    grid-template-columns: 1fr;
    row-gap: 3px;
    margin: 3px 0 0 22px;
    padding: 0;
    min-height: 0;
}

.abc3map-category-toggle:checked ~ .abc3map-category-children {
    display: grid;
}

.abc3map-category-toggle:checked + .abc3map-category-row .abc3map-category-expand .fa:before {
    content: "\f077";
}

.abc3map-category-selected > .abc3map-category-row {
    border-color: #337ab7;
    border-left-color: #337ab7;
    background: #f5f9ff;
}

.abc3map-mobile-category-toggle,
.abc3map-mobile-category-backdrop {
    display: none;
}

@media (min-width: 1400px) {
    .abc3map-layout {
        grid-template-columns: minmax(230px, 20%) minmax(0, 1fr);
    }
}

@media (max-width: 991px) {
    body.abc3map-mobile-sidebar-open {
        overflow: hidden !important;
    }

    .abc3map-mobile-category-toggle {
        display: inline-block;
        margin: 6px 0 8px 0;
    }

    .abc3map-mobile-category-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        z-index: 300000;
    }

    body.abc3map-mobile-sidebar-open .abc3map-mobile-category-backdrop {
        display: block;
    }

    .abc3map-layout {
        display: block;
        margin-top: 4px;
    }

    .abc3map-category-pane {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -88vw !important;
        right: auto !important;
        width: 86vw !important;
        max-width: 360px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #fff !important;
        padding: 12px !important;
        z-index: 300010 !important;
        box-shadow: 4px 0 18px rgba(0, 0, 0, .22) !important;
        transition: left .22s ease-in-out !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.abc3map-mobile-sidebar-open .abc3map-category-pane {
        left: 0 !important;
    }

    .abc3map-map-pane {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .abc3map-category-children {
        margin-left: 12px;
    }

    .abc3map-category-link {
        padding: 7px 8px;
    }

    .abc3map-category-expand {
        flex-basis: 38px;
        width: 38px;
    }
}

/* ABC3Map v26.06.30.3: mobile toolbar must match ABC3Cat.
   Desktop remains unchanged. On mobile, category drawer hamburger sits before search
   and toolbar labels are hidden so all directory icons fit in one row. */
@media (max-width: 767px) {
    .abc3map-page .abc3search-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .abc3map-page .abc3search-toolbar > .btn,
    .abc3map-page .abc3search-toolbar > a.btn,
    .abc3map-page .abc3search-toolbar > button.btn,
    .abc3map-page .abc3search-toolbar > .btn-group > .btn,
    .abc3map-page .abc3search-toolbar .abc3map-mobile-category-toggle {
        font-size: 0 !important;
        min-width: 34px !important;
        height: 34px !important;
        padding: 6px 9px !important;
        line-height: 20px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }

    .abc3map-page .abc3search-toolbar .fa,
    .abc3map-page .abc3search-toolbar .glyphicon {
        font-size: 14px !important;
        line-height: 20px !important;
        margin: 0 !important;
    }

    .abc3map-page .abc3search-toolbar .caret {
        margin-left: 0 !important;
    }

    .abc3map-page .abc3search-toolbar .abc3map-mobile-category-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: -100 !important;
    }

    .abc3map-page .abc3search-toolbar .abc3search-inline-search-open,
    .abc3map-page .abc3search-toolbar [aria-label="Search"],
    .abc3map-page .abc3search-toolbar [title="Search"] {
        order: -90 !important;
    }

    .abc3map-mobile-category-toggle {
        display: none;
    }
}


/* ABC3Map v26.06.30.4: mobile-only create modal/dropdown stacking.
   The mobile category drawer/backdrop uses high z-index values, so the
   shared ABC3Search create modal/dropdown must sit above them on mobile. */
@media (max-width: 767px) {
    body.abc3map-page-active #abc3searchCreateModal,
    .abc3map-page #abc3searchCreateModal,
    body.abc3map-page-active .modal#abc3searchCreateModal,
    .abc3map-page .modal#abc3searchCreateModal {
        z-index: 500020 !important;
    }

    body.abc3map-page-active .modal-backdrop,
    body.abc3map-page-active .modal-backdrop.in,
    body.abc3map-page-active .modal-backdrop.show {
        z-index: 500010 !important;
    }

    .abc3map-page .abc3search-toolbar,
    .abc3map-page .abc3search-toolbar .btn-group,
    .abc3map-page .abc3search-toolbar .dropdown,
    .abc3map-page .abc3search-toolbar .open,
    .abc3map-page .abc3search-toolbar .show {
        overflow: visible !important;
    }

    .abc3map-page .abc3search-toolbar .dropdown-menu,
    .abc3map-page .abc3search-toolbar .open > .dropdown-menu,
    .abc3map-page .abc3search-toolbar .show > .dropdown-menu {
        z-index: 500030 !important;
    }
}
