/* boundary-panel.css
 * Styles for the floating Boundary Volume control panel (top-right).
 */

#boundary_panel {
    position: fixed;
    top: 60px;
    /* sit just below the LiDAR/SPLAT switcher bar */
    right: 12px;
    z-index: 10001;
    background: rgba(30, 30, 30, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 250px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: #e0e0e0;
    user-select: none;
}

#boundary_panel .bp-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* ── Mode buttons row ───────────────────────────────────────── */
#boundary_panel .bp-mode-row {
    display: flex;
    gap: 4px;
}

#boundary_panel .bp-btn {
    flex: 1;
    padding: 5px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    background: #3a3a3a;
    color: #b0b0b0;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}

#boundary_panel .bp-btn:hover:not(:disabled) {
    background: #505050;
    color: #fff;
}

#boundary_panel .bp-btn.active {
    background: #00BCD4;
    color: #000;
    border-color: #00BCD4;
}

#boundary_panel .bp-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Colour + thickness row ─────────────────────────────────── */
#boundary_panel .bp-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#boundary_panel .bp-color-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

#boundary_panel .bp-color-label {
    font-size: 9px;
    letter-spacing: 1px;
    color: #888;
    text-transform: uppercase;
}

#boundary_panel #bp_color {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: none;
    overflow: hidden;
    outline: 2px solid rgba(255, 255, 255, 0.15);
    outline-offset: 2px;
}

#boundary_panel #bp_color::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

#boundary_panel #bp_color::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

#boundary_panel .bp-thickness-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#boundary_panel .bp-thickness-label {
    font-size: 9px;
    letter-spacing: 1px;
    color: #888;
    text-transform: uppercase;
}

#boundary_panel .bp-thickness-input-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

#boundary_panel #bp_thickness {
    width: 64px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    padding: 4px 6px;
    text-align: right;
    outline: none;
}

#boundary_panel #bp_thickness:focus {
    border-color: #00BCD4;
}

#boundary_panel .bp-unit {
    font-size: 11px;
    color: #888;
}

/* ── Divider ────────────────────────────────────────────────── */
#boundary_panel .bp-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 -4px;
}

/* ── Toggle button ──────────────────────────────────────────── */
#boundary_panel #bp_toggle {
    width: 100%;
    padding: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    cursor: pointer;
    background: #2e2e2e;
    color: #e0e0e0;
    transition: background 0.15s, color 0.15s;
}

#boundary_panel #bp_toggle:hover {
    background: #444;
}

#boundary_panel #bp_toggle.off {
    background: #1a1a1a;
    color: #555;
    border-color: rgba(255, 255, 255, 0.05);
}

/* ── Z Offset row ───────────────────────────────────────────── */
#boundary_panel .bp-z-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#boundary_panel .bp-z-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

#boundary_panel #bp_z_slider {
    flex: 1;
    cursor: pointer;
    accent-color: #00BCD4;
}

#boundary_panel #bp_z_value {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
    padding: 3px 5px;
    text-align: right;
    outline: none;
}

#boundary_panel #bp_z_value:focus {
    border-color: #00BCD4;
}

#boundary_panel #bp_opacity_slider {
    flex: 1;
    cursor: pointer;
    accent-color: #00BCD4;
}

#boundary_panel #bp_opacity_val {
    min-width: 32px;
    text-align: right;
    font-size: 11px;
    color: #aaa;
}

/* ── Toggle Switches ───────────────────────────────────────── */
.bp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
}

.bp-toggle-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #888;
    text-transform: uppercase;
}

.bp-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.bp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .2s;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bp-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #888;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .bp-slider {
    background-color: #00BCD4;
    border-color: #00BCD4;
}

input:checked + .bp-slider:before {
    transform: translateX(16px);
    background-color: #fff;
}