﻿/* ===== TITLE BAR ===== */
.wm-titlebar {
    background: white;
    border-bottom: 1px solid #E2DDD6;
}

.wm-titlebar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 32px 20px;
}

.wm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7A7268;
    margin-bottom: 12px;
}

    .wm-breadcrumb a {
        color: #7A7268;
        text-decoration: none;
    }

        .wm-breadcrumb a:hover {
            color: #2D5A27;
        }

    .wm-breadcrumb i {
        font-size: 9px;
    }

    .wm-breadcrumb span {
        color: #1E3A1E;
        font-weight: 600;
    }

.wm-titlebar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.wm-heading {
    font-family: Georgia,'Times New Roman',serif;
    font-size: 28px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.2;
    margin: 0;
}

.wm-subhead {
    font-size: 13px;
    color: #7A7268;
    margin: 6px 0 0;
}

/* Desktop right-side stats block */
.wm-titlebar-stats {
    text-align: right;
}

.wm-stat-main {
    font-family: Georgia,serif;
    font-size: 22px;
    font-weight: 700;
    color: #2D5A27;
    margin: 0;
    line-height: 1;
}

.wm-stat-sub {
    font-size: 12px;
    color: #7A7268;
    margin: 6px 0 0;
}

/* Tablet inline count — hidden by default */
.wm-tab-inline-count {
    display: none;
    font-size: 13px;
    color: #5A5651;
    margin: 0;
}

.wm-tab-count-num {
    font-family: Georgia,serif;
    font-size: 20px;
    font-weight: 700;
    color: #2D5A27;
}

/* Tablet chip strip in title bar — hidden by default */
.wm-tab-chips-row {
    display: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 12px;
}

    .wm-tab-chips-row::-webkit-scrollbar {
        display: none;
    }

.wm-tab-chips {
    display: flex;
    gap: 8px;
}

/* ===== TABLET FILTER ROW — hidden by default ===== */
.wm-tab-filter-row {
    display: none;
}

.wm-tab-filter-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 24px 14px;
}

.wm-tab-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.wm-tab-filter-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wm-tab-toggles {
    display: flex;
    align-items: center;
    gap: 24px;
}

    .wm-tab-toggles .wm-toggle-row {
        margin-bottom: 0;
    }

.wm-tab-apply-btn {
    background: #1E3A1E;
    color: #F4F1EC;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

    .wm-tab-apply-btn:hover {
        background: #2D5A27;
    }

.wm-tab-sel {
    padding-left: 12px;
}

/* ===== MOBILE BAR — hidden by default ===== */
.wm-mob-bar {
    display: none;
}

/* ===== MAIN GRID ===== */
.wm-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 32px 48px;
    display: grid;
    grid-template-columns: 288px 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== DESKTOP SIDEBAR ===== */
.wm-sidebar {
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 18px;
    padding: 20px;
    position: sticky;
    top: 88px;
    box-shadow: 0 2px 14px rgba(30,58,30,0.06);
}

.wm-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.wm-sidebar-title {
    font-family: Georgia,serif;
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.wm-clear-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #7A7268;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

    .wm-clear-btn:hover {
        color: #2D5A27;
    }

/* Pills */
.wm-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.wm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1E3A1E;
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.wm-pill-rm {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    opacity: 0.7;
    line-height: 1;
    transition: opacity 0.15s, color 0.15s;
}

    .wm-pill-rm:hover {
        opacity: 1;
        color: #C9A84C;
    }

/* Filter groups */
.wm-filter-group {
    margin-top: 16px;
}

.wm-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5A5651;
    margin-bottom: 7px;
}

.wm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wm-input-icon {
    position: absolute;
    left: 11px;
    font-size: 12px;
    color: #7A7268;
    pointer-events: none;
    z-index: 1;
}

.wm-input-caret {
    position: absolute;
    right: 11px;
    font-size: 10px;
    color: #7A7268;
    pointer-events: none;
}

.wm-select, .wm-input {
    width: 100%;
    background: #FAFAF7;
    border: 1px solid #E2DDD6;
    border-radius: 10px;
    padding: 9px 32px 9px 32px;
    font-size: 13px;
    color: #1A1A1A;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.wm-mob-sel, .wm-tab-sel {
    padding-left: 12px;
}

.no-caret .wm-input {
    padding-right: 12px;
}

.wm-select:focus, .wm-input:focus {
    border-color: #2D5A27;
    box-shadow: 0 0 0 3px rgba(45,90,39,0.1);
}

.wm-input::placeholder {
    color: #9A9388;
}

.wm-divider {
    height: 1px;
    background: #F0EDE6;
    margin: 18px 0 14px;
}

/* Toggles */
.wm-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 13px;
    user-select: none;
}

