@import url('map-lists.css');
@import url('landing-map-popup.css');

.explore-scope-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.explore-scope-nav .nav-link {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.explore-scope-nav .nav-link.active {
    background: var(--color-primary-500);
    border-color: var(--color-primary-500);
    color: #fff;
}

.explore-scope-nav .hub-ecosystem-scope-nav__materials {
    border-color: rgba(255, 193, 7, 0.55);
    background: rgba(255, 193, 7, 0.12);
    color: var(--color-text-primary);
    text-decoration: none;
}

.explore-scope-nav .hub-ecosystem-scope-nav__materials:hover {
    border-color: rgba(255, 193, 7, 0.85);
    background: rgba(255, 193, 7, 0.2);
    color: var(--color-text-primary);
}

.explore-page .filters-bar {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.explore-page .filter-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.explore-page .filter-label-inline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0;
    white-space: nowrap;
}

.explore-page .search-box-inline {
    position: relative;
}

.explore-page .search-box-inline .search-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
}

.explore-page .search-box-inline .search-input {
    padding-left: 1.75rem;
    width: 180px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.explore-page .price-input {
    width: 90px;
}

.explore-page .filter-btn {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.explore-page .filter-btn:hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary-200);
    color: var(--color-primary-700);
}

.explore-page .filter-btn.active {
    background: var(--color-primary-500);
    border-color: var(--color-primary-500);
    color: white;
}

.explore-page .filter-corporate:hover {
    background: rgba(25, 118, 210, 0.1);
    border-color: #1976d2;
    color: #1976d2;
}

.explore-page .filter-corporate.active {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.explore-page .filter-individual:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

.explore-page .filter-individual.active {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.explore-page .cards-panel {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    height: 70vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.explore-page .section-title-inline {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.explore-page .map-panel {
    position: relative;
    height: 70vh;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

@media (max-width: 575.98px), (max-height: 520px) {
    .explore-page .map-panel {
        height: min(48vh, 280px);
        min-height: 180px;
    }

    .explore-page--auctions .detail-panel {
        height: min(48vh, 280px);
        min-height: 180px;
    }
}

.explore-page .map-container {
    width: 100%;
    height: 100%;
}

.explore-page .map-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.explore-page .product-marker .marker-pin,
.explore-page .supplier-marker .marker-pin {
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: var(--color-primary-500);
    transform: rotate(-45deg);
    margin: 0 auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.explore-page .product-marker.marker-highlight .marker-pin,
.explore-page .supplier-marker.marker-highlight .marker-pin {
    transform: rotate(-45deg) scale(1.4);
    background: var(--color-primary-600);
}

.explore-page--auctions .detail-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    height: 70vh;
    min-height: 400px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.explore-page--auctions .detail-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    margin: auto;
    align-self: center;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 22rem;
}

.explore-page--auctions .detail-content {
    width: 100%;
    max-width: none;
}

.explore-page--auctions .dashboard-auction-detail-gallery {
    min-width: 0;
    max-width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 992px) {
    .explore-page--auctions .dashboard-auction-detail-gallery {
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
    }
}

.explore-page--auctions .dashboard-auction-ref {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.8125rem;
}

.explore-page--auctions .detail-swiper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    height: clamp(180px, 32vh, 320px);
}

.explore-page--auctions .detail-swiper-img {
    display: block;
    width: 100%;
    height: clamp(180px, 32vh, 320px);
    object-fit: cover;
}

@media (max-width: 991px) {
    .explore-page .cards-panel,
    .explore-page .map-panel,
    .explore-page--auctions .detail-panel {
        height: 50vh;
        min-height: 320px;
    }
}

.map-list-popup-leaflet .leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}

.map-list-popup-leaflet .leaflet-popup-content {
    margin: 0;
    width: 250px !important;
}

.map-list-popup {
    font-size: 0.85rem;
    line-height: 1.35;
    color: #1a1a1a;
}

.map-list-popup__media {
    position: relative;
    display: block;
    height: 88px;
    background: #e9ecef;
    text-decoration: none;
    color: inherit;
}

.map-list-popup__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-list-popup__visit-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 67, 50, 0.55);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.map-list-popup__media:hover .map-list-popup__visit-hint {
    opacity: 1;
}

.map-list-popup__sponsor-logo {
    max-height: 18px;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
}

/* Hub embed — ecosystem viewer inside the hub main card */
#prototype-hub .hub-ecosystem-viewer__split {
    min-height: clamp(28rem, 70vh, 48rem);
}

#prototype-hub .hub-ecosystem-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#prototype-hub .hub-ecosystem-activity-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
}

