/* =========================
BUILD VIEWER CORE
========================= */

#buildViewerHost {
    height: 100%;
    overflow: auto;
    padding: 10px;
}

/* ---------- Header ---------- */

.bv-top {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.bv-title-input {
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 8px 10px;
    color: inherit;
}

.bv-title-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bv-prof-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bv-prof-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
}

/* ---------- Sections ---------- */

.bv-section {
    margin-top: 12px;
}

.bv-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.bv-section-body {
    margin-top: 10px;
}

.bv-caret {
    opacity: 0.9;
}

.bv-label {
    font-weight: 700;
}

/* ---------- Columns ---------- */

.bv-two-col {
    display: grid;
    gap: 12px;
    align-items: start;
}

@media (min-width: 900px) {
    .bv-two-col {
        grid-template-columns: 1fr 1fr;
    }
}

.bv-panel {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

/* ---------- Attribute Rows ---------- */

.bv-attr-row {
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
}

.bv-attr-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bv-attr-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Armor ---------- */

.bv-armor-row {
    display: grid;
    grid-template-columns: 60px 1fr 60px 60px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
}

/* ---------- Equipment slots ---------- */

.bv-slot {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
}

.bv-slot img {
    width: 32px;
}

/* ---------- Stat bars ---------- */

.bv-stat-bar {
    position: relative;
    height: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.bv-stat-fill {
    height: 100%;
    border-radius: 999px;
}

.bv-stat-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    pointer-events: none;
}

/* ---------- Skill list ---------- */

.bv-skill-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---------- Chart icons ---------- */



.attr-bonus-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.attr-calc {
    font-size: 0.8em;
    opacity: 0.7;
}

.attr-total {
    font-weight: 700;
}

.attr-slider-wrap {
    position: relative;
    width: 100%;
}

.attr-slider-wrap input[type="range"] {
    position: relative;
    z-index: 1;
}

.attr-slider-wrap input[type="range"]:disabled {
    background: currentColor;
    opacity: 1;
    filter: none;
}

.attr-slider-wrap input[type="range"]:disabled::-webkit-slider-thumb {
    background: currentColor;
    opacity: 1;
}

.attr-slider-wrap input[type="range"]:disabled::-moz-range-thumb {
    background: currentColor;
    opacity: 1;
}

.attr-slider-bonus {
    position: absolute;
    height: 8px;
    top: calc(50% + 1px);
    left: 10px;
    width: calc(100% - 20px);

    transform: translateY(-50%);
    border-radius: 4px;

    background: currentColor;
    opacity: 1;

    z-index: 2;
}