.wm-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1A1A1A;
    font-weight: 500;
}

.wm-ti {
    font-size: 11px;
}

    .wm-ti.gold {
        color: #C9A84C;
    }

    .wm-ti.green {
        color: #2D5A27;
    }

.wm-toggle {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #E2DDD6;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

    .wm-toggle[data-active="true"] {
        background: #1E3A1E;
    }

.wm-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
    transition: left 0.2s;
}

.wm-toggle[data-active="true"] .wm-toggle-knob {
    left: 18px;
}

.wm-apply-btn {
    display: block;
    width: 100%;
    background: #1E3A1E;
    color: #F4F1EC;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

    .wm-apply-btn:hover {
        background: #2D5A27;
    }

.wm-legend {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #F0EDE6;
}

.wm-legend-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5A5651;
    margin: 0 0 12px;
}

.wm-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #5A5651;
    margin-bottom: 9px;
}

.wm-pin-std {
    color: #6FA8DC;
    font-size: 15px;
}

.wm-pin-rare {
    color: #C9A84C;
    font-size: 15px;
}

.wm-pin-new {
    color: #8FCB6E;
    font-size: 15px;
}

/* Mobile-only sections */
.wm-mob-legend, .wm-mob-filter-panel {
    display: none;
}

/* ===== MAP PANEL ===== */
.wm-map-panel {
    min-width: 0;
    position: relative;
}

.wm-map-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 800;
    background: rgba(255,255,255,0.93);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1E3A1E;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    pointer-events: none;
}

    .wm-map-chip i {
        font-size: 14px;
    }

.wm-chip-sep {
    font-size: 12px;
    color: #7A7268;
    font-weight: 400;
    border-left: 1px solid #E2DDD6;
    padding-left: 10px;
}

/* Specimen card (mobile tap preview) */
.wm-specimen-card {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 74px;
    z-index: 900;
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(30,40,20,0.22);
    padding: 10px;
    align-items: center;
    gap: 12px;
}

    .wm-specimen-card.show {
        display: flex;
    }

.wm-spec-img {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: #F0EDE8;
    flex-shrink: 0;
}

.wm-spec-body {
    flex: 1;
    min-width: 0;
}

.wm-spec-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.wm-spec-name {
    font-family: Georgia,serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.25;
}

.wm-spec-rare-badge {
    background: #C9A84C;
    color: #1E3A1E;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    flex-shrink: 0;
}

.wm-spec-meta {
    font-size: 11px;
    color: #7A7268;
    margin: 0 0 3px;
}

.wm-spec-loc {
    font-size: 11px;
    color: #5A5651;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wm-spec-view-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1E3A1E;
    color: #C9A84C;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
}

.wm-spec-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.08);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5A5651;
    padding: 0;
    line-height: 1;
}

/* Map wrapper */
.wm-map-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #E2DDD6;
    box-shadow: 0 4px 20px rgba(30,58,30,0.08);
}

    .wm-map-wrap #worldMap {
        height: 680px !important;
    }

    .wm-map-wrap #mapSection_worldMap {
        margin: 0 !important;
    }

/* Desktop summary strip */
.wm-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 14px;
    padding: 13px 20px;
    margin-top: 14px;
    box-shadow: 0 1px 6px rgba(30,58,30,0.05);
}

.wm-strip-hint {
    font-size: 13px;
    color: #5A5651;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-strip-counts {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

    .wm-strip-counts span {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 12px;
        color: #5A5651;
    }

/* Tablet legend strip — hidden by default */
.wm-tab-legend {
    display: none;
}

.wm-tab-legend {
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 12px;
    padding: 12px 20px;
    margin-top: 14px;
    box-shadow: 0 1px 6px rgba(30,58,30,0.05);
}

.wm-tab-legend-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5A5651;
    margin: 0;
}