#prototype-hub .hub-ecosystem-scope-nav--vertical {
    flex-wrap: nowrap;
    margin-bottom: 0;
    gap: 0.35rem;
}

#prototype-hub .hub-ecosystem-scope-nav--vertical .nav-link {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    border-radius: 0.65rem;
}

#prototype-hub .hub-ecosystem-scope-nav--vertical .hub-ecosystem-scope-nav__materials {
    margin-top: 0.25rem;
}

#prototype-hub .hub-ecosystem-main {
    min-width: 0;
}

#prototype-hub .hub-ecosystem-viewer .hub-ecosystem-scope-nav button.nav-link {
    background: var(--color-bg-primary, #fff);
    cursor: pointer;
    color: var(--color-text-primary, #212529);
}

#prototype-hub .hub-ecosystem-viewer .hub-ecosystem-scope-nav button.nav-link.active {
    background: var(--color-primary-500);
    border-color: var(--color-primary-500);
    color: #fff;
}

#prototype-hub .hub-ecosystem-viewer .hub-ecosystem-scope-nav .hub-ecosystem-scope-nav__materials {
    background: rgba(255, 193, 7, 0.12);
}

#prototype-hub .hub-ecosystem-explorer-mount {
    width: 100%;
    min-height: 0;
}

#prototype-hub .hub-ecosystem-explorer {
    width: 100%;
    min-height: 0;
}

#prototype-hub .hub-ecosystem-viewer .proto-explorer-body {
    min-height: 0;
    align-items: stretch;
}

#prototype-hub .hub-ecosystem-viewer .proto-explorer-map-col {
    min-height: var(--proto-map-min, 16rem);
}

#prototype-hub .hub-ecosystem-panel-host .explore-page {
    margin: 0;
}

#prototype-hub .hub-ecosystem-panel-host .explore-page .cards-panel,
#prototype-hub .hub-ecosystem-panel-host .explore-page .map-panel,
#prototype-hub .hub-ecosystem-panel-host .explore-page--auctions .detail-panel {
    height: min(58vh, 520px);
    min-height: 360px;
}

@media (max-width: 575.98px), (max-height: 520px) {
    #prototype-hub .hub-ecosystem-panel-host .explore-page .cards-panel,
    #prototype-hub .hub-ecosystem-panel-host .explore-page .map-panel,
    #prototype-hub .hub-ecosystem-panel-host .explore-page--auctions .detail-panel {
        height: min(46vh, 260px);
        min-height: 180px;
    }

    #prototype-hub .hub-ecosystem-panel-host .tool-panes {
        min-height: min(46vh, 260px);
    }
}

#prototype-hub .hub-ecosystem-panel-host .map-container,
#prototype-hub .hub-ecosystem-panel-host #exploreMap {
    width: 100%;
    height: 100%;
    min-height: 0;
}

#prototype-hub .hub-ecosystem-panel-host .tool-panes {
    min-height: min(58vh, 520px);
}

@media (min-width: 992px) {
    #prototype-hub .hub-ecosystem-panel-host .explore-page .cards-panel,
    #prototype-hub .hub-ecosystem-panel-host .explore-page .map-panel,
    #prototype-hub .hub-ecosystem-panel-host .explore-page--auctions .detail-panel {
        height: min(62vh, 560px);
        min-height: 400px;
    }

    #prototype-hub .hub-ecosystem-panel-host .tool-panes {
        min-height: min(62vh, 560px);
    }
}
