/* Layout */
#map {
    /* vertical-align: middle; */
    margin-left: 15vw;
    /* margin-top: 10vh; */
    height: 55vh;
    width: 70vw;
    border: 2px solid var(--secondary);
    border-radius: 20px;
    position: relative;
}

/* Headings */
.pltitle {
    /* margin-top: 20px; */
    color: var(--primary);
    padding: 10px;
}

.plsubtitle {
    /* margin: 10px; */
    color: var(--secondary);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Hover label container (positioned via JS) */
.pinLabel {
    position: absolute;
    pointer-events: auto;
    padding: 8px 10px;
    z-index: 10000;
    display: none;
}

/* Card template inside pinLabel */
.pinCard {
    background: #111827;
    color: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 280px;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.pinCard-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pinCard-header .avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    overflow: hidden;
    flex-shrink: 0;
}

.pinCard-body {
    padding: 0 12px 8px;
}

.pinCard-meta {
    color: #9ca3af;
}

.bioSection {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
}

.bioToggle {
    appearance: none;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    width: 100%;
    text-align: left;
}

.bioToggle:hover {
    color: #e5e7eb;
}

.bioToggle i {
    transition: transform 0.2s;
    font-size: 10px;
}

.bioToggle.open i {
    transform: rotate(90deg);
}

.bioContent {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: #9ca3af;
    font-size: 12px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.bioContent.open {
    max-height: 200px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.bioContent.open::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.pinCard-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn:hover {
    background: #374151;
    border-color: rgba(255, 255, 255, 0.2);
}

.locationInput {
    border: 2px solid var(--primary);
    width: 30vw;
}

.nearestPrinterBtn {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
}

.locationWarning {
    text-align: center;
}

/* Filament list styling */
.filamentList {
    list-style: none;
    padding: 8px 0 0;
    margin: 8px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.filamentItem {
    display: flex;
    align-items: center;
    font-size: 12.5px;
    margin: 6px 0;
    padding: 4px 0;
}

.filamentItem span.materialName {
    font-weight: 600;
    color: #e5e7eb;
}

.chip {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.printVolume {
    margin-top: 2px;
    font-size: 12.5px;
    color: #d1d5db;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Far distance warning inside label */
.farWarning {
    margin-top: 10px;
    background: linear-gradient(135deg, #7e22ce, #a855f7);
    color: #fff;
    padding: 8px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.3);
    letter-spacing: .3px;
    text-align: center;
}

/* Filter Panel */
.filterPanel {
    background: #1f2937;
    border: 2px solid var(--secondary);
    border-radius: 12px;
    margin: 15px auto;
    max-width: 70vw;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filterHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.filterTitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.filterClearBtn {
    font-size: 11px;
    padding: 4px 10px;
    flex: 0 0 auto;
    width: auto;
}

.filterContent {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.filterSection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filterLabel {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.filterChips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filterChip {
    appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #111827;
    color: #e5e7eb;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filterChip:hover {
    border-color: var(--secondary);
    background: #1f2937;
}

.filterChip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
}

.filterSelect {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #111827;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    min-width: 160px;
}

.filterSelect:focus {
    outline: 2px solid var(--secondary);
}

/* Color filter row */
.colorFilterRow {
    display: flex;
    align-items: center;
    gap: 12px;
}

.colorPreview {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(45deg, #374151, #1f2937);
    /* default generic */
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Other specification inputs */
.otherSpec {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.otherSpecLabel {
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.3px;
}

.otherInput {
    appearance: none;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
}

.otherInput:focus {
    outline: 2px solid var(--secondary);
}

/* Build footer */
.buildFooter {
    margin-top: 24px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #9ca3af;
    padding: 12px 0 28px;
    width: 100%;
    background: transparent;
    user-select: none;
}

/* No results popup */
.noResultsPopup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #111827;
    border: 2px solid #dc2626;
    color: #f87171;
    padding: 14px 18px;
    border-radius: 12px;
    max-width: 280px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 12000;
    display: none;
}

.noResultsPopup strong {
    color: #fff;
}

.noResultsPopup button.closePopupBtn {
    appearance: none;
    background: #dc2626;
    border: none;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.noResultsPopup button.closePopupBtn:hover {
    filter: brightness(1.15);
}

.online-indicator {
    color: rgba(0, 189, 0, 0.5);
    animation: pulse 4s infinite;
    font-size: 15px;
    text-align: center;

}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}