.wm-tab-legend-items {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

    .wm-tab-legend-items span {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: #5A5651;
    }

/* Mobile legend card */
.wm-mob-legend {
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 6px rgba(30,58,30,0.05);
}

.wm-mob-legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-top: 10px;
}

.wm-cluster-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #C9A84C;
    font-size: 8px;
    font-weight: 700;
    color: #3A2E08;
    flex-shrink: 0;
}

/* Mobile filter panel */
.wm-mob-filter-panel {
    background: white;
    border: 1px solid #E2DDD6;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 2px 12px rgba(30,58,30,0.06);
}

/* ===== TABLET (768–1023px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .wm-tab-filter-row {
        display: block;
        background: #FAFAF7;
        border-bottom: 1px solid #E2DDD6;
    }

    .wm-tab-inline-count {
        display: block;
    }

    .wm-tab-chips-row {
        display: block;
    }

    .wm-tab-legend {
        display: flex;
    }

    .wm-titlebar-inner {
        padding: 14px 24px 16px;
    }

    .wm-heading {
        font-size: 24px;
    }

    .wm-subhead {
        display: none;
    }

    .wm-titlebar-stats {
        display: none;
    }

    .wm-titlebar-row {
        align-items: center;
    }

    .wm-sidebar {
        display: none !important;
    }

    .wm-strip {
        display: none !important;
    }

    .wm-mob-bar {
        display: none !important;
    }

    .wm-mob-legend, .wm-mob-filter-panel {
        display: none !important;
    }

    .wm-main {
        grid-template-columns: 1fr;
        padding: 20px 24px 32px;
    }

    .wm-map-panel {
        order: 1;
    }

    .wm-map-wrap {
        border-radius: 16px;
    }

        .wm-map-wrap #worldMap {
            height: 560px !important;
        }
}

/* ===== MOBILE (≤767px) ===== */
@media (max-width: 767px) {
    .wm-mob-bar {
        display: block;
        background: #F4F1EC;
        border-bottom: 1px solid #E2DDD6;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .wm-mob-legend, .wm-mob-filter-panel {
        display: block;
    }

    .wm-mob-bar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px 8px;
    }

    .wm-mob-count {
        font-size: 13px;
        color: #1A1A1A;
        margin: 0;
    }

    .wm-mob-filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #1E3A1E;
        color: #F4F1EC;
        border: none;
        border-radius: 999px;
        padding: 6px 14px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }

        .wm-mob-filter-btn i {
            font-size: 10px;
        }

    .wm-mob-chips-wrap {
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 16px 10px;
        display: none;
    }

        .wm-mob-chips-wrap::-webkit-scrollbar {
            display: none;
        }

    .wm-mob-chips {
        display: flex;
        gap: 8px;
    }

    .wm-sidebar {
        display: none !important;
    }

    .wm-strip {
        display: none !important;
    }

    .wm-tab-filter-row {
        display: none !important;
    }

    .wm-tab-inline-count {
        display: none !important;
    }

    .wm-tab-chips-row {
        display: none !important;
    }

    .wm-tab-legend {
        display: none !important;
    }

    .wm-titlebar-stats {
        display: none !important;
    }

    .wm-titlebar-inner {
        padding: 12px 16px 14px;
    }

    .wm-heading {
        font-size: 20px;
    }

    .wm-subhead {
        display: none;
    }

    .wm-titlebar-row {
        flex-direction: column;
        gap: 4px;
    }

    .wm-main {
        grid-template-columns: 1fr;
        padding: 12px 16px 32px;
        gap: 14px;
    }

    .wm-map-panel {
        order: 1;
    }

    .wm-mob-legend {
        order: 2;
    }

    .wm-mob-filter-panel {
        order: 3;
    }

    .wm-map-wrap {
        border-radius: 14px;
    }

        .wm-map-wrap #worldMap {
            height: 380px !important;
        }

    .wm-map-chip {
        font-size: 11px;
        padding: 5px 11px;
        gap: 6px;
    }

    .wm-specimen-card {
        bottom: 12px;
    }
}

